UNetCrossAttentionMultiply_motorway_edition
A scalpel for how hard the prompt steers your image
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Here's a node for the tinkerers: it takes your diffusion model and multiplies the cross-attention tensors by hand-set scalars. Cross-attention is where your text prompt meets the image - the attn2 layers - so multiplying those values up or down changes how aggressively the prompt drives the result. The stock UNetCrossAttentionMultiply lives under _for_testing/attention_experiments in core ComfyUI for a reason: it's a debugging toy and a research tool, not a daily driver. This _motorway_edition clone is that same toy, wired into the agilly1989 Motorway pipe.
If the Motorway is new to you: it's a pipe system where you start with MotorwayStart and each _motorway_edition node reads inputs from and writes outputs to a shared dict via short key strings, instead of dragging wires. These nodes are auto-generated clones of ComfyUI's own classes, so the internals are unchanged.
What it does. The node patches the model so that at every cross-attention step, the query, key, value, and output tensors get multiplied by the values you give it: q, k, v, out, each defaulting to 1.0 (neutral) with a range of 0 to 10. Everything at 1.0 and the node changes nothing - you're literally multiplying by identity. Push q or k down and attention maps get flatter, weakening prompt adherence; crank them up and the model leans harder on the text. The effects are subtle and model-dependent, which is the honest description of the whole attention-multiply family.
The inputs that matter. MOTORWAY is required. INPUT_model_key (default model) is where your base model sits in the dict - and again, loaders store it under MODEL uppercase by default, so retype it if your first run comes up empty. The four float sliders are the experiment. OUTPUT_MODEL_key (default MODEL) is where the patched model gets stored for the sampler. Single output: the MOTORWAY port.
Common issues. Treat this as experimental, because it is. There's no "correct" setting - people tune these by eye, and what works on one checkpoint does nothing on another. The usual Motorway traps apply: keys are exact-match and case-sensitive, and 'MotorwayClass' object has no attribute 'hash_' means you referenced a key that was never stored. Also, cross-attention multiply is one of those ideas that shows up in threads as a curiosity rather than a reliable style tool - if you're chasing a specific look, a LoRA is almost always the better spend of an afternoon. And the standard caveat: if the node isn't in your menu, the pack's current main branch has the clone registration commented out in __init__.py.
Install via ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or clone into custom_nodes. No models, no dependencies, restart after installing. Solo-dev beta pack - fine as a sandbox for experiments like this, and this node is squarely in "play with it, then move on" territory.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_model_key | STRING | model | — |
| q | FLOAT | 1.000–10 | — |
| k | FLOAT | 1.000–10 | — |
| v | FLOAT | 1.000–10 | — |
| out | FLOAT | 1.000–10 | — |
| OUTPUT_MODEL_key | STRING | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |