Nodes/ComfyUI-Fluxtapoz/RF-Edit Single Layers Override
ComfyUI Node Runs on cloud

RF-Edit Single Layers Override

The single-block switches do the heavy lifting

By logtd·Created 2 years ago·Updated 2 years ago· 1,392
RF-Edit Single Layers Override
    • SINGLE_LAYERS
    0false
    1false
    2false
    3false
    4false
    5false
    6false
    7false
    8false
    9false
    10false
    11false
    12false
    13false
    14false
    15false
    16false
    17false
    18false
    19false
    20true
    21true
    22true
    23true
    24true
    25true
    26true
    27true
    28true
    29true
    30true
    31true
    32true
    33true
    34true
    35true
    36true
    37true

    Of the two layer-override knobs in the Fluxtapoz RF-Edit workflow, this is the one you'll actually touch. RFSingleBlocksOverride ("RF-Edit Single Layers Override") gives you 38 switches - one per single block in Flux's transformer - and the author's defaults already have 18 of them on. It's the main dial for the thing people complain about most with image editing: "the style changed, but so did my subject's face."

    The mechanism is shared with its sibling RFDoubleBlocksOverride, so the setup is the same story. RF-Edit is logtd's implementation of RF-Solver-Edit. The RF-Edit Forward Sampler unsamples your image to noise and, during its final save_steps, copies attention values from whichever layers you've switched on into an attention bank. The RF-Edit Reverse Sampler then regenerates with your new prompt and re-injects those exact values during its first inject_steps. Switch on = that layer's attention is pinned to the original, so its structure survives the edit. Switch off = the layer regenerates freely and the prompt gets more room to act.

    Why single blocks are where the likeness lives: after the 19 double blocks (image and text mixed together) come 38 single blocks that refine the image stream on its own - local shape, edges, the detail that decides whether the person in the output still looks like the person in the input. The defaults enable blocks 2037 and leave 019 off. That's the author's tuned starting point: the deeper single blocks carry the composition worth preserving, the shallow ones stay free so the edit has room to move.

    That maps directly onto the classic RF-Edit complaint. A common scene: you're restyling a photo with a style LoRA and the workflow nails the look but quietly swaps your subject's features - people describe it as "I want at least 90% likeness." The answer is exactly this node. If the features drift, flip on the shallow single blocks (019) that default to off; each one you enable pins more of the original's local structure in place. If the result feels stiff and uneditable, flip the deeper ones off instead. Start with a couple at a time, not all eighteen at once.

    Wiring it up: the output, SINGLE_LAYERS, feeds the single_layers input on both the RF-Edit Forward Sampler and the RF-Edit Reverse Sampler. Run the same node's output to both. If the forward and reverse passes disagree on the layer set, the reverse silently skips whatever wasn't banked - you think you configured preservation and it quietly isn't happening.

    Installing it is just installing the pack. In ComfyUI Manager, search "Fluxtapoz", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/logtd/ComfyUI-Fluxtapoz
    

    Then restart ComfyUI. The only pip dependency is einshape; the real requirement is a working FLUX.1 dev stack, since none of this does anything without the model files.

    Two gotchas worth knowing. First, if you toggle switches and see zero difference, check save_steps and inject_steps before you blame the node - injection only happens inside those windows, and if inject_steps is set higher than save_steps the reverse sampler raises an error telling you to save at least as many steps as you inject. Second, don't expect the example workflows to use this node - they run on the sampler defaults, so this is purely an optional tuning layer for when the default preservation balance isn't right for your image.

    Categoryfluxtapoz

    Inputs (38)

    NameTypeDefaultDescription
    0BOOLEANfalse
    1BOOLEANfalse
    2BOOLEANfalse
    3BOOLEANfalse
    4BOOLEANfalse
    5BOOLEANfalse
    6BOOLEANfalse
    7BOOLEANfalse
    8BOOLEANfalse
    9BOOLEANfalse
    10BOOLEANfalse
    11BOOLEANfalse
    12BOOLEANfalse
    13BOOLEANfalse
    14BOOLEANfalse
    15BOOLEANfalse
    16BOOLEANfalse
    17BOOLEANfalse
    18BOOLEANfalse
    19BOOLEANfalse
    20BOOLEANtrue
    21BOOLEANtrue
    22BOOLEANtrue
    23BOOLEANtrue
    24BOOLEANtrue
    25BOOLEANtrue
    26BOOLEANtrue
    27BOOLEANtrue
    28BOOLEANtrue
    29BOOLEANtrue
    30BOOLEANtrue
    31BOOLEANtrue
    32BOOLEANtrue
    33BOOLEANtrue
    34BOOLEANtrue
    35BOOLEANtrue
    36BOOLEANtrue
    37BOOLEANtrue

    Outputs (1)

    NameTypeDescription
    SINGLE_LAYERSSINGLE_LAYERS