AI Stable Media
A full-stack generative media platform: describe a visual in natural language, Stable Diffusion renders it on a GPU backend, and the Next.js frontend streams results as they form. It injects brand guidelines, refines prompts, and runs an async job queue for fast iteration.
Write a visual prompt, add your brand guidelines — colors, style, tone — and hit generate. Stable Diffusion runs on the GPU and streams image tiles as they render; a gallery keeps every iteration, campaigns export in batches, and an async queue absorbs high throughput without ever blocking.
What it solves
- Custom visual sourcing is slow — agencies spend weeks coordinating photographers and designers.
- Stock imagery is generic; it does not match brand personality or campaign themes.
- Iterating on visuals is manual — each small change requires re-shooting or re-commissioning.
Impact
Seconds, not weeks
Guidelines-injected synthesis
Batch generation + queued jobs

Architecture
Data flow
- User enters visual prompt + brand guidelines
- React Hook Form validates input
- Inject brand parameters into prompt
- Submit to Python backend → queue GPU job
- Stable Diffusion synthesizes in tiles
- Stream tiles to browser via SSE
Real-time progressive rendering
- Store image + metadata in gallery
- TanStack Query updates UI; batch export or iterate
Engineering decisions
Brand guidelines as prompt injection
Instead of retraining, brand parameters (color palette, style, tone) are encoded into the prompt sent to Stable Diffusion. Users describe the scene; the system automatically adds brand constraints.
Async GPU job queue for scale
Long image syntheses run as queued jobs; the frontend polls or streams status updates. Multiple generation requests are batched and processed in order, preventing GPU saturation.
Progressive image streaming with tiles
Stable Diffusion generates images in tiles/latent chunks; as each completes, it is streamed to the client and displayed. Users see results appear in real-time instead of waiting for a full render.
Gallery + batch export for campaigns
Every generated image is stored in a gallery with metadata (prompt, timestamp, brand parameters). Users can batch-export variations for email, web, and social media in optimized formats.
TanStack React Query for optimistic updates
When a user hits "generate," the UI optimistically adds a loading card; React Query polls the backend job status and updates the gallery in real-time as images complete.
Gallery


