LTX2 Mem Eff Sage Attention Patch
Cut peak VRAM on LTX-2
- model
- model
LTX-2 is fast and capable, but its launch was rough on VRAM - the Gemma 3 text encoder alone caused OOM errors even on high-end cards, and squeezing the whole thing into memory was the main early complaint. This node attacks the attention side of that budget. It swaps in a custom, memory-efficient SageAttention implementation to lower peak VRAM during sampling. The node's own label is refreshingly honest: "EXPERIMENTAL! Activates custom sageattention to reduce peak VRAM usage, overrides the attention mode. Requires latest sageattention version."
What it does and the catch
Attention is a big chunk of a transformer's memory footprint, and SageAttention is a memory-efficient, quantized attention kernel that shrinks it - the same family of trick that made Wan runnable on 24GB cards. This node forces LTX-2 to use kijai's custom SageAttention path, overriding whatever attention mode you had set, specifically to bring the peak down so a generation that was OOMing might now fit. On the Bernini/Wan side, kijai's equivalent Mem-Eff SageAttention node was measured saving nearly 4GB of peak VRAM on a 1080p workload - that's the order of savings we're talking about.
The catch, and it's the whole story with SageAttention: it depends on SageAttention being installed, and current. That means Triton, and on Windows Triton is the notorious pain point - the community leans on one person's maintained Windows Triton builds to make it work at all. On Linux and cloud boxes it's much smoother. If SageAttention isn't installed or is out of date, this node can't do its job.
The inputs and output
Minimal, as VRAM patches go:
model- the LTX-2 model to patch.triton_kernels(default true) - use the Triton-based kernels for the custom attention. On with Triton available is the intended, fastest path; if your Triton setup is broken, this is the toggle involved.
The output is the patched model, which you route on to your sampler. It's a drop-in patch - no rewiring beyond inserting it in the model line.
How to install it
The node ships in kijai's KJNodes pack.
- ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, thenpip install -r ComfyUI-KJNodes/requirements.txt, restart.
Then the real prerequisite: SageAttention itself, latest version, which the node requires and KJNodes does not bundle. That's a separate pip install sageattention plus a working Triton - the part that eats an afternoon on Windows and is nearly automatic on Linux.
Common issues & troubleshooting
Errors about sageattention or a missing module. SageAttention isn't installed, or it's an old version. Install/upgrade it (pip install -U sageattention) into the same environment ComfyUI runs from. The node explicitly wants the latest - a stale build is a common failure.
Triton errors, especially on Windows. Triton is the hard dependency under SageAttention and it's genuinely painful to install on Windows. Use a known-good community Triton build for your Python/CUDA combo. If you can't get Triton healthy, this node won't run - that's a SageAttention prerequisite, not something the node can route around.
It's experimental - expect breakage across updates. The label says EXPERIMENTAL and means it. LTX-2 moved fast and this patch tracks a moving target; if it errors after an LTX or ComfyUI update, bypass it, confirm the base workflow runs, and reintroduce once the versions settle.
No VRAM improvement. If peak didn't drop, the custom path may not have engaged (check for a silent fallback in the console) - usually that traces back to SageAttention/Triton not actually being active despite being nominally installed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| triton_kernels | BOOLEAN | true | Use Triton fused RoPE kernel on the self-attention Q/K. Requires Triton. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |