Nodes/10S-Comfy-nodes/πŸ”Š LTX Text Attention Amplifier
ComfyUI Node

πŸ”Š LTX Text Attention Amplifier

Crank the prompt's grip during LTX2 upscale passes

By TenStripΒ·Created 4 months agoΒ·Updated 26 days agoΒ· 244
πŸ”Š LTX Text Attention Amplifier
  • model
  • model
β—„text_amplification1.30β–Ί
β—„spatial_focus0.00β–Ί
β—„block_index_filterβ–Ί
β—„bypassfalseβ–Ί
β—„debugfalseβ–Ί

Here's a failure mode you'll recognize if you've done a real LTX2 upscale pass: the base generation follows the prompt fine, then you hit it with a second pass on a 2Γ— upscaled latent and the output starts drifting - hue shifts, colors bleeding, the prompt's grip loosening frame by frame. LTX Text Attention Amplifier is a band-aid for exactly that, and an honest one: it doesn't fix the root cause, it makes the prompt louder to compensate.

The root cause is a token-count problem. Upscaling the latent 2Γ— means 4Γ— the spatial tokens, so each token gets roughly a quarter of the per-token text-conditioning influence the model was trained with. The pack's LTX Tiled Sampler fixes that properly by tiling so every tile samples at training-distribution token count. The Amplifier is the alternative approach: an additive boost to text cross-attention. Use both if you want, but know which one you're reaching for.

How it works

It registers a forward hook on each transformer block's attn2 - the text cross-attention layer - and multiplies that layer's output by an amplification factor. Because LTX2's DiT is content-blind to its own intermediate states, the added residual flows forward naturally. Small numbers compound here: the README notes that strengths that look tiny (0.10–0.20) accumulate across 48 blocks per step, so the default text_amplification of 1.3 is already a real shove.

The extra controls:

  • spatial_focus (0–1, default 0) - at 0, amplification is uniform across all tokens. Raise it and the boost concentrates toward the center of the frame, leaving edges closer to native - useful when the prompt's subject sits mid-frame and you want the edges left alone.
  • block_index_filter - a comma/list of block indices to restrict the hooks to, if you've found the drift lives in specific blocks.
  • bypass - clears the hooks and returns the model unmodified; effectively an off switch for A/B testing.

Output is a MODEL, unchanged in shape, wired to your sampler.

Installing it

Part of the TenStrip 10S pack:

cd ComfyUI/custom_nodes
git clone https://github.com/TenStrip/10S-Comfy-nodes.git 10S_Nodes

or ComfyUI Manager β†’ "10S". Restart, no extra dependencies.

Where people get burned

The hook re-registration is the subtle bit - the node removes prior hooks before installing its own, so it's safe to drop inline multiple times, but it also means the amplification state lives on the model object. If a workflow starts behaving oddly after you've toggled it, re-run the node or restart ComfyUI to clear hooks. And resist the temptation to crank text_amplification to 2.0+ on the first try: over-amplified cross-attention makes the model overcommit to prompt phrases and text can start rendering as gibberish lettering in-frame. 1.2–1.5 is the sane band; if that's not enough, the Tiled Sampler is the real fix and this is just a stopgap.

Category10S Nodes/Identity

Inputs (6)

NameTypeDefaultDescription
modelMODELβ€”
text_amplificationoptFLOAT1.301–3β€”
spatial_focusoptFLOAT0.000–1β€”
block_index_filteroptSTRINGβ€”
bypassoptBOOLEANfalseβ€”
debugoptBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
modelMODELβ€”