Nodes/BrainDead Nodes/BD FaceWrap Composite
ComfyUI Node

BD FaceWrap Composite

Keep the real baked face, let Qwen only fill the gaps

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD FaceWrap Composite
  • original_texture
  • filled_mask
  • qwen_output
  • uv_texture
  • status
feather2

The Qwen-fill step of a face-wrap pipeline is where things go off the rails: give an image-editing model free rein over the whole UV texture and it'll happily redraw the good baked parts. BD FaceWrap Composite is the node that stops that. It's the last step of the Qwen-fill subgraph, and it does one surgical thing: out = filled*original + (1-filled)*qwen. Where the baked texture has real data, the original is preserved exactly; where there were gaps, the Qwen result shows through. No bleed, no overreach.

The contract

Three required inputs:

  • original_texture - the pre-Qwen baked/blended UV texture (from BD_UVConfidenceBlend.uv_texture).
  • filled_mask - the confidence blend's filled_mask: 1 where real baked data exists, 0 in the gaps Qwen filled.
  • qwen_output - the Qwen Image Edit inpaint result.
  • feather (2 px) - softens the seam between preserved and filled regions with a box blur of the mask. 0 = hard edge; 2 is a good default. Raise it if the seam shows, but keep it small - the whole point is that Qwen doesn't bleed deep into the baked face.

Outputs: uv_texture (the composite, ready for the final texture export) and status.

This is deliberately the last node - you wire it after UVConfidenceBlend and the Qwen Image Edit, and its output is your finished texture. It's the guarantee that whatever Qwen hallucinated in the masked gaps stays in the gaps.

Installing

Ships in ComfyUI-BrainDead. ComfyUI Manager → search "BrainDead" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Restart. No model downloads - pure tensor math on the three inputs.

Where people get burned

Two classic mistakes. First: wiring the raw baked texture into original_texture instead of the confidence-blended one - the whole point is to preserve what the blend already fixed, so always use UVConfidenceBlend's output. Second: cranking feather to hide a seam and accidentally letting Qwen rewrite a chunk of the face; if the seam is visible at default feather, the fix is upstream (better filled_mask coverage or a wider inpaint zone), not more feather here. If your composite looks half-Qwen-half-bake with a hard line down the middle, check that filled_mask polarity matches the convention (1 = real data) - an inverted mask inverts the whole blend.

Category🧠BrainDead/FaceWrap

Inputs (4)

NameTypeDefaultDescription
original_textureIMAGEThe pre-Qwen baked/blended UV texture (BD_UVConfidenceBlend uv_texture).
filled_maskMASKBD_UVConfidenceBlend filled_mask — 1 where real baked data is, 0 in the gaps Qwen filled.
qwen_outputIMAGEThe Qwen Image Edit inpaint result.
featherINT20–64Feather the preserved/filled seam by this many pixels (box blur of the mask). 0 = hard edge.

Outputs (2)

NameTypeDescription
uv_textureIMAGE
statusSTRING