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

BD Parts Builder 2 Plates (Qwen 2.1)

Bald, mouthless, eyeless — the blank head your engine parts sit on

By BizaNator·Created 9 months ago·Updated 21 days ago· 15
BD Parts Builder 2 Plates (Qwen 2.1)
  • image
  • model
  • clip
  • vae
  • parts
  • complete_parts
  • head_mask
  • bald
  • mouthless
  • eyeless
  • matte
  • plate_source
  • plate_head
  • plate_frame
  • report
  • socket_mask
  • feature_mask
◄bald_promptThis is an RGBA image with transparency. Make the character's head completely bald: remove the hair on the head, any hat or head covering, headband or bandana, glasses or sunglasses, headphones and earrings, the beard and the moustache, and show a smooth, round, complete bald scalp that continues the skin tone and the hard-edged low-poly facets of the forehead, with clean skin wherever the hair, beard or those items were. The eyebrows are not part of the hair: keep both eyebrows exactly as they are, whatever their colour. Keep the face, the eyes, the eyebrows, the lips, the nose and the ears exactly as they are, and keep the pose, the head size and position and the low-poly 3D render style exactly as in the image. The image has alpha channel and the background is transparent.►
◄mouthless_promptRemove the lips and everything inside the mouth from the character's face: the whole mouth area becomes plain skin that continues the surrounding skin tone and the hard-edged low-poly facets, with no lip colour, no teeth, no outline and no line, while the chin, the jaw and the cheeks stay exactly where they are. Remove the eyebrows the same way, so the brow ridges are plain skin. Keep the eyes open and exactly as they are. Keep the rest of the head, the ears, the pose, the head size and position, the lighting and the low-poly 3D render style exactly as in the image.►
◄eyeless_promptRemove the eyebrows, the eyes, the lips and everything inside the mouth from the character's face: the brow ridges become plain skin, each eye becomes a closed, smooth eyelid of plain skin with no eyelashes, no eye line and no eye colour, and the whole mouth area becomes plain skin with no lip colour, no teeth, no outline and no line - all of it continuing the surrounding skin tone and the hard-edged low-poly facets, while the chin, the jaw and the cheeks stay exactly where they are. Keep the rest of the head, the ears, the pose, the head size and position, the lighting and the low-poly 3D render style exactly as in the image.►
◄seed20260933►
◄steps40►
◄cfg1.0►
◄sampler_nameeuler►
◄schedulersimple►
◄attempts_per_stage2►
◄work_size1024►
◄reframe_below0.90►
◄reframe_fill0.94►
◄max_scale_err0.015►
◄max_offset_px3.0►
◄lip_zoneorganic►
◄eye_fillflat►

What it's for

If your game character's eyes and mouth are meshes rather than painted pixels, the head underneath has to be blank. You can't hang an eyeball on a head with a drawn eye, and you can't stamp a lip-sync plane over lips that are already there. So the pipeline wants a base plate: skin with no eyes, no brows, no mouth, and a matte that says where the head ends.

This node makes three of them from one headshot with Qwen Image 2.1 edits - and then spends most of its code proving that none of the three stages moved the head.

Qwen 2.1 doing an eraser pass isn't the hard part. An edit model re-emits the whole frame, so a stage can quietly shift or scale the head, and a plate that's 1.5% larger than the source is useless as a registration target. You'd never spot that by eye, so every stage is checked against an affine fit before it's accepted.

How it works

Bald first. One RGBA edit of the source; its alpha, with the faint sub-0.05 noise zeroed, is the plate matte. Then mouthless (lips and mouth interior gone, eyebrows gone) and eyeless (brows, eyes and mouth all plain skin - closed smooth lids) are each a single edit of the bald, never of each other. Every stage is cut by the matte onto pure white before anything reads it, because chaining 2.1's raw output amplifies its input noise.

