FLUX.2 Klein Identity Feature Transfer Advanced
Separate control over double and single blocks
- model
- subject_mask
- MODEL
The plain Identity Feature Transfer node treats the whole block range as one setting. Advanced splits that in two, because Klein's double and single blocks genuinely do different jobs in the network - double blocks (0–7) shape pose, color, and identity early on; single blocks (0–23) refine style and texture later. If you've ever wanted identity locked hard early but left free to refine texture late, this is the node built for exactly that split.
Same mechanism, more knobs
This is still the same attention-output-steering idea the author described when the identity-transfer family launched: after each active block, the node finds where the generation's features resemble the reference's and pulls them closer, gated by similarity so unrelated regions - new backgrounds, different poses - aren't touched. Advanced's whole contribution is giving you independent strength, range, and curve control over the double-block half and the single-block half of that process, rather than one flat schedule across both.
The inputs that matter
model- same requirement as the rest of the family: needs a reference already in the image stream via Multi ReferenceLatent.reference_index- which reference to draw from (0 = first) when multiple are connected.mode-cosine_pull(default, pull toward best matches),topk_replace(only the top-K% most similar tokens),mean_transfer(shift the overall distribution).double_enable/double_strength/double_start/double_end- turn double-block transfer on or off, its cumulative per-block strength, and its range (0–7). The tooltip's own advice: raisedouble_strengthfor stronger identity guidance, especially with multiple subjects in the reference.single_enable/single_strength/single_start/single_end- the same four controls for single blocks (0–23), which is where texture and style get refined.block_schedule- how strength varies across the active range:flat(constant),ramp_down(stronger early),ramp_up(stronger late),peak_mid(strongest in the middle).sim_floor- the cosine similarity a match needs to clear to count at all. Low (~0.05) means a wide pull and a tight identity lock, good for subtle edits like outfit swaps; higher means sparser matches and more freedom for broader edits.subject_mask(optional) - restricts the cosine-similarity search to masked-in reference tokens only, without changing what Klein itself sees;mask_thresholdsets how strict the pooled mask cutoff is.
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 double/single split is the whole point of this node, and skipping past it is the main way people underuse it - leaving both at their flat defaults gives you results close to the plain Identity Feature Transfer node, at the cost of more surface area to configure. The payoff shows up when you deliberately push them apart: strong early (double) transfer for a hard identity lock, weaker or ramp_down single-block transfer so late-stage texture refinement isn't constantly fighting the identity pull.
sim_floor is the field most likely to surprise people, because lower is tighter, not looser - a low similarity floor means more tokens qualify as matches, which locks identity harder, not softer. If your edits feel too rigid and won't follow the prompt, raise sim_floor rather than lowering it.
As with the rest of the family, this needs Multi ReferenceLatent wired upstream to have anything to transfer from - without it, the node runs but has no effect.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Requires ReferenceLatent connected. The reference must be in the image stream. | |
| reference_index | INT | 00–15 | Which reference image to draw features from when multiple are connected (0 = first). |
| mode | COMBO | cosine_pull | cosine_pull: each generation token is pulled toward similar reference tokens. topk_replace: only the top K%% most similar tokens are affected. mean_transfer: shifts the overall feature distribution toward the reference. |
| top_k_percent | FLOAT | 0.250.01–1 | topk_replace mode only. Fraction of generation tokens to affect. |
| double_enable | BOOLEAN | true | Apply transfer on double blocks (0-7). These shape pose, color, and identity early in the network. |
| double_strength | FLOAT | 0.150–1 | Per-block blend factor for double blocks. Cumulative across blocks. Raise for stronger identity guidance, especially when the reference contains multiple subjects. |
| double_start | INT | 00–7 | First double block to apply on (0-7). |
| double_end | INT | 70–7 | Last double block to apply on (0-7). |
| single_enable | BOOLEAN | true | Apply transfer on single blocks (0-23). These refine style and texture later in the network. |
| single_strength | FLOAT | 0.150–1 | Per-block blend factor for single blocks. Cumulative across blocks. |
| single_start | INT | 00–23 | First single block to apply on (0-23). |
| single_end | INT | 230–23 | Last single block to apply on (0-23). |
| block_schedule | COMBO | flat | Strength curve across the active block range. flat = constant. ramp_down = stronger on early blocks. ramp_up = stronger on later blocks. peak_mid = strongest in the middle. |
| sim_floor | FLOAT | 0.200–0.95 | Cosine similarity threshold gating which reference-to-generation matches contribute. Low (~0.05) = wide pull, tight identity lock, suited to subtle edits like outfit swaps. High = sparse pull, more freedom for broader edits. |
| mask_threshold | FLOAT | 0.500–1 | Used only when subject_mask is connected. Reference tokens whose pooled mask value falls below this are excluded from the pull. 0.5 keeps boundary tokens; raise toward 1.0 to shrink the effective mask inward. |
| subject_maskopt | MASK | Optional subject mask for the reference image. When connected, the cosine pull samples only from masked-in reference tokens, leaving everything else out of the transfer. The conditioning latent is not modified, so the model still sees the full reference. Mask aspect must match the encoded reference aspect. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |