π π £π § LTXV Per Step Adain Patcher
Anchor LTX color and tone to a reference, step by step
- model
- reference
- MODEL
This is the reference-matching cousin of the stat-norm patcher. Instead of normalizing your LTX latent toward abstract target numbers, LTXVPerStepAdainPatcher matches it to the statistics of a reference latent you provide - pulling your generation's color, tone, and level toward that reference at every denoising step. If you've got a look you want to hold - a first frame, a source clip, a graded reference - and you want the whole generation to stay consistent with it, this is the tool.
AdaIN is Adaptive Instance Normalization, a trick borrowed from style transfer: take the mean and standard deviation of a reference and re-standardize your content to match them. Applied per step during diffusion, it acts like a soft leash that keeps the generation from drifting away from the reference's overall appearance. This is especially useful on LTX where color and exposure consistency across a clip - and across shots - is a known weak spot (identity and tone drift between shots is a recurring LTX-2 complaint).
How it works
You feed it a MODEL and a reference latent; it returns a patched MODEL that, on each step, nudges the working latent's statistics toward the reference's. The factors string schedules how strongly it does this across steps, and per_frame decides whether the matching is computed per video frame or across the whole latent at once.
The inputs and outputs that matter
model(MODEL) in,MODELout - place it before your sampler.reference(LATENT) - the look you're matching to. This is the whole point of the node; without a meaningful reference it has nothing to anchor to. Encode your reference image/clip to a latent and wire it here.factors(STRING, default"0.9, 0.75, 0.0") - the per-step strength schedule, read left to right. Strong early, easing off, then zero - so the reference guides the broad look while the model keeps its late-step detail freedom.per_frame(BOOLEAN, default false) - off matches statistics across the whole clip (more temporally uniform); on matches each frame to the reference independently. Start off; flip on if you want tighter per-frame consistency and can accept a stiffer look.
How to install it
ComfyUI Manager: Ctrl+M, Install Custom Nodes, search LTXVideo, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Lightricks/ComfyUI-LTXVideo
then restart. Official Lightricks pack. It's a model patch that downloads nothing, but it belongs in a full LTX-2 graph (checkpoint + Gemma 3 text encoder + real VRAM).
Common issues & troubleshooting
The output looks tinted or unnaturally matched. You're pulling too hard toward the reference. Lower the early values in factors, and make sure your reference actually has the color balance you want - AdaIN faithfully copies whatever level and tint the reference has, warts included.
It flattened the motion or made frames look uniform. Try turning per_frame off if you had it on - matching every frame independently can over-stabilize and drain natural variation. The whole-clip mode is gentler.
No visible effect. Two culprits: the factors are near zero, or the reference latent isn't representative (an empty or mismatched latent gives nothing to match to). Confirm the reference is a real encoded image/clip.
AdaIN vs. StatNorm - which do I want? Use this one when you have a reference look to match. Use LTXVPerStepStatNormPatcher when you just want to keep the latent's statistics in a stable target range (fixing blowouts) with no reference. They solve related but different problems: matching vs. taming.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | β | |
| factors | STRING | 0.9, 0.75, 0.0 | Comma-separated list of factors, each factor will be used for one step. |
| reference | LATENT | β | |
| per_frameopt | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | β |