LTX Attn — QKV Multiplier
The live, no-capture ablation knob
- model
- steered_model
Every other intervention node in this pack needs a prior capture - the whole two-run dance. QKV Multiplier doesn't. It's a live multiply: scale the attention sharpness and/or output magnitude of targeted heads while the generation runs, no store, no setup. That makes it the fastest way to test "what if I kill this head?" - the profiling-then-freeze loop collapses into a single run.
Its two knobs are also the pack's clearest lesson in what attention math actually does, so this node doubles as a crash course:
qk_multrescales the softmax logits before attention weights are computed. It changes how sharp or flat the head's attention distribution is. Setting it to 0 does not ablate the head - it makes it attend uniformly over every key, and it still contributes via V. You made it unfocused, not dead.vo_multscales the head's actual contribution to the residual stream - V before theattn_weights @ Vmatmul, equivalently the head's slice of the output after (linear in V, so same net effect). Setting it to 0 is a true ablation: that head genuinely stops contributing.
So: vo_mult to kill or amplify a head; qk_mult to experiment with attention sharpness. The tooltips in the node spell this out, and it's worth trusting them over your first instinct. There's deliberately no separate q_mult/k_mult or v_mult/o_mult pair - Q and K are each a uniform per-head scalar, so only their product shows up in the logits, hence one qk_mult; same logic collapses V/O into vo_mult.
The inputs that matter
targets- same format as Head Freeze/QKV Transfer:block:head | block:h1,h2 | block:all | all. A whole-stringalltargets every block (0–47) and head (0–31). Multipliers are shared across all targets.apply_sa/apply_ca- which attention types get scaled.qk_mult/vo_mult- the two knobs above, range −10 to 10, default 1.0 (no-op). Note negatives are allowed - you can invert a head's contribution, which is a very particular kind of torture test.from_step/to_step- the denoising step window the multiply is active for (defaults to full range 0–999).
Output is a single steered_model MODEL.
Disable by blanking
Same house rule as the other intervention nodes: clear targets to disable, don't use bypass/mute. This node patches the shared diffusion_model, and bypass/mute skips the code that unwraps its layer, leaving the multiplier in effect on later runs while looking disabled. Blank targets runs the cleanup reliably. LTX Reset Patches is the sweep if you've orphaned a layer.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/g-raw/ComfyUI-LTX-Attention-Toolkit.git
Restart ComfyUI. No extra dependencies, no model files, no capture store required - this is the lowest-friction node in the pack to try. Work-in-progress caveat applies to the pack as a whole.
Common issues
The main trap is conceptual, not mechanical: reach for vo_mult=0 when you want to ablate a head, because qk_mult=0 just makes it a uniform attender and the result confuses people ("I zeroed it and nothing changed" - right, it's still contributing). Because it's live, it also stacks with other intervention nodes if you chain them - that's supported (each node registers its own layer), but remember each one also needs its own disable-by-blanking when you're done.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| targets | STRING | 24:8 | Same format as Head Freeze/QKV Transfer's targets: paste Head Candidates' candidates_csv directly (one 'block,head' per line), or type manually as 'block:head | block:h1,h2,... | block:all | ...'. A whole-string 'all' (or 'all:all') targets every block (0-47) and head (0-31). No prior capture needed -- this is a live multiply, not a replay. Leave blank to disable entirely -- this is the reliable way to turn it off; ComfyUI's node bypass/mute skips this node's cleanup, so the diffusion_model (shared across runs) can be left patched from a previous run. |
| apply_sa | BOOLEAN | true | — |
| apply_ca | BOOLEAN | true | — |
| qk_mult | FLOAT | 1.00-10–10 | Scales Q for the targeted heads before the attention dot product -- changes attention sharpness (softmax logit scale), not the head's output magnitude. 0 makes the head attend uniformly over all keys, it does NOT ablate it (still contributes via V). Scaling Q and K separately would be redundant -- both are uniform per-head scalars, so only their product changes the logits, hence a single knob. |
| vo_mult | FLOAT | 1.00-10–10 | Scales the targeted head's output (V before the attn_weights@V matmul, equivalently the head's slice of the output after -- same net effect either way since the matmul is linear in V, hence a single knob). Directly scales the head's contribution to the residual stream. 0 zeroes it out (true ablation). |
| from_step | INT | 00–999 | Denoising step (per targeted block) to start applying from. Defaults to the full range. |
| to_step | INT | 9990–999 | Denoising step (per targeted block) to stop applying at, inclusive. Defaults to the full range. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| steered_model | MODEL | — |