Efficient Attention (PoP)
Don't let the name fool you, this isn't xformers
- model
- MODEL
Get the expectations right before anything else: "efficient" in this node's name does not mean what it means for xformers or flash-attention. Those exist to make attention faster and lighter on VRAM without changing the output. This node patches your model's attention layers and blends in something new, and the author's own README is disarmingly honest about not fully understanding what: "I'll be honest, I haven't fully figured it out myself. But it does some very interesting things." Read that as your operating instructions - this is an exploratory, creative attention modifier you experiment with for a different look, not a speed optimization you flip on for free performance.
How it works
It hooks into ComfyUI's model-patching system on both self-attention and cross-attention layers and blends your model's normal attention output toward an "efficient" variant, controlled by strength as a straight interpolation - at strength 0 you get 100% original output, and the modified path only starts contributing as you raise it. The attention_variant option picks the computation used for that alternate path (default or linear). Past that, the extra parameters - dropout, layer norm, an init method for the internal weights, a scaling factor, and an optional warmup - read like genuine neural-network-training knobs (Xavier/He/orthogonal weight initialization, dropout regularization) bolted onto an inference-time patch. That's an unusual thing to find in a node meant to run at generation time rather than during training, and it's a good part of why the author calls it experimental - you're not fine-tuning a stable, well-understood technique, you're perturbing attention with structure that's normally used to train a network, applied instead as a one-shot creative filter.
The README's own compatibility note is worth taking at face value: it works cleanly on SD 1.5 and SDXL, but "doesn't cooperate with SD3."
The inputs and outputs that matter
modelin,modelout - patches your model and hands back a modified one for your KSampler.strength(default 0, range 0–2) - the actual on/off switch in practice. Leave it at 0 and this node does nothing at all; that's the first thing to check if you added it and saw no change.attention_variant-defaultorlinear, which computation the patched path uses.use_dropout/dropout_rate,use_layer_norm,init_method(none/xavier/he/orthogonal),scaling_factor- internals for the patched attention path. Worth experimenting with once you've found astrengththat does something you like, but there's no documented "correct" setting for any of these - this is trial and error territory.use_warmup,warmup_steps,warmup_type(linear_up/linear_down/cosine_up/cosine_down) - instead of applying full strength from the first sampling step, ramps it in or out over a schedule. Useful if a full-strength effect from step one looks too abrupt.
How to install it
ComfyUI Manager: search "comfy_PoP", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/picturesonpictures/comfy_PoP
No extra dependencies beyond what ComfyUI and PyTorch already provide - everything here runs on the same stack as the rest of your workflow.
Common issues & troubleshooting
Nothing changes. Check strength first - it defaults to 0, which is a genuine no-op by design.
Breaks or does nothing useful on SD3. Matches the README directly - SD3 compatibility is a known gap, not something you're doing wrong. SD 1.5 and SDXL are the tested-working combos.
Output gets unstable or noisy at higher strength. Expected, given what this node actually does - you're blending in an attention path built from randomly-initialized layers, not a trained optimization. Back strength down, or lean on use_warmup to ease into the effect rather than applying it at full force from the first step.
Looking for an actual speed/VRAM win instead. This is the wrong node for that - it doesn't reduce memory or computation, it changes output character. For genuine efficiency gains look at attention backends like xformers or sage attention instead, which are a different category of tool entirely despite the name overlap here.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| strength | FLOAT | 0.000–2 | — |
| attention_variant | COMBO | default | 2 options: default, linear |
| use_dropout | BOOLEAN | false | — |
| dropout_rate | FLOAT | 0.000–0.5 | — |
| use_layer_norm | BOOLEAN | false | — |
| init_method | COMBO | none | 4 options: none, xavier, he, orthogonal |
| scaling_factor | FLOAT | 1.00.1–10 | — |
| use_warmup | BOOLEAN | false | — |
| warmup_steps | INT | 00–500 | — |
| warmup_type | COMBO | linear_up | 4 options: linear_up, linear_down, cosine_up, cosine_down |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |