Nodes/BrainDead Nodes/BD Qwen Identity Lock
ComfyUI Node

BD Qwen Identity Lock

The face doesn't change, no matter what else does

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Qwen Identity Lock
  • clip
  • vae
  • image1
  • image2
  • image3
  • conditioning
  • image1
  • image2
  • image3
  • latent
prompt
system_template<|im_start|>system CRITICAL IDENTITY PRESERVATION PROTOCOL: IMAGE 1 - PRIMARY IDENTITY SOURCE (MUST PRESERVE): Picture 1: <|vision_start|><|image_pad|><|vision_end|> This contains the CHARACTER IDENTITY that must be EXACTLY preserved: - PRECISE facial structure, bone structure, face shape - EXACT eye color, eye shape, eye spacing, eyebrow shape - IDENTICAL nose shape, nostril shape, nose bridge - EXACT mouth shape, lip fullness, lip color - PRECISE jawline, chin shape, cheekbone structure - IDENTICAL skin tone, skin texture, any marks/moles/freckles - EXACT hair color, hair texture, hairline, hair style IMAGE 2 - SECONDARY REFERENCE (APPLY SELECTIVELY): Picture 2: <|vision_start|><|image_pad|><|vision_end|> Apply ONLY non-identity aspects: pose, clothing, style, environment IMAGE 3 - ADDITIONAL CONTEXT (MINIMAL INFLUENCE): Picture 3: <|vision_start|><|image_pad|><|vision_end|> Use for composition/background only, NO identity influence GENERATION RULES: 1. Picture 1's face MUST appear UNCHANGED in output 2. Preserve Picture 1's exact identity regardless of other changes 3. Background should be clean, artifact-free, no noise 4. Maintain clear subject-background separation User request: {} Generate maintaining EXACT identity from Picture 1.<|im_end|> <|im_start|>assistant
image1_strength1.5
image2_strength0.6
image3_strength0.4
image1_rolecharacter
image2_rolestyle
image3_rolereference
enable_resizetrue
enable_vl_resizetrue

Every character-consistency tool in this pack is a Qwen-Image-Edit encoder with a different doctrine stuffed into its system prompt. BD Qwen Identity Lock is the one that treats the face as a law, not a suggestion. If your job is "same person, different everything else" - a character turnaround, an outfit swap, a scene change where the jawline and eye spacing must survive - this is the node you reach for.

What it does differently

Same encoder core as its siblings: prompt + up to three reference images in, CONDITIONING out, reference latents attached for the sampler. What changes is how the references are weighted and role-assigned. The default template doesn't just say "preserve the character" - it declares Picture 1 the primary identity source, lists exactly what must survive (bone structure, nose bridge, lip fullness, skin texture, hairline…), then demotes the other two pictures: Picture 2 is "apply selectively" (pose, clothing, style, environment), Picture 3 is "minimal influence, composition only, no identity".

Then it goes further than the other encoders with real numeric controls:

  • image1_strength - default 1.5, which is worth flagging because it's above 1.0. The identity reference gets weighted harder than a normal reference.
  • image2_strength - default 0.6.
  • image3_strength - default 0.4.
  • image1_role / image2_role / image3_role - character / style / reference by default, and the roles read into the template so the model knows why each image is there.

The inputs that matter

The clip, prompt, system_template, and vae behave exactly as in BD Qwen Character Edit - same wiring, same "no vae means no reference latents" gotcha. The distinguishing knobs are the three image*_strength / image*_role pairs. Outputs are the same set: conditioning, the three resized references (image1image3), and a latent.

How to use it like the author does

The README's advice is worth quoting because it's the whole strategy: put your highest-quality reference in image1, set image1_role to character and the highest strength, and use secondary images only for style/pose - never feed it a low-res or badly lit "identity" shot and expect magic. Identity Lock is optimized for face preservation; if you're doing a mid-shot with heavy styling, it may hold the face so hard it fights the prompt.

What it is not

One thing to keep honest: "identity lock" here is prompt-and-reference identity, not recognition-based face ID. There's no InsightFace ArcFace embedding or IdentityNet doing biometrics like InstantID or PuLID would. It's the instruction-editing school of identity - the model is told, in very explicit words, that Picture 1's face must come through unchanged. That's exactly how the 2026 community solves this, and it's genuinely effective on a single-character edit, but it's not a face-swap guarantee across a chain of ten edits. Watch for drift on long runs and re-pin the reference when it creeps.

Installing it

ComfyUI Manager, search "BrainDead" → install. Or clone and pip-install:

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

Restart, and it's under 🧠BrainDead/Character. As with all the Qwen nodes, the actual Qwen-Image-Edit model is yours to load - the pack supplies the encoder, not the weights.

Category🧠BrainDead/Character

Inputs (15)

NameTypeDefaultDescription
clipCLIP
promptSTRING
system_templateSTRING<|im_start|>system CRITICAL IDENTITY PRESERVATION PROTOCOL: IMAGE 1 - PRIMARY IDENTITY SOURCE (MUST PRESERVE): Picture 1: <|vision_start|><|image_pad|><|vision_end|> This contains the CHARACTER IDENTITY that must be EXACTLY preserved: - PRECISE facial structure, bone structure, face shape - EXACT eye color, eye shape, eye spacing, eyebrow shape - IDENTICAL nose shape, nostril shape, nose bridge - EXACT mouth shape, lip fullness, lip color - PRECISE jawline, chin shape, cheekbone structure - IDENTICAL skin tone, skin texture, any marks/moles/freckles - EXACT hair color, hair texture, hairline, hair style IMAGE 2 - SECONDARY REFERENCE (APPLY SELECTIVELY): Picture 2: <|vision_start|><|image_pad|><|vision_end|> Apply ONLY non-identity aspects: pose, clothing, style, environment IMAGE 3 - ADDITIONAL CONTEXT (MINIMAL INFLUENCE): Picture 3: <|vision_start|><|image_pad|><|vision_end|> Use for composition/background only, NO identity influence GENERATION RULES: 1. Picture 1's face MUST appear UNCHANGED in output 2. Preserve Picture 1's exact identity regardless of other changes 3. Background should be clean, artifact-free, no noise 4. Maintain clear subject-background separation User request: {} Generate maintaining EXACT identity from Picture 1.<|im_end|> <|im_start|>assistant
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image1_strengthoptCOMBO1.510 options: 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, +4
image2_strengthoptCOMBO0.610 options: 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, +4
image3_strengthoptCOMBO0.410 options: 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, +4
image1_roleoptCOMBOcharacter6 options: character, style, pose, environment, reference, control
image2_roleoptCOMBOstyle6 options: character, style, pose, environment, reference, control
image3_roleoptCOMBOreference6 options: character, style, pose, environment, reference, control
enable_resizeoptBOOLEANtrue
enable_vl_resizeoptBOOLEANtrue

Outputs (5)

NameTypeDescription
conditioningCONDITIONING
image1IMAGE
image2IMAGE
image3IMAGE
latentLATENT