Nodes/ComfyUI-LTX-Attention-Toolkit/LTX Attn — RF-Inv Reverse (xT→x0)
ComfyUI Node

LTX Attn — RF-Inv Reverse (xT→x0)

The denoising half that turns edits into videos

By g-raw·Created 3 months ago·Updated 2 months ago· 2
LTX Attn — RF-Inv Reverse (xT→x0)
  • model
  • latents
  • positive
  • negative
  • inverted_latents
  • samples
steps30
cfg3.50
schedulersimple
seed0
eta0.40
eta_trendlinear_decrease
start_step0
end_step15

The second half of the pack's inversion pair, and the one that actually produces video. RF-Inv Reverse takes the xT that the Forward sampler produced - or any noisy latent - and denoises it back to x0, with an optional injection of the inverted latents during a chosen step window to keep the output anchored to the original clip's structure. This is the pass where you can change the prompt, the conditioning, or the parameters between forward and reverse, and the injection term is what decides how much of the original survives the edit.

The full inversion workflow is the classic shape: run RF-Inv Forward on a clean latent → xT + inverted_latents out. Now change what you want (prompt edit, different conditioning, a LoRA). Run RF-Inv Reverse with the inverted_latents wired into its optional input. The reverse pass denoises while pulling toward those latents during [start_step, end_step), giving you a video that preserves the original's structure and motion while taking the edit. No injection (leave inverted_latents unwired) and it's just a plain RF sampler with an interesting default.

How it works

Standard Euler reverse along the sigma schedule, same velocity-based formulation as its sibling, plus an injection term eta × (inverted − x_next) active in the [start_step, end_step) window, with the same smoothstep warmup. The defaults are telling: eta 0.4 with linear_decrease - strong anchor early in denoising, backing off as detail gets pinned down - and end_step 15 rather than 30, so the last half of the run denoises freely without pulling. cfg defaults to 3.5 here (vs. 1.0 on the forward pass), which makes sense for a dev-model generation pass where guidance does some work.

The inputs that matter

  • latents - the xT to start from (wire the Forward node's inverted_latents here, or a plain noisy latent).
  • inverted_latents (optional) - the forward pass's inversion output, wired for anchored edits.
  • eta, eta_trend, start_step/end_step - injection strength and window. eta=0 (or no inverted_latents input) = plain sampling.
  • steps, scheduler, cfg, seed, positive/negative - standard sampler fare.

Output is a single samples LATENT.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/g-raw/ComfyUI-LTX-Attention-Toolkit.git

Restart ComfyUI. No extra dependencies, no model files. Intended for LTX-2.3's flow formulation; the pack is work-in-progress.

Common issues

Shape mismatch is the recurring one - the Forward node auto-resizes the source to match (with a warning) but the reverse pass has no such safety for the injection; keep forward and reverse at the same resolution. Reconstruction quality lives almost entirely in eta and the window: too much pull and you get a video that refuses to change (the edit doesn't take), too little and the anchor fails and you get drift - the linear_decrease + end_step≈half of steps defaults are a reasonable place to start, and moving end_step up is how you tighten fidelity. And remember this is a research sampler, not a KSampler replacement: verify results on short clips before committing to a long one.

Categoryg_raw/LTX/RFInversion

Inputs (13)

NameTypeDefaultDescription
modelMODEL
latentsLATENT
positiveCONDITIONING
negativeCONDITIONING
stepsINT301–200
cfgFLOAT3.500–10
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
seedINT00–18446744073709550000
inverted_latentsoptLATENT
etaoptFLOAT0.400–1.5
eta_trendoptCOMBOlinear_decrease3 options: constant, linear_decrease, linear_increase
start_stepoptINT00–200
end_stepoptINT150–200

Outputs (1)

NameTypeDescription
samplesLATENT