Nodes/BRIA AI API nodes/FIBO - Refine and Regenerate Image
ComfyUI Node

FIBO - Refine and Regenerate Image

Change one thing without nuking the whole image

By Bria-AI·Created 2 years ago·Updated 3 months ago· 95
FIBO - Refine and Regenerate Image
    • image
    • structured_prompt
    • seed
    api_tokenBRIA_API_TOKEN
    prompt
    structured_prompt
    model_versionFIBO
    aspect_ratio1:1
    steps_num50
    guidance_scale5
    seed123456
    negative_prompt

    You generated something you mostly like, and now you want the owl to be brown instead of grey - without the whole composition drifting into something else. That's the exact job this node exists for. RefineImageNodeV2 (shown in ComfyUI as FIBO - Refine and Regenerate Image) is the edit-pass sibling of Bria's FIBO generation nodes, and it's the one you reach for when a rerun with a tweaked prompt keeps producing a different image than the one you actually liked.

    The trick is the structured prompt

    FIBO - Bria's 8B image model - doesn't take plain text at generation time. It takes a long JSON "structured prompt" that spells out lighting, composition, camera, and every object's attributes, trained into the model with up to 1,000+ word captions. That's the whole reason prompt edits don't wreck the image: the edit happens in the JSON, not by jamming more words at a text encoder.

    So this node runs two API calls in sequence. First it hits Bria's /v2/structured_prompt/generate endpoint with your old structured_prompt plus your new prompt text, and the VLM bridge rewrites the JSON to reflect the change. Then it feeds that updated JSON to /v2/image/generate and FIBO regenerates. Two calls, two billable generations, and a couple of extra seconds of polling - worth knowing before you spam it.

    Inputs that matter

    • structured_prompt (required) - the JSON from a previous FIBO generation. Wire it from the structured_prompt output of a Generate node, or paste saved JSON. No JSON, no refinement.
    • prompt (required) - your edit instruction, in plain language: "make the owl brown," "turn the sky to dusk."
    • seed - keep the original seed here and refinement stays on the same visual track. Change it if you want the model to wander.
    • aspect_ratio - set it to the same ratio as your source image, or you're effectively regenerating a new crop.
    • steps_num (35–50, default 50) and guidance_scale (3–5, default 5) - Bria caps these tight; 50 steps is the high-quality default and there's little reason to go lower except speed.

    Outputs

    You get three: image (the refined result, a standard IMAGE tensor you can drop into Preview or Save Image), structured_prompt (the updated JSON - save this with the image if you want reproducibility), and seed (the seed actually used).

    Installing it

    This node ships in the BRIA AI API nodes pack (Bria-AI/ComfyUI-BRIA-API). In ComfyUI Manager, search for BRIA API and install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Bria-AI/ComfyUI-BRIA-API
    

    Then restart ComfyUI. No models download and no GPU is needed - the whole pack is HTTP calls to Bria's hosted API. The thing you actually need is a BRIA API token from the BRIA Platform (paid account, credit required). Leave the api_token field as the default BRIA_API_TOKEN placeholder and the node errors out with "Please insert a valid API token."

    Where people get burned

    The most common trip-up is feeding it a random pasted string instead of a real structured prompt - if the bridge can't parse it, the "refine" silently becomes a fresh generation and the composition you liked is gone. Also, community verdict on FIBO is strong prompt adherence but not the best anatomy at the edges, and Bria's moderation can flag things you wouldn't expect ("bikini armor" was a real trigger in reviews). If a refinement keeps getting blocked, that's usually the moderation layer, not your prompt. Keep your seed, keep your aspect ratio, and treat the output structured_prompt as the artifact worth keeping.

    CategoryAPI Nodes

    Inputs (9)

    NameTypeDefaultDescription
    api_tokenSTRINGBRIA_API_TOKEN
    promptSTRING
    structured_promptSTRING
    model_versionoptCOMBOFIBO1 options: FIBO
    aspect_ratiooptCOMBO1:19 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +3
    steps_numoptINT5035–50
    guidance_scaleoptINT53–5
    seedoptINT123456
    negative_promptoptSTRING

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    structured_promptSTRING
    seedINT