Frame proof, per stage. A coarse-to-fine affine ECC fit on gradient images, measured over the head minus whatever that stage removes, has to show |scale − 1| ≤ max_scale_err (default 0.015) and a centre move under max_offset_px (3 px at 1024). A weak direct fit (ECC below 0.7 - a laughing face's cheeks relaxing, say) can be proven through the chain instead. A stage that fails retries with the next seed up to attempts_per_stage times, and if it still fails the chain stops: later plates come back white, plate_frame says ok=false, and Assemble refuses to build anything from a rejected plate. That's a designed behaviour, not a bug.

Re-framing. If a hat set the source's framing so the bald head fills less than reframe_below (default 0.9) of the frame, the source is cropped to the bald head and the whole chain re-runs at full resolution. plate_frame is the JSON record of that crop - box, size, scale, and the exact pixel rule - and plate_source / plate_head are the source in that new frame.

The inputs and outputs that matter

Give it the same image, model, clip, vae as the builder (Qwen 2.1, qwen3vl_8b, 2.1 VAE), plus the optional parts / complete_parts - those aren't decoration: they tell the node where each item is, which sharpens the frame proof and defines what each stage is supposed to remove. head_mask is optional the same way it is upstream.

bald_prompt, mouthless_prompt and eyeless_prompt are all editable. The defaults are long and explicit for a reason: they name the render style, keep the eyebrows during the bald pass, and repeat the "keep the pose, the head size and position" clause. That repetition is load-bearing.

work_size is 1024 or 2048 (2.1's max, roughly 4× the time). lip_zone picks how the lip region is shaped in the output masks - organic (MediaPipe outer contour + 6 px, the modern path), contour, hull, or plane for the rotated rectangle FaceMaker v10–v26 stamps into. eye_fill at flat replaces each eye zone with one flat skin tone: the flat eye section the engine eye sits on, reproducing what FaceMaker v26's removed "Crop and Fill Eyes" step used to do.

Outputs: bald, mouthless, eyeless, matte, plate_source, plate_head, plate_frame, report, plus two masks that are easy to overlook - socket_mask (eyes, brows and mouth as one exclusion mask, so FaceMaker subtracts it instead of detecting anything) and feature_mask (RGB: R = mouth/lips, G = eyes, B = brows). Save those next to the plates. The eyeless plate, matte, plate_frame, plate_source and plate_head all go to BD Parts Builder 2 Assemble.

Installing it

ComfyUI Manager → search "BrainDead" → install → restart. Manual:

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

MediaPipe finds the eye/brow/mouth zones on the bald plate, so it has to be importable in that Python environment. Same Qwen Image 2.1 models as the builder: unet, qwen3vl_8b encoder, 2.1 VAE.

Traps

White plates and ok=false means a stage missed its frame proof. Fix it upstream of the symptom: raise attempts_per_stage, change seed, or look at the report for which stage failed and by how much (scale error versus centre move) - a much-too-tight max_scale_err will reject perfectly serviceable plates.

A re-framed plate is not the source's frame. Everything downstream must be given plate_frame, which is why Assemble takes it as a forced input and raises if it's empty. Pasting a re-framed plate back onto the original image by hand will be wrong.

Don't go threadbare on the prompts. "Make the head bald" is the fastest way to get a plate that also changed the lighting, the head size or the eyebrows.

Category🧠BrainDead/Segmentation

Inputs (23)

NameTypeDefaultDescription
imageIMAGEThe same source as BD Parts Builder 2.
modelMODEL—
clipCLIP—
vaeVAE—
bald_promptSTRINGThis is an RGBA image with transparency. Make the character's head completely bald: remove the hair on the head, any hat or head covering, headband or bandana, glasses or sunglasses, headphones and earrings, the beard and the moustache, and show a smooth, round, complete bald scalp that continues the skin tone and the hard-edged low-poly facets of the forehead, with clean skin wherever the hair, beard or those items were. The eyebrows are not part of the hair: keep both eyebrows exactly as they are, whatever their colour. Keep the face, the eyes, the eyebrows, the lips, the nose and the ears exactly as they are, and keep the pose, the head size and position and the low-poly 3D render style exactly as in the image. The image has alpha channel and the background is transparent.—
mouthless_promptSTRINGRemove the lips and everything inside the mouth from the character's face: the whole mouth area becomes plain skin that continues the surrounding skin tone and the hard-edged low-poly facets, with no lip colour, no teeth, no outline and no line, while the chin, the jaw and the cheeks stay exactly where they are. Remove the eyebrows the same way, so the brow ridges are plain skin. Keep the eyes open and exactly as they are. Keep the rest of the head, the ears, the pose, the head size and position, the lighting and the low-poly 3D render style exactly as in the image.—
eyeless_promptSTRINGRemove the eyebrows, the eyes, the lips and everything inside the mouth from the character's face: the brow ridges become plain skin, each eye becomes a closed, smooth eyelid of plain skin with no eyelashes, no eye line and no eye colour, and the whole mouth area becomes plain skin with no lip colour, no teeth, no outline and no line - all of it continuing the surrounding skin tone and the hard-edged low-poly facets, while the chin, the jaw and the cheeks stay exactly where they are. Keep the rest of the head, the ears, the pose, the head size and position, the lighting and the low-poly 3D render style exactly as in the image.—
seedINT202609330–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
attempts_per_stageINT21–8Seeds tried per stage (seed, seed+1, ...) before the chain stops.
work_sizeCOMBO1024Plate resolution. 2048 is Qwen Image 2.1's maximum (about 4x the time).
reframe_belowFLOAT0.900–1Re-frame when the bald head fills less than this of the frame. 0 = never.
reframe_fillFLOAT0.940.5–0.99—
max_scale_errFLOAT0.0150.001–0.2—
max_offset_pxFLOAT3.00.1–50Centre move limit, in 1024-px units.
partsoptPARTS_BUNDLEBD Parts Builder 2 parts - where each item is (frame proof).
complete_partsoptPARTS_BUNDLEBD Parts Builder 2 complete_parts (frame proof).
head_maskoptMASK—
lip_zoneoptCOMBOorganicLip shape in socket_mask / feature_mask. organic: the MediaPipe outer lip contour + 6 px, like the eyes and brows. contour: the exact lip outline, no margin. hull: its convex hull (no cupid's bow). plane: the box FaceMaker v10-v26 drew for its lip stamp.
eye_filloptCOMBOflatflat: each MediaPipe eye zone of the eyeless plate becomes one flat tone (the median of the skin around it) - the flat eye section the engine eye sits on, which FaceMaker v26 made in its removed 'Crop and Fill Eyes' step. none: keep the closed lids 2.1 draws.

Outputs (10)

NameTypeDescription
baldIMAGE—
mouthlessIMAGE—
eyelessIMAGE—
matteMASK—
plate_sourceIMAGE—
plate_headMASK—
plate_frameSTRING—
reportSTRING—
socket_maskMASKEye / brow / mouth exclusion mask (MediaPipe on the bald plate; lips per lip_zone), in the plate frame. Save it with the plates; FaceMaker subtracts it from the matte instead of detecting.
feature_maskIMAGERGB: R = mouth / lips, G = eyes, B = brows (plate frame).