Nodes/ComfyUI/Bria Generative Fill
ComfyUI Node Runs on cloud

Bria Generative Fill

Add objects to a masked region with a prompt — Bria GenFill, the 'generate, don't erase' sibling of Eraser

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,943
Bria Generative Fill
  • image
  • mask
  • IMAGE
prompt
negative_prompt
refine_prompttrue
seed42
moderation

GenFill is the other half of BRIA's masked-editing pair. Eraser deletes what's under your mask and inpaints it away; GenFill does the inverse - it generates something new inside the masked region, driven by a text prompt. Same inputs, opposite intent. Mask a spot on an empty desk and prompt "a vintage camera" and you get a camera sitting there, with lighting and perspective that match the original photo. That's the whole trick: it's not pasting, it's a context-aware generative fill that respects what's around the mask.

It belongs to the official BRIA AI API nodes pack, which means the fill happens on BRIA's servers, not your GPU. You need a BRIA API token from platform.bria.ai; you don't need any model files. BRIA's pitch is 100% licensed training data, which is why this is aimed squarely at commercial product photography - add props, swap objects, dress up a shot without a photoshoot.

How it works

The image and mask are base64-encoded and POSTed to BRIA's /v2/image/edit/gen_fill endpoint. The API replies with a status_url, the node polls until COMPLETED, then downloads the result and returns it as an IMAGE tensor. Same polling machinery as every node in this pack - the only per-node difference is the endpoint and payload.

The inputs that matter

  • image, mask, prompt, api_key are required. The mask is a standard ComfyUI MASK - paint it with a mask-editor node, or generate one with segmentation.
  • seed (default 123456) - set it and the same prompt+mask gives you the same generated object. Great for iterating on wording.
  • Content moderation toggles: prompt_content_moderation is on by default, and it's the one that'll occasionally block an innocent prompt mid-flow. The two visual_* flags (input/output) default off.

Install

Nothing heavy - the pack has no requirements file and no models:

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

or find "BRIA API" in ComfyUI Manager, restart, and paste your token into api_key.

Choosing between GenFill and Eraser

They look identical on the canvas, so the naming trips people up constantly. The rule of thumb: Eraser = remove something and leave clean background (no prompt needed); GenFill = put something there (prompt required). If you want to remove a photobomber, that's Eraser. If you want to replace the photobomber with a potted plant, that's GenFill. There's an eraser_genfill_workflow.json in the pack's workflows folder that shows both wired up.

One real-world gotcha: because this is a paid API call, every generation costs a credit, and prompt tweaks are where the money goes. Set your seed, make your prompt as specific as possible about size, lighting and angle ("a red ceramic mug on the left side of the desk, soft window light"), and only then start burning runs. Mask quality also matters more than prompt quality here - a sloppy mask produces a sloppy fill edge, just like it does with local inpainting.

Categorypartner/image/Bria

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
maskMASKWhite areas are filled with generated content, black areas are preserved. The mask is binarized before sending, so partially painted areas count as white. Must have the same aspect ratio as the image.
promptSTRINGDescription of what to generate inside the masked region.
negative_promptSTRING
refine_promptBOOLEANtrueAutomatically adjust the prompt for better results; disable to use the prompt exactly as written.
seedINT421–2147483647
moderationCOMBOModeration settings

Outputs (1)

NameTypeDescription
IMAGEIMAGE