Nodes/ComfyUI-BFSNodes/LTX Identity Transfer
ComfyUI Node

LTX Identity Transfer

The reference-token model patch for LTXV

By alisson-anjos·Created 5 months ago·Updated 10 days ago· 100
LTX Identity Transfer
  • model
  • positive
  • negative
  • vae
  • latent
  • reference_image
  • model
  • positive
  • negative
  • latent
  • debug
  • ref_preview
  • crop_overlay
source_id2
phase_scale1.0
ref_resize_modematch_target
debug_logfalse
crop_anchorcenter
layoutoverlap
reference_guidance_scale1.0

If you've already read about LTXIdentityTransfer in this pack, you can skip most of this - LTXIdentityOverlapConditioning ships with the exact same display name ("LTX Identity Transfer"), the exact same description, and an identical input/output schema. It looks like the class the pack settled on internally, with LTXIdentityTransfer as either the newer name or a compatibility alias for older workflows. Either way, functionally this is the node: a runtime model patch that injects your reference image as its own set of tokens sharing the video latent's coordinate space, so an LTXV checkpoint trained for it can copy a subject - any subject, not just faces - into the generation without going through I2V at all.

The mechanics, briefly

You wire it into the normal LTXV chain (model, positive, negative, vae, latent), point reference_image at whatever you want copied in, and it hands back a patched model plus updated conditioning and latent for your sampler. It also accepts a batch of reference images rather than just one - useful for checkpoints trained on multiple stacked references, where layout='strata' means each image in the batch becomes its own reference block at its own coordinate slot.

Three fields decide whether it works at all:

  • layout (overlap / st_drc / strata) has to match the coordinate convention your checkpoint was actually trained with - it's not a quality dial, it's a protocol, and using the wrong one means the model never learned that layout, so identity transfer just doesn't happen.
  • ref_resize_mode controls how your reference gets fit to the output's frame size: match_target crops-then-resizes (fast, but discards anything outside center on a mismatched aspect ratio), match_target_letterbox pads instead of cropping, and native_resolution keeps the reference at its own size for checkpoints trained on a fixed reference resolution independent of video size.
  • source_id defaults to 2, matching what the reference checkpoints in this family were trained on - change it only if you know better.

Push reference_guidance_scale above its default of 1.0 and you get an extra reference-flavored CFG pass that amplifies how much the reference actually shows up, the same way normal CFG amplifies your prompt - a reasonable first move if the output is basically ignoring the reference.

The outputs worth actually opening are ref_preview and crop_overlay: the first shows exactly what got encoded from your reference, the second draws a green box over what a match_target crop kept versus threw away. If your identity transfer looks half right, this is where you find out why.

Getting it installed

Search "ComfyUI-BFSNodes" in ComfyUI Manager, or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes.git
cd ComfyUI-BFSNodes
pip install -r requirements.txt

Restart ComfyUI afterward. This node is only conditioning glue - it needs an LTXV reference-transfer LoRA loaded onto model with a regular LoRA loader before it runs; a bare LoRA load alone isn't sufficient for this style of conditioning, per the pack's own README. Drop the checkpoint under ComfyUI/models/loras/ (organized subfolders are fine).

What actually goes wrong

The recurring one is layout mismatch - because the failure mode is total silence rather than a quality dip, people burn time tweaking strength values on a node that has none, when the real fix is just picking the layout the checkpoint expects. Second: trusting the default match_target crop on an aspect-mismatched reference sheet without checking crop_overlay first, then wondering why a face or panel that was clearly in the source image never made it into the output. And because this works by patching LTXV internals live, keep it adjacent to your LoRA loader in the graph rather than routing other model-patching nodes between the two.

CategoryLTX/identity

Inputs (13)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
latentLATENT
reference_imageIMAGEReference to copy into the generation -- any subject (object, animal, character, person...), not just a face. Accepts a BATCH of N images (use an Image Batch node to combine several) for checkpoints trained on multiple STACKED references (layout='strata') -- each image in the batch becomes its own reference block with source_id = source_id + its index (0-based: 1st image keeps 'source_id' as-is, 2nd gets source_id+1, ...). A single image (the default/old behavior) works exactly as before.
source_idFLOAT20–8source_phase segment id (training used 2). 0 = no phase.
phase_scaleFLOAT1.00–4
ref_resize_modeCOMBOmatch_targetmatch_target: resize ref to the OUTPUT video's pixel size via a CENTER-CROP then resize (old single-face-crop recipes — ref resolution never mattered, but this silently discards whatever isn't in the middle of the ref for mismatched aspect ratios, e.g. a landscape character sheet used for a portrait output loses the side panels/face closeup). match_target_letterbox: same target pixel size, but fits the WHOLE ref inside it preserving aspect ratio (no crop, pads with white) -- use this for a landscape composite sheet + portrait (or any mismatched-aspect) output so no panel/face-detail gets cut off. native_resolution: encode the ref at ITS OWN size (rounded to the nearest 32px), independent of the video size — REQUIRED for checkpoints trained on a fixed ref resolution bucket that differs from the video's own bucket (e.g. the composite face+3views ref, trained at 2048x1024 regardless of output video size) -- but for aspect-mismatched outputs (e.g. portrait video) this can bias the model toward the ref's own (landscape) composition, causing an off-center/cropped-looking result; try match_target_letterbox first if you hit that.
debug_logBOOLEANfalsePrint per-step [LTXIdOverlap] shape logs to the console (for debugging).
crop_anchoroptCOMBOcenterNew in v1.10.13, optional -- old workflows without this input keep the previous always-center-crop behavior. Only used by match_target (the crop-then-resize mode). Which part of the reference survives the crop when its aspect ratio doesn't match the output -- e.g. if your sheet's face closeup is in the top row, set 'top' instead of the default center crop so it doesn't get cut off. No effect on match_target_letterbox or native_resolution (neither ever crops).
layoutoptCOMBOoverlapNew, optional -- old workflows without this input keep the default 'overlap' behavior (reference shares the target's own RoPE coordinate range, distinguished only by source_phase -- what every checkpoint so far was trained with). 'st_drc' shifts the WHOLE reference block past the target's coordinate extent on every axis (non-overlapping region). 'strata' shifts ONLY the temporal axis to a slot past the target's own length -- one slot per image in the reference_image batch (1st image -> slot 0, 2nd -> slot 1, ...), leaving H/W overlapping the target; this is the 'stacked references' convention (ltx_trainer TASS strata layout). Only use whichever layout the loaded checkpoint was actually trained with -- using the wrong one is not a quality hit, it's a coordinate convention the model never learned, so identity transfer likely won't work at all.
reference_guidance_scaleoptFLOAT1.01–10ST-DRC-style reference-CFG (arxiv 2606.02441). 1.0 = off (identical to before this input existed). >1.0 adds a THIRD forward pass per step with the reference tokens dropped, and amplifies the reference's own contribution: denoised += (scale-1)*(with_ref - without_ref) -- the same way CFG amplifies the text prompt's. Costs one extra (cheaper, ref-token-free) forward pass per step when enabled. Start around 2-4; same units/convention as CFG scale on the sampler.

Outputs (7)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
debugSTRING
ref_previewIMAGE
crop_overlayIMAGE