Nodes/ComfyUI-Flux2Klein-Enhancer/Identity Feature Transfer Final
ComfyUI Node

Identity Feature Transfer Final

The pack's current, recommended identity-lock node

By capitan01R·Created 7 months ago·Updated 30 days ago· 551
Identity Feature Transfer Final
  • model
  • sigmas
  • subject_mask_1
  • subject_mask_2
  • subject_mask_3
  • subject_mask_4
  • subject_mask_5
  • subject_mask_6
  • subject_mask_7
  • subject_mask_8
  • MODEL
presetHARD_LOCK
enabledtrue
reference_index0
reference_indicesall
similarity_floor0.040
softmax_temperature0.0250
mask_threshold1.00
double_blocks0-7:mid_img=0.55
single_blocks0:mid_img=0.22; 1:mid_img=0.24; 3:mid_img=0.28; 4:mid_img=0.22; 6:mid_img=0.26; 7:mid_img=0.27; 8:mid_img=0.25; 10:mid_img=0.27; 13:mid_img=0.27
debugfalse
mask_behaviorfocus_only

This is the node the README's own workflow diagram builds around, and it's the one to reach for first if you're new to this pack: the current, most capable version of the identity-transfer idea the author's been iterating on since the original Identity Feature Transfer node. Everything else in the family (V3, Advanced, the plain original) is kept around for backward compatibility, not because Final is missing something they have.

What it adds over the earlier versions

Same core mechanism as its predecessors - the reference latent lives in Klein's image token stream, and after every active attention block this node finds where generation tokens resemble reference tokens and pulls them together, similarity-gated so unrelated regions (new pose, new background) are left alone. What's new here: multi-reference support with per-reference masking, presets that replace hand-tuned schedules, and an optional sigma-aware strength scaling that ties the effect to your sampler's noise schedule instead of running at constant strength regardless of step.

The pipeline the README recommends is exactly this: VAE-encode every reference, feed them into Multi ReferenceLatent, connect that conditioning to your sampler's positive input, and patch your model with this node. Reference order between the two nodes is shared - latent_1 maps to subject_mask_1, latent_2 to subject_mask_2, and so on.

The inputs that matter

  • preset - HARD_LOCK (default), MID_LOCK, SOFT_LOCK, or custom. Any non-custom preset ignores everything below it; start here before touching the manual fields.
  • reference_indices - accepts all, comma-separated indices (0,2,3), or ranges (0-3) to pick which references actually contribute.
  • similarity_floor and softmax_temperature - custom-preset territory. Floor sets the minimum match quality allowed to count; temperature controls how sharply the match concentrates on a few tokens (low) versus blends across many (high).
  • double_blocks / single_blocks - text schedules for per-block strength, e.g. 0-7:mid_img=0.55. Empty text disables single-block transfer entirely.
  • sigmas (optional) - connect your sampler's sigma schedule and the block strengths decay per step by delta_sigma_0 / delta_sigma_step, instead of firing at a flat strength the whole way through.
  • subject_mask_1 through subject_mask_8 (optional) - per-reference masks, matched to latent order from Multi ReferenceLatent. Leaving one unwired means that reference supplies full, unrestricted context.
  • mask_behavior - focus_only (default: the mask limits what enters this node's reference bank, but Klein still sees the whole reference image for context) or zero_unmasked_tokens (stricter: unmasked tokens are also blocked as attention sources, so the model only sees the masked region of that reference at all). Use the strict mode when you want, say, one reference to contribute only its outfit and nothing else from that photo.

Output is a patched MODEL.

Installing it

ComfyUI Manager: search ComfyUI-Flux2Klein-Enhancer, or:

cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-Flux2Klein-Enhancer.git

Restart. No extra dependencies.

Where people get burned

The author shipped zero_unmasked_tokens after users asked for stricter isolation - one reference supplying full identity context while another contributes only a specific region, like an outfit or face, without its background bleeding in. If your masked reference still seems to be influencing parts of the image outside the mask, you're probably still on focus_only, which by design still lets Klein's native attention see the complete reference; switch modes if that's not what you want.

As with every node in this family, this reads the reference from the model's attention stream via Multi ReferenceLatent - skip that upstream node and this one runs without error but does nothing. And per user reports in the pack's community thread, results here can vary enough between people's setups that a couple of users reported the node "not working" on first try; when that happens, it's almost always the reference-wiring order (masks matched to the wrong latent_N) rather than a bug in the node itself. Double-check reference indices before assuming something's broken.

Categoryconditioning/flux2klein

Inputs (21)

NameTypeDefaultDescription
modelMODEL
presetCOMBOHARD_LOCK4 options: HARD_LOCK, MID_LOCK, SOFT_LOCK, custom
enabledBOOLEANtrue
reference_indexINT00–15
reference_indicesSTRINGall
similarity_floorFLOAT0.0400–0.95
softmax_temperatureFLOAT0.02500.0001–0.25
mask_thresholdFLOAT1.000–1
double_blocksSTRING0-7:mid_img=0.55
single_blocksSTRING0:mid_img=0.22; 1:mid_img=0.24; 3:mid_img=0.28; 4:mid_img=0.22; 6:mid_img=0.26; 7:mid_img=0.27; 8:mid_img=0.25; 10:mid_img=0.27; 13:mid_img=0.27
debugBOOLEANfalse
mask_behaviorCOMBOfocus_onlyfocus_only preserves the original masking behavior: the mask limits this node's reference bank while Klein still sees the complete reference. zero_unmasked_tokens blocks each wired reference's unmasked tokens as attention sources in every block. References without a wired mask remain complete and unchanged.
sigmasoptSIGMASOptional sampler sigma schedule. When connected, the existing block strengths decay per sampling step by delta_sigma_0 / delta_sigma_step.
subject_mask_1optMASK
subject_mask_2optMASK
subject_mask_3optMASK
subject_mask_4optMASK
subject_mask_5optMASK
subject_mask_6optMASK
subject_mask_7optMASK
subject_mask_8optMASK

Outputs (1)

NameTypeDescription
MODELMODEL