Nodes/ComfyUI-BrainDead/BD Parts Builder 2 (Qwen 2.1)
ComfyUI Node

BD Parts Builder 2 (Qwen 2.1)

Decompose a character head into asset layers with Qwen Image 2.1 prompts - no SAM, frame-true. For every item the presence vote found: VISIBLE - 'extract only the X exactly where it is' (RGBA). Trusted for WHERE, not for pixels: each source pixel goes to the faithful edit that matches it, and the layer is the SOURCE's own pixels, so the visible layers rebuild the source exactly. Items whose edit does not match the source (hidden, or restyled) own nothing and keep only a complete layer. COMPLETE - 'decompose the head into layers, output only the X layer': the whole object, hidden parts included. Split into front and _back (pixels over bare skin are behind the head). Paint order comes from the source: on two complete layers' overlap, the one the source shows is in front (depth only breaks ties). depth_median in both bundles encodes that order for BD_PartsExport. base_image = head without items (the voted accessories removed), frame-proven with seed retries; feed it to BD_PartsExport base_image with parts to get a PSD that rebuilds the source.

By BizaNator·Created 8 months ago·Updated about 13 hours ago· 15
BD Parts Builder 2 (Qwen 2.1)
  • image
  • model
  • clip
  • vae
  • head_mask
  • depth_image
  • parts
  • complete_parts
  • base_image
  • layers_preview
  • report
◄presence►
◄vocabularyhair | hair | hair | no eyebrows | eyebrows | eyebrows | no eyes | eyes | eyes | no mouth | mouth | mouth and lips | no beard | beard | beard | no moustache | moustache | moustache | no glasses | glasses | glasses | yes sunglasses | sunglasses | sunglasses | yes hat | hat or cap | hat | yes helmet | helmet | helmet | yes headband | headband or bandana | headband or bandana | yes headphones | headphones | headphones | yes earrings | earrings | earrings | yes piercings | piercings | piercings | yes►
◄seed20260931►
◄steps40►
◄cfg1.0►
◄sampler_nameeuler►
◄schedulersimple►
◄make_completetrue►
◄make_basetrue►
◄colour_retrytrue►
◄base_attempts3►
◄fidelity_min0.50►
◄explained_max60►
Category🧠BrainDead/Segmentation

Inputs (19)

NameTypeDefaultDescription
imageIMAGEHeadshot (e.g. HeadMasters MASTER 1). Its RGB is used as given.
modelMODELQwen Image 2.1 through QwenImage21Cache.
clipCLIPqwen3vl_8b, CLIPLoader type qwen_image.
vaeVAEQwen Image 2.1 VAE (RGBA).
presenceSTRINGThe vision model's JSON answer (AILab_QwenVL with BD Parts Vocabulary's vlm_prompt), or a typed list: 'hair, eyes, mouth, hat'.
vocabularySTRINGhair | hair | hair | no eyebrows | eyebrows | eyebrows | no eyes | eyes | eyes | no mouth | mouth | mouth and lips | no beard | beard | beard | no moustache | moustache | moustache | no glasses | glasses | glasses | yes sunglasses | sunglasses | sunglasses | yes hat | hat or cap | hat | yes helmet | helmet | helmet | yes headband | headband or bandana | headband or bandana | yes headphones | headphones | headphones | yes earrings | earrings | earrings | yes piercings | piercings | piercings | yesFrom BD Parts Vocabulary. key | ask | noun | accessory.
seedINT202609310–18446744073709550000Every edit uses this seed; a frame-proof retry uses seed+1, seed+2 ...
stepsINT401–200Qwen Image 2.1 model card: 40 for edits.
cfgFLOAT1.00–20—
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
make_completeBOOLEANtrueAlso make the COMPLETE layers.
make_baseBOOLEANtrueAlso make the head without items.
colour_retryBOOLEANtrueOne retry with the measured colour named ('the white sunglasses') for an ACCESSORY whose edit does not match the source. Never for hair/brows/eyes/mouth: next to an accessory their measured colour is the accessory's.
base_attemptsINT31–8Head without items: seeds tried (seed, seed+1, ...) until it is frame-true.
fidelity_minFLOAT0.500–1Share of an edit's pixels that must match the source (< 40 levels) for it to own pixels.
explained_maxFLOAT601–255A pixel is explained by an edit when their colours are within this many levels.
head_maskoptMASKWhere the head is (1 = head), e.g. the image's alpha. None: non-white pixels.
depth_imageoptIMAGEBD Lotus2 Predict map or raw_linear - BRIGHTER = NEARER. Breaks paint-order ties only.

Outputs (5)

NameTypeDescription
partsPARTS_BUNDLE—
complete_partsPARTS_BUNDLE—
base_imageIMAGE—
layers_previewIMAGE—
reportSTRING—