Nodes/ComfyUI-Flux2Klein-Enhancer/FLUX.2 Klein Identity Feature Transfer V3
ComfyUI Node

FLUX.2 Klein Identity Feature Transfer V3

Matches that have to earn their lock

By capitan01R·Created 7 months ago·Updated 30 days ago· 551
FLUX.2 Klein Identity Feature Transfer V3
  • model
  • subject_mask
  • MODEL
presetMIDUM_LOCK
reference_index0
double_schedule0-3:mid=0.25; 4:mid=0.35; 5:mid=0.65; 6-7:mid=0.45
single_schedule0:mid=0.35; 1:mid=0.25; 2-10:mid=0.30; 11-19:mid=0.25; 20:mid=0.08; 21:mid=0.10; 22:mid=0.15; 23:mid=0.20
double_sim0.020
single_sim0.020
commit_margin0.035
commit_confirm2
commit_anchor0.50
mask_threshold0.25
debugfalse

The plain Identity Feature Transfer node pulls generation tokens toward reference tokens on every step, no questions asked. V3 is the version where the author added a trust gate: a match has to repeat consistently before the node commits to it, which is meant to cut down on the flicker and false-positive pulls you get when a similarity score barely clears the floor for one step and then doesn't.

How it's different from the basic version

Same underlying mechanism as the rest of the identity-transfer family - attention-output steering, the reference latent living in Klein's image token stream, similarity gating so unrelated regions (new pose, new background) are left alone. What V3 adds is commit-based matching: instead of pulling toward whatever the best match is this step, it requires the same match to repeat a set number of times before it "locks," and once locked, some pull remains even if the match momentarily looks less confident. That's a more conservative, more stable identity lock at the cost of some flexibility.

Everything is exposed through presets rather than raw numbers by default - MIDUM_LOCK (the default, a middle ground), HARD_LOCK, SOFT_LOCK, or custom if you want to hand-tune the schedule yourself.

The inputs that matter

  • model - same requirement as the rest of the family: ReferenceLatent has to be connected in the conditioning path, with the reference living in the image stream.
  • preset - pick a strength profile and move on. Any value except custom ignores every manual field below it.
  • reference_index - which reference image to draw from when more than one is connected.
  • double_schedule / single_schedule - custom-preset-only text schedules (e.g. 0-3:mid=0.25; 4:mid=0.35; 5:mid=0.65; 6-7:mid=0.45) for per-block strength.
  • commit_margin and commit_confirm - custom-preset-only. commit_margin is how much clearer the best match has to be before it's allowed to lock; commit_confirm is how many times it has to repeat before it does. Together these are the "earn the lock" mechanism described above.
  • commit_anchor - how much pull survives after a token has locked in.
  • double_sim / single_sim - similarity thresholds; higher means fewer matches qualify at all.
  • mask_threshold - only relevant with the optional subject_mask input, for isolating one subject out of a multi-subject reference.

Output is a patched MODEL, same as its siblings.

Installing it

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

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

Restart ComfyUI. No extra dependencies beyond what ComfyUI already ships.

Where people get burned

Same upstream requirement as the whole identity-transfer family: this node reads the reference from the model's attention stream, so Multi ReferenceLatent has to be feeding your conditioning before this node has anything to lock onto. Wire it wrong and the node runs silently without doing anything useful - it won't error.

The presets exist specifically because the custom fields are fiddly to hand-tune (commit margin, commit confirm, and the per-block schedule syntax interact in ways that aren't obvious from any single value). Start on MIDUM_LOCK, only drop to custom once you know exactly what you're chasing - a looser lock for subtle edits like outfit swaps, or a tighter one when the reference has multiple subjects and you need to make sure the wrong face doesn't get pulled in.

This is one of several identity-transfer implementations the pack keeps around for workflow compatibility. If you're not already invested in a V3-based workflow, the current recommended node is Identity Feature Transfer Final, which folds in multi-reference support and per-reference masking that V3 doesn't have.

Categoryconditioning/flux2klein

Inputs (13)

NameTypeDefaultDescription
modelMODELConnect this after your checkpoint model. ReferenceLatent must also be connected in the conditioning path.
presetCOMBOMIDUM_LOCKPick how strongly the reference should hold. Any preset except custom ignores the manual settings below.
reference_indexINT00–15Which reference image to use. 0 means the first reference.
double_scheduleSTRING0-3:mid=0.25; 4:mid=0.35; 5:mid=0.65; 6-7:mid=0.45Custom preset only. Double block schedule.
single_scheduleSTRING0:mid=0.35; 1:mid=0.25; 2-10:mid=0.30; 11-19:mid=0.25; 20:mid=0.08; 21:mid=0.10; 22:mid=0.15; 23:mid=0.20Custom preset only. Single block schedule.
double_simFLOAT0.0200–0.95Custom preset only. Higher means fewer double-block matches are allowed.
single_simFLOAT0.0200–0.95Custom preset only. Higher means fewer single-block matches are allowed.
commit_marginFLOAT0.0350–0.5Custom preset only. Higher means the match has to be more obvious before it locks.
commit_confirmINT21–16Custom preset only. How many times the same match must repeat before it locks.
commit_anchorFLOAT0.500–1Custom preset only. How much pull remains after a token has locked.
mask_thresholdFLOAT0.250–1Used only when a mask is connected. Lower keeps more edge tokens. Higher keeps only the strongest mask area.
debugBOOLEANfalsePrint the active preset and schedules to the console.
subject_maskoptMASKOptional mask for the reference image. Use it when the reference has more than one subject.

Outputs (1)

NameTypeDescription
MODELMODEL