Nodes/cgem156-ComfyUI๐ŸŒ/Attention Scale ๐ŸŒ
ComfyUI Node

Attention Scale ๐ŸŒ

An experimental attention-temperature knob, filed as a test node

By laksjdjfยทCreated 2 years agoยทUpdated about a month agoยท 93
Attention Scale ๐ŸŒ
  • model
  • MODEL
โ—„temperature1.00โ–บ
โ—„start_step0.000โ–บ
โ—„end_step1.000โ–บ
โ—„attn1trueโ–บ
โ—„attn2trueโ–บ

Worth saying up front: in the pack's own node registry, this one lives under for_test, not under a named feature folder like the pack's other nodes. That's the author's own filing, not a guess - treat it as an experiment you can poke at, not a documented, supported feature with a known best-use case.

What it appears to do

Based on its inputs, this patches a model to scale attention by a "temperature" factor - turning attention weights sharper or softer than the model computed on its own - over a chosen portion of the sampling schedule, and lets you pick whether that applies to self-attention, cross-attention, or both. That's a real and studied idea in diffusion research broadly (adjusting how peaked or diffuse attention is can change how sharply the model commits to details), but the pack doesn't document what values actually do here, and there's no community track record to lean on for this specific node - it's genuinely a "load it and see" tool.

Inputs and outputs that matter

  • model - the model to patch.
  • temperature (default 1, range โˆ’1000 to 1000) - the attention-scaling factor. The wide range and the default of exactly 1 (a neutral/no-op-like value in most temperature-scaling schemes) is a strong hint that values near 1 are "normal" and you're meant to nudge gently rather than jump to the extremes the slider technically allows.
  • start_step / end_step (0โ€“1, defaults 0 and 1) - the fraction of the sampling schedule the effect is active over, expressed as a 0-to-1 range rather than raw step counts.
  • attn1 / attn2 (both default on) - toggle which attention mechanism the scaling applies to; turning one off narrows the effect to just the other.
  • Output: MODEL, patched.

Installing it

ComfyUI Manager โ†’ search cgem156-ComfyUI๐ŸŒ โ†’ install โ†’ restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI

then restart ComfyUI. Nothing extra to download for this node.

Common issues & troubleshooting

Not sure it's doing anything, or doing something you can explain. That's consistent with its for_test status - this isn't a node with a settled "here's what it fixes" story. If you're chasing a specific, well-understood outcome (sharper detail, better composition, fixed anatomy), there are better-documented tools elsewhere in this pack and in the wider ecosystem for those specific problems; reach for this one out of curiosity, not as a fix for something concrete.

Extreme values break the image outright. With a range stretching to ยฑ1000 against a neutral default of 1, it's very easy to push temperature far outside anything the model was ever exposed to. If output goes to noise or solid color, you've gone too far - walk it back toward 1 in small increments.

Wondering whether to build a workflow around it. Given it's an internal test node with no README section of its own, treat anything that works well here as something to verify holds up across seeds and prompts before relying on it - this is exploratory territory, not a documented technique with community-verified defaults.

Categorycgem156 ๐ŸŒ/for_test

Inputs (6)

NameTypeDefaultDescription
modelMODELโ€”
temperatureFLOAT1.00-1000โ€“1000โ€”
start_stepFLOAT0.0000โ€“1โ€”
end_stepFLOAT1.0000โ€“1โ€”
attn1BOOLEANtrueโ€”
attn2BOOLEANtrueโ€”

Outputs (1)

NameTypeDescription
MODELMODELโ€”