RF-Edit Reverse Sampler
The RF-Edit half that injects the saved attention and rebuilds
- attn_inj
- single_layers
- double_layers
- SAMPLER
FlowEditReverseSampler is where an RF-Edit comes together. It takes the attention bank that FlowEditForwardSampler recorded, regenerates your latent from noise, and for the first inject_steps forces the model's attention to match what it was looking at during the forward pass. The result is an edit that keeps the original image's structure - layout, objects, composition - while following a changed prompt. This is the node the pack's author explicitly says to try alongside RF-Inversion, because for some images and edits it behaves better.
How it works
The reverse pass runs the same second-order solver as the forward one, but instead of saving attention it injects it. Each step, the sampler tells the model "for this transformer layer, use the keys/values from the forward run's bank" for as long as inject_steps holds. Once the injection window closes, the sampler runs free - which is the edit taking over. The order input (second default, fireflow alternative) must match the forward sampler's choice; mixing them is a recipe for weird output.
The inputs:
- attn_inj (ATTN_INJ) - the bank from FlowEditForwardSampler. This is required and is the whole point of the node.
- inject_steps (INT, default 0) - how many steps of the reverse walk use the saved attention. This is your main strength dial: more injection = more fidelity to the original, less = more freedom for the new prompt.
- single_layers / double_layers - layer selection, same defaults as the forward node. Keep them matching.
- order - must mirror the forward sampler's setting.
Output
One SAMPLER, into SamplerCustomAdvanced. The ATTN_INJ from the forward node should route through PrepareAttnBank first - it's a pass-through that exists purely to force ComfyUI to execute the forward sampler before this one, and skipping it can produce silent garbage when the bank arrives empty.
Installation
The pack's standard install: ComfyUI Manager → search "ComfyUI-Fluxtapoz" → install → restart, or git clone https://github.com/logtd/ComfyUI-Fluxtapoz into custom_nodes. Only einshape as a dependency, no models to download.
Common issues
- "You must save at least as many steps as you want to inject." That's the actual error message the node throws when inject_steps exceeds the forward sampler's save_steps. The fix is always to raise save_steps, not lower inject_steps, if you want more fidelity.
- Identity drift with style LoRAs. This is the well-known RF-Edit pain point - pushing a style through tends to move faces and likeness around. More inject_steps pins structure better; people who need tight likeness also add a ControlNet on the source to hold composition.
- order mismatch between forward and reverse produces unstable results. Set both to
secondor both tofireflow.
RF-Edit is genuinely a different flavor of editing than RF-Inversion - try both, as the README suggests, because some images just behave better on one than the other. This node is the half you'll actually tune.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| attn_inj | ATTN_INJ | — | |
| inject_steps | INT | 00–1000 | — |
| single_layersopt | SINGLE_LAYERS | — | |
| double_layersopt | DOUBLE_LAYERS | — | |
| orderopt | COMBO | 2 options: second, fireflow |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SAMPLER | SAMPLER | — |