Inspiration
Modern text-to-image systems are incredibly powerful, but they still rely heavily on prompt guessing. Small wording changes often lead to unpredictable results, making them difficult to use in professional production workflows where consistency, repeatability, and control are essential.
Bria’s FIBO model introduced a fundamentally different idea: structured, JSON-native generation. That shift inspired us to ask a simple question:
What if image generation felt less like creative gambling and more like engineering?
FIBO Studio OS was inspired by the need to bridge creative intent and production reality—giving creators, designers, and teams deterministic control instead of trial-and-error prompting.
What it does
FIBO Studio OS is an agentic visual production system that converts natural language into deterministic JSON scene blueprints, and then uses those blueprints to generate high-quality, repeatable images with Bria FIBO.
Instead of sending raw text prompts to a model, the system:
- Translates intent into structured FIBO-compatible JSON
- Enforces professional constraints like HDR lighting and 16-bit color depth
- Supports controlled refinement without prompt drift
- Generates parallel variants using a batch agent
- Guarantees reproducibility using fixed seeds and locked blueprints
In short: Text → Intent → JSON → Image, not just text-to-image.
How we built it
The system is built as a strictly typed, agent-driven pipeline deployed on Google Cloud.
- Google Gemini (2.5 Flash) acts as the Interpreter Agent, converting natural language into strict FIBO JSON using schema enforcement.
- FIBO (Bria) is the core image generation model, responsible for deterministic, high-fidelity outputs.
- Bria REST API v2 is used as the primary image generation engine for production-grade inference.
- Bria MCP (Model Context Protocol) is integrated as a fallback and orchestration layer, enabling agent-to-tool execution via JSON-RPC.
- ComfyUI logic is mirrored in our backend, replicating Bria’s official Generate and Refine nodes, including async polling for long-running jobs.
- A Visual Director agent enforces global production standards.
- A Batch Agent handles parallel variant generation.
The frontend exposes these capabilities through a studio-style interface that makes JSON the central, visible artifact of the workflow.
Challenges we ran into
One of the biggest challenges was maintaining strict schema adherence while still allowing creative flexibility. LLMs naturally want to be expressive, but FIBO requires precision.
Another challenge was handling long-running image generation tasks in a web environment. We solved this by implementing an async polling mechanism that mirrors Bria’s ComfyUI node behavior, ensuring reliability without timeouts.
Designing a system that clearly communicates determinism to users—visually and conceptually—was also non-trivial. We addressed this by making JSON blueprints explicit and central to the UI.
Accomplishments that we're proud of
- Built a fully agentic, JSON-native workflow instead of a prompt wrapper
- Successfully integrated Bria FIBO via both REST API and MCP
- Replicated ComfyUI node logic in a web-first production system
- Achieved deterministic, reproducible image generation
- Delivered a working, cloud-deployed studio with real production use cases
What we learned
We learned that structure is a superpower in generative AI.
By enforcing schemas and separating intent from execution, we gained:
- Better control
- Better reproducibility
- Better scalability
We also learned that agentic systems work best when each agent has a clearly defined responsibility—reasoning, enforcement, orchestration, or execution—rather than trying to do everything at once.
What's next for FIBO Studio OS
Next, we plan to expand FIBO Studio OS into a full production platform by adding:
- Versioned JSON blueprints and diffs
- Team collaboration and approval workflows
- Preset and template libraries for enterprises
- Advanced refinement and inspire modes
- Deeper ComfyUI and pipeline integrations
Our long-term vision is to make deterministic, structured generation the default standard for professional visual creation.
🧩 ComfyUI Node Integration
This project bridges the gap between web applications and node-based workflows by strictly adhering to the logic defined in Bria's Official ComfyUI Nodes.
| ComfyUI Node Reference | TypeScript Implementation | Logic Ported |
|---|---|---|
GenerateImageNodeV2 |
services/fiboService.ts |
Implements the Async Polling mechanism (pollStatusUntilCompleted) to handle long-running generation tasks without timeouts, mirroring the Python poll_status_until_completed utility. |
RefineImageNodeV2 |
services/fiboService.ts |
We replicate the generation logic by passing the structured_prompt and model_version: "FIBO". Note: We use Gemini to architect the JSON blueprint, replacing the internal Bria refinement step with our own Agentic pipeline, then passing that strict JSON to the engine. |
Code Location:
The core integration logic is found in services/fiboService.ts. The generateViaRestV2 function replicates the Python SDK flow:
- POST payload with
sync: falseto/v2/image/generate. - Extract
status_urlfrom the response. - Poll the status URL until the state is
COMPLETED. - Retrieve the final
image_url.
🛠️ Resource Usage & Integration Details
1. FIBO (Foundation for Image generation via Bria Objects)
-
types.ts: Defines the TypeScript interfaces (FiboScene,FiboObject,FiboLighting) ensuring the app strictly adheres to the Bria schema. -
services/geminiService.ts: Uses theSCENE_SCHEMAto force the LLM to output valid FIBO JSON.
2. Bria AI API (REST v2)
- Primary Generation Engine: Used in
services/fiboService.ts-> functiongenerateViaRestV2. - Why: Highest fidelity and enterprise safety (indemnity).
3. Google Gemini (Interpreter Agent)
- The Brain: Used in
services/geminiService.ts. - Model:
gemini-2.5-flashfor speed and schema adherence.
4. Bria MCP (Model Context Protocol)
- Fallback Strategy: Used in
services/fiboService.ts-> functiongenerateViaMcp. - Function: If the primary REST API fails, the system degrades gracefully to use the MCP endpoint via JSON-RPC.
Log in or sign up for Devpost to join the conversation.