Flux Reverse ODE Sampler
Walk noise back into your image
- model
- latent_image
- SAMPLER
FluxReverseODESampler is where RF-Inversion actually lands. The forward sampler turned your image into noise; this one walks back through the ODE, from noise toward a target latent, under a new or edited prompt. Done right you get the original image's composition back with the prompt's changes baked in - swap the outfit, change the lighting, restyle the whole thing - instead of a fresh unrelated generation that just shares a seed.
How it works
It implements the "Controlled Reverse ODE" (Algorithm 2 in the RF-Inversion paper), which is the mirror of the forward pass. At each step the sampler computes the unconditional vector field, the conditional vector field pointing toward your original image latent y0, and blends them by a per-step strength eta (default 0.8). Eta is the big dial: it decides how much the reverse trajectory is pulled back toward the original image versus how freely it follows the new prompt. Crank eta up and edits stay close to the source; drop it and the model gets creative (and loses the source).
Three inputs are worth actually touching:
- latent_image (LATENT) - your original image, VAE-encoded. This is the target the reverse walk steers toward.
- eta (FLOAT) - the steering strength. The community's number-one tuning knob.
- start_step / end_step (INT) - which sampling steps get controlled. The default is
start 0, end 5, meaning only the first five steps get eta steering; after that the sampler runs uncontrolled. Shorten the window for looser edits, lengthen it for tighter ones.
There's also eta_trend with constant, linear_increase and linear_decrease - it shapes how eta is applied across the window rather than at a fixed level. Constant is the default and the place to start.
Outputs and wiring
You get a SAMPLER, which feeds the sampler port of a SamplerCustomAdvanced node (not KSampler). In the pack's example_rf_inversion_updated.json, the forward and reverse samplers run as two branches and the reverse one does the final decode. ConfigureModifiedFlux must be upstream of the model, and FluxDeGuidance sets the guidance value if you're on Flux Dev.
Installation
Same as every node here: ComfyUI Manager → search "ComfyUI-Fluxtapoz" → install → restart, or clone https://github.com/logtd/ComfyUI-Fluxtapoz into custom_nodes. einshape installs itself, no models to fetch.
Common issues
- Identity drift on real faces. This is the classic RF-Inversion complaint, and it's the eta/end_step interplay, not a bug. If faces come back as "someone who looks adjacent," tighten eta (closer to 1.0) and widen the end_step window so the control lasts longer. People use XYZ plots to sweep eta × end_step for exactly this reason.
- Edits that don't change anything usually mean eta is so high the reverse walk just redraws the original. Back eta off a touch.
- Output goes through SamplerCustomAdvanced, not KSampler. If you're used to a normal sampler slot, this trips people constantly.
RF-Inversion is fiddly the first evening and genuinely good after that - the reverse sampler is where 80% of your tuning happens.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| latent_image | LATENT | — | |
| eta | FLOAT | 0.800–100 | — |
| start_step | INT | 00–1000 | — |
| end_step | INT | 50–1000 | — |
| eta_trendopt | COMBO | 3 options: constant, linear_increase, linear_decrease |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SAMPLER | SAMPLER | — |