Nodes/ComfyUI-RAVE Attention/Attention Override (SDXL)
ComfyUI Node

Attention Override (SDXL)

The on/off switches for RAVE self-attention

By logtd·Created 2 years ago·Updated 2 years ago· 13
Attention Override (SDXL)
    • ATTN_OVERRIDE
    input_4true
    input_5true
    input_7true
    input_8true
    middle_0true
    output_1true
    output_2true
    output_3true
    output_4true
    output_5true

    This node is not the star of the show. It's the tuning box that rides alongside Apply Rave Attention, and on its own it does absolutely nothing - no effect, no output worth wiring anywhere except one socket. But the moment you're fighting artifacts in an SDXL img2vid or AnimateDiff run, it's the difference between "RAVE everywhere, warts and all" and "RAVE exactly where I want it."

    What it actually does: it builds an ATTN_OVERRIDE object that plugs into the optional attn_override socket on ApplyRaveAttentionNode. Each of its toggles maps to one self-attention block inside the SDXL UNet, split across the encoder (input_), the middle block, and the decoder (output_) stages. Tick a box and RAVE's grid-shuffle attention gets patched into that block; untick it and that block just runs normal attention.

    The exposed blocks are input_4, input_5, input_7, input_8, middle_0, and output_1 through output_5, all defaulting to true. Two things are worth knowing about that list.

    First, it's a subset of the UNet's blocks, not the whole thing. Leave the node unconnected and Apply Rave Attention patches the full input and output ranges by default. Wire one of these in with every box ticked and you get RAVE on this narrower set - presumably the blocks the author's testing showed do the heavy lifting for temporal consistency. Don't expect "all on" to be identical to "no override," because it isn't.

    Second, the one toggle beginners actually reach for is middle_0. The middle block has an outsized influence on composition, and if your SDXL output starts looking too "gridded" - frames too eager to borrow structure from each other - killing just that block often fixes it while keeping motion steady. The rest are for when a specific depth of the UNet is producing garbage: flip one off, resample, see if it was the culprit.

    The single output is one ATTN_OVERRIDE wire into Apply Rave Attention. Nothing else connects here, and there are no other inputs.

    Installation is the whole-pack story: ComfyUI Manager (search "ComfyUI-RAVE Attention") or cd ComfyUI/custom_nodes && git clone https://github.com/logtd/ComfyUI-RAVE_ATTN, then restart ComfyUI. There's no requirements.txt, no model downloads, no extra packages - it runs on torch and einops, both already in ComfyUI.

    Where people get burned: they toggled boxes, saw no change, and assumed the node was broken. Usually the attn_override socket on Apply Rave Attention was left unconnected - it's optional, so the workflow silently ran with everything on. Check that wire first. And don't go hunting for SD1.5's output_6 toggle here; this is the SDXL variant with fewer exposed blocks. The SD1.5 version is its own node.

    Categoryattention

    Inputs (10)

    NameTypeDefaultDescription
    input_4BOOLEANtrue
    input_5BOOLEANtrue
    input_7BOOLEANtrue
    input_8BOOLEANtrue
    middle_0BOOLEANtrue
    output_1BOOLEANtrue
    output_2BOOLEANtrue
    output_3BOOLEANtrue
    output_4BOOLEANtrue
    output_5BOOLEANtrue

    Outputs (1)

    NameTypeDescription
    ATTN_OVERRIDEATTN_OVERRIDE