Nodes/ComfyUI_agilly1989_motorway/UNetTemporalAttentionMultiply_motorway_edition
ComfyUI Node

UNetTemporalAttentionMultiply_motorway_edition

The temporal-attention knob for video models

By agilly1989·Created 2 years ago·Updated about a year ago· 7
UNetTemporalAttentionMultiply_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_model_keymodel
self_structural1.00
self_temporal1.00
cross_structural1.00
cross_temporal1.00
OUTPUT_MODEL_keyMODEL

Video models aren't just image models with more frames bolted on. They carry temporal attention layers - a time_stack where each frame looks at its neighbors to keep motion coherent across time. This node multiplies the weights of those temporal layers (and the plain structural ones) by hand-set scalars, so you can dial how strongly the model enforces "things should move like a coherent scene" versus "every frame is its own thing." The stock UNetTemporalAttentionMultiply sits under _for_testing/attention_experiments, and this _motorway_edition clone runs it through the agilly1989 Motorway pipe.

Motorway, quickly: start with MotorwayStart, then each _motorway_edition node reads inputs from and writes outputs to a shared dict via key strings, all flowing down one MOTORWAY connection. These nodes are auto-generated clones of core ComfyUI nodes, so the internals are unchanged from stock.

What it does. Instead of q/k/v/out like its siblings, this one gives you four scalars for the four attention flavors in a video model: self_structural, self_temporal, cross_structural, and cross_temporal, all defaulting to 1.0 (range 0–10). Structurally, the node patches attn1/attn2 output weights - the temporal ones get scaled where the weights live in the time_stack, the structural ones everywhere else. Crank self_temporal and the model leans harder on frame-to-frame consistency; drop it and motion gets looser, more "each frame reacts to the prompt independently." It's a subtle, experimental lever, and it only does anything on models that actually have temporal attention.

The inputs that matter. MOTORWAY is required, INPUT_model_key (default model) says where the base video model lives in the dict - loaders store it under uppercase MODEL by default, so watch the case. The four floats are the experiment. OUTPUT_MODEL_key (default MODEL) is where the patched model goes for the sampler. Output: the MOTORWAY port only.

Common issues. First: if your model has no temporal attention, this node changes nothing - it's a no-op by design, not a bug. Second, these multipliers are very easy to overshoot; a value of 2 can produce visibly jittery or oddly stiff motion, and there's no principled way to pick values, just eyeballing. The usual Motorway traps apply too: keys are exact-match and case-sensitive, and 'MotorwayClass' object has no attribute 'hash_' means you asked for a key that was never stored. Also, the pack's current main branch has the clone registration commented out in __init__.py - if the node's missing from your menu, that's the version you're on.

Install via ComfyUI Manager (search "ComfyUI_agilly1989_motorway") or clone into custom_nodes. No models, no dependencies. It's a solo-dev beta pack, and a node this experimental is best treated as a sandbox toy: interesting to poke at on a Wan or SVD workflow, not something you'll want in every graph.

Categoryagilly1989 Nodes/Motorway-ed/_for_testing/attention_experiments

Inputs (7)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_model_keySTRINGmodel
self_structuralFLOAT1.000–10
self_temporalFLOAT1.000–10
cross_structuralFLOAT1.000–10
cross_temporalFLOAT1.000–10
OUTPUT_MODEL_keySTRINGMODEL

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