Nodes/ComfyUI-LTXVideo/LTX Rf-Inv Forward Sampler
ComfyUI Node Runs on cloud

LTX Rf-Inv Forward Sampler

Invert a real clip into noise for LTX video editing

By Lightricks·Created 2 years ago·Updated about a month ago· 3,956
LTX Rf-Inv Forward Sampler
  • attn_bank
  • SAMPLER
gamma0.50
start_step0
end_step5
gamma_trend
seed0
order

This is the "invert" half of RF-inversion editing on LTX. RF-Inversion (Rectified Flow inversion) is a technique for editing real footage or images: you run the generation process backward to recover the noise that would produce your source clip, then denoise forward again toward a new prompt. LTXRFForwardODESampler is the backward leg - it turns an existing video latent into the noise you'll edit from. The community brought this to LTX through Logtd's ComfyUI-LTXTricks, and these nodes carry that "ltxtricks" lineage.

Why bother inverting instead of just doing image-to-video? Because inversion gives you a noise seed that already "knows" your source, so the re-denoise can change specific things (style, an object, the action) while holding the rest of the composition. It's editing, not just conditioning. And people have found it genuinely powerful - one popular RF-inversion workflow thread called it "endless creative possibilities," with the caveat that it lives and dies by its parameters.

How it works

The node produces a SAMPLER that walks the rectified-flow ODE forward (from clean latent toward noise) over a chosen step range, optionally recording attention into a bank as it goes. That banked attention is what lets the reverse pass stay faithful to the source. gamma controls how strongly the inversion pulls along the way, and you can trend it up, down, or hold it constant across the range.

The inputs and outputs that matter

  • gamma (FLOAT, default 0.5) - the strength of the inversion guidance. Higher pulls harder toward a faithful inversion; this and the step range are what you'll tune.
  • start_step / end_step (INT, defaults 0 and 5) - the slice of the schedule over which to invert. You rarely invert the whole trajectory; a partial inversion often edits better.
  • gamma_trend (enum: linear_decrease, linear_increase, constant) - how gamma changes across the range.
  • attn_bank (ATTN_BANK, optional) - plug in an LTXAttentionBank here to record attention during inversion for the reverse pass to reuse.
  • seed and order (first/second) are optional - order picks the ODE solver order (second is more accurate, a bit slower).

Output is a SAMPLER you feed into a custom-sampler graph to perform the inversion.

How to install it

ComfyUI Manager is the easy path (Ctrl+M → Install Custom Nodes → LTXVideo → Install → restart), as the README recommends. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Lightricks/ComfyUI-LTXVideo

then restart ComfyUI; it's under ltxtricks. The node adds no downloads, but RF-inversion runs the full LTX model twice (invert then regenerate), so budget for it - Lightricks lists 32GB+ VRAM and 100GB+ disk for LTX-2/2.3.

Common issues & troubleshooting

The edit barely changes anything, or changes everything. This is entirely a tuning problem, and RF-inversion is notoriously finicky about it. Community consensus from the RF-inversion workflows is blunt: the guidance strength and the end step "significantly impact the outcomes." Sweep gamma, end_step, and the reverse pass's eta together - an XY plot is the sane way to find your sweet spot rather than guessing.

Faces or details morph. Inversion isn't pixel-perfect, and users specifically report identity slipping when editing real faces. Bank attention (via attn_bank) to anchor structure, and don't over-invert - a shorter start_step/end_step range preserves more of the source.

It's slow. You're running the model forward to invert and then again to regenerate. That's the cost of editing versus plain generation. LTX's speed cushions it, but it's still two passes.

Pair this with LTXRFReverseODESampler - the forward node inverts, the reverse node regenerates. Neither is useful alone, and both assume you're comfortable with custom-sampler wiring.

Categoryltxtricks

Inputs (7)

NameTypeDefaultDescription
gammaFLOAT0.500–100
start_stepINT00–1000
end_stepINT50–1000
gamma_trendCOMBO3 options: linear_decrease, linear_increase, constant
seedoptINT00–18446744073709550000
attn_bankoptATTN_BANK
orderoptCOMBO2 options: first, second

Outputs (1)

NameTypeDescription
SAMPLERSAMPLER