Nodes/ComfyUI-Fluxtapoz/Flux Attention Override
ComfyUI Node Runs on cloud

Flux Attention Override

Pick which attention layers the pack's tricks run on

By logtd·Created 2 years ago·Updated 2 years ago· 1,392
Flux Attention Override
    • ATTN_OVERRIDE
    • DOUBLE_LAYERS
    • SINGLE_LAYERS
    double_blocks
    single_blocks

    FluxAttnOverride is the pack's layer-selector. Several other nodes - PAGAttention, SEGAttention, ApplyRegionalConds - take an optional ATTN_OVERRIDE that decides which of Flux's attention blocks they patch. By default they pick sensible layers for you; this node is for when you want to hand-pick. It also produces the layer lists (DOUBLE_LAYERS, SINGLE_LAYERS) that the RF-Edit samplers consume, so it's genuinely two tools in one box.

    How it works

    Flux's transformer has two block families: double blocks (0–19, where image and text streams mix) and single blocks (0–39, the joint stream). The node takes two multiline text fields, parses comma-separated integers out of each, and packages them:

    • double_blocks (STRING, multiline) - e.g. 1, 3, 5 for the double blocks to patch.
    • single_blocks (STRING, multiline) - e.g. 0, 2, 4 for the single blocks.

    Outputs:

    • ATTN_OVERRIDE - feeds the attn_override port on PAGAttention, SEGAttention and ApplyRegionalConds.
    • DOUBLE_LAYERS - a boolean-per-layer list, feeds double_layers on the RF-Edit samplers.
    • SINGLE_LAYERS - the single-block list, feeds single_layers.

    The default layer choices elsewhere in the pack are instructive: PAG and SEG patch single block 0 by default, regional prompting uses the odd double and odd single blocks. Start from those and only override when you're specifically chasing an artifact or a speed change.

    When to reach for it

    • You're using PAG/SEG and getting artifacts - the "perturbed" block choice is doing something aggressive; restricting the override to fewer blocks (or different ones) changes the character of the guidance.
    • You want RF-Edit to bank/inject attention from a subset of layers rather than all of them, which can reduce drift and speed things up.
    • You're stacking regional + PAG + SEG and need each to operate on disjoint layers so they don't fight.

    Installation

    Same as every node in the pack: ComfyUI Manager → search "ComfyUI-Fluxtapoz" → install → restart, or git clone https://github.com/logtd/ComfyUI-Fluxtapoz into custom_nodes. Only einshape, no models to download.

    Common issues

    • Blank override = no effect. If a field is empty, that family gets no blocks patched. You can exploit this to disable one family, but if you meant to patch everything, leaving the field empty does the opposite.
    • Non-integer garbage is silently ignored. The parser only keeps strings that parse as integers, so a typo like 1, 2, x just drops the x without an error. Check your commas if something seems off.
    • Out-of-range indices are also ignored, so there's no crash - just a smaller effective selection.

    It's a power-user node. You can do the whole pack's workflows without ever touching it; when you do touch it, it's because you're chasing a specific behavior rather than a default.

    Categoryfluxtapoz/attn

    Inputs (2)

    NameTypeDefaultDescription
    double_blocksSTRING
    single_blocksSTRING

    Outputs (3)

    NameTypeDescription
    ATTN_OVERRIDEATTN_OVERRIDE
    DOUBLE_LAYERSDOUBLE_LAYERS
    SINGLE_LAYERSSINGLE_LAYERS