RF-Edit Double Layers Override
The 19 double-block switches that decide how much of your original survives an RF-Edit
- DOUBLE_LAYERS
When an RF-Edit comes back almost right - subject there, pose held, but the details have drifted - the fix lives in this node. RFDoubleBlocksOverride ("RF-Edit Double Layers Override") is a row of nineteen switches, one per double block in Flux's transformer, and each one decides whether that layer's attention gets carried over from your original image or gets to regenerate freely under the new prompt.
Here's what it's doing. In the Fluxtapoz pack, RF-Edit is logtd's implementation of RF-Solver-Edit (the "Taming Rectified Flow for Inversion and Editing" paper). The workflow runs your image backwards through the ODE with the RF-Edit Forward Sampler, turning it into noise, then samples back up with a new prompt using the RF-Edit Reverse Sampler. Between those two passes, attention values from the original get saved into a bank and then re-injected. That injection is what holds the composition together - without it, an "edit" would just be generating something that happens to start from your colors.
The mechanism is dead simple once you see it: during the forward pass, for the last save_steps, the enabled layers' attention values get copied into the bank. During the reverse pass, for the first inject_steps, those exact values are forced back into the same layers. Switch on = preserved. Switch off = free. There's no model training, no ControlNet, no hidden API - just attention maps moving between two sampling passes.
Flux's transformer has 19 double blocks (indices 0–18) that process the image and text streams jointly, then 38 single blocks. This node covers only the double blocks, and the author's default is all nineteen off. So a stock RF-Edit workflow preserves structure entirely through the single blocks - you reach for the double-layer switches when you want the text–image coupling itself locked down, or when the single blocks alone aren't holding the composition.
The inputs that matter: nineteen booleans, 0 through 18, all defaulting to false. No tooltips, no widgets - it's a config builder. The output, DOUBLE_LAYERS, wires into the double_layers input on both the RF-Edit Forward Sampler and the RF-Edit Reverse Sampler. Use the same node's output for both: if the forward pass banks attention for layers the reverse pass isn't looking up (or vice versa), the reverse silently skips them and your edit gets looser than you think you configured.
Installing it is installing the whole pack. In ComfyUI Manager, search "Fluxtapoz" and hit install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/logtd/ComfyUI-Fluxtapoz
Then restart ComfyUI. The only Python dependency is einshape, a tiny tensor-reshape helper - the genuinely heavy prerequisite is Flux itself, so this is dead weight without a working FLUX.1 dev stack (the 12B transformer, T5 and CLIP encoders, and VAE) already on your disk.
Where people get burned: flip too many double blocks on and the edit fights the new prompt - the injected text–image attention refuses to let go of the old composition. Flip them off entirely and you're back at the default, which is fine for most edits. And if you've banked many steps at high resolution, watch your host RAM: the bank stores values on CPU, off the GPU, which keeps VRAM safe but can add up. The pack's example workflows run perfectly without touching this node - it's a tuning knob for when "good enough" isn't.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| 0 | BOOLEAN | false | — |
| 1 | BOOLEAN | false | — |
| 2 | BOOLEAN | false | — |
| 3 | BOOLEAN | false | — |
| 4 | BOOLEAN | false | — |
| 5 | BOOLEAN | false | — |
| 6 | BOOLEAN | false | — |
| 7 | BOOLEAN | false | — |
| 8 | BOOLEAN | false | — |
| 9 | BOOLEAN | false | — |
| 10 | BOOLEAN | false | — |
| 11 | BOOLEAN | false | — |
| 12 | BOOLEAN | false | — |
| 13 | BOOLEAN | false | — |
| 14 | BOOLEAN | false | — |
| 15 | BOOLEAN | false | — |
| 16 | BOOLEAN | false | — |
| 17 | BOOLEAN | false | — |
| 18 | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DOUBLE_LAYERS | DOUBLE_LAYERS | — |