🌟 RELIGHT — Professional AI Lighting Made Accessible to Everyone
Built for the Kiroween Hackathon using Kiro Specs, Hooks, and Steering
Hi everyone! I’m Ritanshu, and this is the story of how I built RELIGHT — an end-to-end AI cinematic lighting engine that transforms ordinary images into studio-quality visuals using a chain of advanced AI models… all orchestrated smoothly with *Kiro.
*
RELIGHT lets anyone create advertisement-level lighting in seconds — without photography studios, complex editing, or professional gear.
And yes…
Kiro didn’t just help me build this, it supercharged the entire development process.
This project simply would not exist at this speed or polish without Kiro.
🎥 What is RELIGHT?
RELIGHT is a multi-model AI pipeline that performs:
- ✔ Realistic Photometric Relighting (IC-Light) Controls shadows, highlights, mood, and directional light using text prompts.
- ✔ GPT-4o-mini Vision Lighting Advisor Analyzes the image → suggests 3 optimized lighting prompts under 3 words.
- ✔ Background-Aware Relighting Matches lighting of the subject with any custom background.
- ✔ Super Resolution (Real-ESRGAN) Automatically enhances outputs to full 1080p HD clarity.
- ✔ Clean, Modern UI Drag-and-drop inputs, live preview, light gizmo, and smooth workflow.
*🧠 How RELIGHT Works Internally
*
Here’s the high-level pipeline:
1️⃣ User Upload
The user uploads:
- Main subject
- (Optional) Background image
Kiro helped me generate the validation code, MIME checks, and async previews.
2️⃣ Background Removal (RMBG 1.4)
- The image goes into BRIA RMBG for clean alpha-matte extraction.
- Kiro’s vibe coding made it painless to manage GPU memory + batch transforms.
3️⃣ Relighting Stage (IC-Light FC & FBC)
Depending on the mode:
- Manual Mode → IC-Light FC
- AI Mode → GPT recommends a prompt → IC-Light FC
- Background Mode → IC-Light FBC (background-conditioned lighting) This stage injects a lighting embedding into the diffusion process.
Kiro helped me stitch FC + FBC models into a unified class-based architecture.
4️⃣ GPT Vision Lighting Advisor
The uploaded image is encoded to Base64 and sent to GPT-4o-mini.
GPT returns:
- ✨ “soft top glow”
- ✨ “left warm beam”
✨ “cinematic right edge”
*This was generated using a Kiro spec.
*
5️⃣ HD Upscaling (Real-ESRGAN x4plus)Every final relight passes through:
models/RealESRGAN_x4plus.pth
Ensuring:
- Zero pixelation
- High detail
- 1080p resolution minimum This step came from a Kiro hook that triggered automatic upscaling after each inference.
🎮 Features That Make RELIGHT Stand Out
✔ Manual Lighting Control
Prompt-based relighting like:
- “soft warm left”
- “cold top beam” ✔ AI Recommendation Mode
- One click → GPT suggests the best moods. ✔ Background Blending Mode
- Subject + New Background →
- RELIGHT matches:
- Light direction
- Mood
- Color temperature
- Exposure
- Automatically. ✔ Drag-and-Drop Light Gizmo
- A clean UI element that lets users visually move light.
🔧 How Kiro Helped Build RELIGHT (And Why I Love It)
Kiro was not a side tool — it was my development partner.
🔥 Vibe Coding — Instant iteration
I structured all my conversations with Kiro using vibe coding:
- “Build me a modular IC-Light wrapper”
- “Optimize VRAM for FP16”
- “Refactor the upscaling stage into its own class”
The most impressive part?
*Kiro generated a complete relighting pipeline in one go — with model loading, memory handling, and device placement.
*
Crazy efficiency.
🛠 Agent Hooks — Automation that saved my time
I used Kiro hooks to automate:
- Running ESRGAN after IC-Light finishes
- Clearing CUDA cache between requests
- Validating image inputs
- Auto-writing spec updates
These hooks acted like a mini CI/CD engine inside my local workflow, making development fast and clean.
📐 Spec-Driven Development — Cleanest architecture ever
I wrote one master spec describing:
Three modes
- Inputs/outputs
- Expected lighting behavior
- File structure
Kiro used this to generate:
- Backend structure
- API endpoints
- Frontend bindings
- Documentation
Compared to vibe coding, specs gave me predictable, structured outputs — perfect for a large project.
*🎚 Steering Docs — Sharper, more consistent generation
*
- My steering docs made Kiro:
- prefer modular code
- avoid unnecessary libraries
- follow filename conventions
- keep GPU memory under 7GB
- write clean, readable UI components
The biggest improvement:
Kiro stopped over-hallucinating code, and started generating stable, uniform patterns across all modules.
🎃 Why This Fits Kiroween Perfectly
Kiroween celebrates:
- creativity
- mixing models
- wicked UI
powerful AI workflows
RELIGHT is literally a Frankenstein of:diffusion
segmentation
super-resolution
GPT lighting analysis
frontend engineering
Plus the UI has smooth transitions, a slick dark-mode theme, and a magical “lighting transformation” effect.
It’s the perfect spooky tech creation.
🚀 Conclusion — RELIGHT + Kiro = Studio Lighting for Everyone
RELIGHT proves that:
- 💡 Professional lighting can be democratized
- ⚡ AI can replace expensive photography setups
- 🎨 Creativity can be automated
- 👻 And Kiro can turn complex multi-model pipelines into clean, production-ready systems faster than ever
**_Kiro didn’t just improve my workflow…
It elevated it.
It gave me the power to build something that feels like a real product, not just a hackathon prototype.
Thank you for reading — and thank you Kiro for making RELIGHT possible.
Happy Kiroween! 🎃🕯️💡_**
Top comments (0)