Nodes/Comfyui-zhenzhen/zhenzhen-bria-genfill-v2-fal
ComfyUI Node

zhenzhen-bria-genfill-v2-fal

Mask-guided inpainting that actually respects the mask

By T8mars·Created about a year ago·Updated a day ago· 740
zhenzhen-bria-genfill-v2-fal
  • image
  • mask
  • images
  • response
  • image_urls
instructionA beautiful colorful butterfly
image_url
mask_url
api_key
seed5555
steps_num30
sync_modefalse
image_waybase64
poll_interval6
max_poll_attempts600
skip_errorfalse

Inpainting got quietly demoted over the last couple of years. Instruction-edit models took over most of the job, and honestly they're better at "change the lighting" type asks - but they have one structural weakness: the whole image passes through the model, so the parts you didn't ask to change drift a little, and the drift compounds across a chain of edits. BRIA GenFill v2 is the answer for the exact moment you care about that. It's a masked generative fill: only the region inside your mask is regenerated, and everything outside it stays bit-for-bit intact. That's the one thing instruction editors can't give you, and it's why people who build product shots or fix the same asset repeatedly still reach for this class of tool.

This node wraps bria/genfill/v2 through the Zhenzhen API, so you get BRIA's commercial inpainting per call. The use case is dead simple: load an image, draw a mask over what you want replaced (a butterfly covering a logo, a pothole in a street, an errant reflection), type what should be there, done.

How it works

Like the rest of this pack, it's a wrapper with an HTTP client inside. The node POSTs your image and mask (base64 by default) plus the instruction to the Zhenzhen FAL proxy, polls every few seconds, downloads the result, returns an IMAGE. Nothing runs locally - the steps_num and seed are just passed through to the hosted job. The sync_mode flag trades polling for an inline blocking call if you prefer.

One practical detail: the mask input slot is an IMAGE, not a MASK tensor. If you're drawing masks in ComfyUI and getting MASK output, convert it to IMAGE before this node, or paste a mask_url directly.

Inputs and outputs that matter

instruction is required - describe what should appear in the masked area. The default "A beautiful colorful butterfly" is a solid example of the phrasing.

  • image + mask - the pair that makes or breaks the result. Both are IMAGE tensors (or use image_url / mask_url strings). The node errors if either is missing, so unlike the maskless edit nodes there's no ambiguity about intent.
  • steps_num - 30 default (20-50 here, note it's a tighter range than Fibo's).
  • seed - default 5555, so results are reproducible until you change it; FAL caps at 65535.
  • skip_error - on, a failure returns a placeholder instead of failing the queue.

Outputs: images (the inpainted IMAGE), response (raw JSON), image_urls (the hosted result URLs, one per line).

Installing it

Same pack as every Zhenzhen node:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen

Restart ComfyUI, or install "Comfyui-zhenzhen" via ComfyUI Manager. No models to download - the requirements are HTTP libraries, and the actual inpainting runs on BRIA's servers.

Common issues

The pack-level stuff first: you need a Zhenzhen account with credit; the overseas API can throw 443 errors from some networks (VPN with TUN mode); and a 500 on first run is usually upstream, so re-run before debugging.

GenFill-specific traps: a soft or feathered mask produces a soft edge where the fill tries to blend - that's fine for backgrounds, terrible for a hard-edged product swap, so erode your mask edges deliberately. And if the fill ignores your instruction, check that the mask actually covers what you think it covers - the hosted model treats the mask as authoritative, and a tiny mask with a big instruction gives you a tiny result. One more: if you're coming from the instruction-edit nodes, remember GenFill's whole advantage is that outside the mask stays untouched. If you wanted the whole frame re-rendered, you're using the wrong node.

Categoryzhenzhen/FAL

Inputs (13)

NameTypeDefaultDescription
instructionSTRINGA beautiful colorful butterfly
imageoptIMAGE
maskoptIMAGE
image_urloptSTRING
mask_urloptSTRING
api_keyoptSTRING
seedoptINT55550–655350 = random seed. FAL seed max is 65535.
steps_numoptINT3020–50
sync_modeoptBOOLEANfalse
image_wayoptCOMBObase642 options: base64, image_url
poll_intervaloptINT61–60
max_poll_attemptsoptINT60010–3600Default 600*6s = 3600s timeout.
skip_erroroptBOOLEANfalse

Outputs (3)

NameTypeDescription
imagesIMAGE
responseSTRING
image_urlsSTRING