If you have an RTX 5090, 5080, 5070 Ti, or 5070 and tried to speed up ComfyUI with SageAttention, you probably hit a wall before anything actually ran. The install either fails outright with a Triton compilation failed error, or the build finishes and ComfyUI silently falls back to a slower attention path. Neither is your fault, and neither is a mystery once you understand what changes when CUDA targets Blackwell (compute capability sm_120).
This guide is a documentation analysis of the official SageAttention repository and the ComfyUI startup-flag docs, cross-referenced against the issues real RTX 50 users have filed. It is not a fabricated benchmark report — I have no RTX 50 card on hand to run one. What follows is the reproducible procedure and the reasoning behind each step, so you can tell whether SageAttention is actually doing anything on your own machine.
Why SageAttention Breaks on Blackwell
SageAttention is a quantized attention kernel. Instead of computing attention in fp16/fp32 like FlashAttention, it quantizes the K and V matrices to 8-bit and does the bulk of the multiply in int8, then de-quantizes the result. The paper reports a 2–5× speedup over FlashAttention without measurable accuracy loss, and on an RTX 5090 the maintainers measured roughly 2.7× FlashAttention2 throughput (SageAttention repo). The catch: quantization kernels are written directly against specific NVIDIA architectures, so a kernel compiled for one GPU family does not run on another.
Older cards (Ampere sm_80/sm_86, Ada sm_89, Hopper sm_90) had been covered in SageAttention’s build for a while. Blackwell landed with sm_120, and for a long window the packaged build simply did not include a code path for it. Users trying to install on an RTX 50 card would either get a CUDA “unsupported architecture” error during compilation, or a cryptic Triton compilation failed from the kernel loader because the generated code did not match the running GPU.
The fix the maintainers shipped (issue #107, “Compile SageAttention CUDA 12.8, TORCH 2.7.0 – Blackwell”) is exactly what the issue title implies: add arch=compute_120,code=sm_120 to the NVCC flags so the CUDA extension compiles a real Blackwell target instead of guessing. If you install a prebuilt wheel from an older pin, you will not get this target, which is why “pip install a wheel” tutorials keep failing for 50-series owners.
Symptom: The Three Ways a Broken SageAttention Install Shows Up
Before you spend an evening recompiling, confirm that SageAttention is actually your bottleneck and not some unrelated CUDA/torch mismatch. The failures cluster into three distinct shapes:
- Build-time failure.
pip installorpython setup.py installerrors out withNo kernel for device was found, anunsupported gpu architectureNVCC message, orTriton compilation failed. This is the classic missing-sm_120symptom and means SageAttention never even got installed. - Silent fallback. The install “succeeded” but ComfyUI’s startup log does not report loading SageAttention, and generation speed is unchanged. ComfyUI does not always warn when a requested backend is unavailable — it can simply use its default (usually SDPA or sub-quadratic) and move on.
- Version skew. SageAttention compiled against one torch/CUDA combo but imported under another. Because the extension is a compiled CUDA binary loaded into torch’s address space, a mismatch here typically surfaces as a segfault or an
undefined symbolat import time, not a clean Python error.
Step zero in every case: read the actual terminal output, not the ComfyUI web UI. The backend selection and any kernel-load errors are printed to the console where you launched python main.py. The web UI almost never surfaces them.
How to Install SageAttention for Blackwell Correctly
The reliable path is to build from source against the exact torch and CUDA versions ComfyUI is already using, rather than pulling a wheel that matched someone else’s environment.
First, pin your dependencies before you compile. Check what torch reports and what CUDA toolkit your driver exposes, then make sure they agree with what you are about to build against. A common failure is having CUDA 12.8 toolkit but a torch wheel built for 12.4 — SageAttention will compile against one and load against another.
The build needs the Blackwell target forced into the flags. In the SageAttention extension setup, the line that matters is the NVCC target list. In older checkouts it enumerated older architectures only; the fix adds the compute_120 entry explicitly:
NVCC_FLAGS += ["-gencode", "arch=compute_120,code=sm_120"]
If you are on a current checkout, this is already present. If you are on an old pin, that is precisely why it fails — update to the current SageAttention rather than patching an outdated snapshot by hand. The maintainers also note that SageAttention3 kernels for Blackwell live under a dedicated sageattention3_blackwell directory in the repo, so if you want the newest path, that is where to look (SageAttention3 paper).
A note on Triton
Several RTX 50 issues ultimately trace to Triton, not SageAttention itself. If your Triton build predates Blackwell support, its generated kernels will also fail to find a valid device target. The practical advice from the issue threads is to install a Triton release that declares Blackwell support (a recent 3.x), and to not mix a hand-built Triton with a wheel-built SageAttention and vice versa. When the two disagree on CUDA runtime version, you get the same opaque Triton compilation failed message for a completely different underlying reason.
Enabling It in ComfyUI (And Verifying It Took)
Having the library installed does nothing until ComfyUI is told to use it. The attention backend is selected at launch with a flag. Running python main.py --help in your ComfyUI directory lists everything, and the startup-flag docs confirm --use-sage-attention as the switch (see ComfyUI Startup Flags). Launch with:
python main.py --use-sage-attention
Two caveats matter here. First, the attention flags are mutually exclusive — the cross-attention method flags (--use-split-cross-attention, --use-quad-cross-attention, --use-sage-attention, etc.) pick one backend, and passing several just means the last one wins or produces undefined behavior. Second, the docs mark the SageAttention flag as intended for testing/advanced use, and note that enabling it disables attention upcasting — which is fine for speed but is why some workflows that look identical produce slightly different pixels.
Verification is the part people skip. Do not trust that a clean launch means SageAttention is active. After ComfyUI starts, confirm it in the console: look for the line that reports which attention backend loaded, then run a single generation and confirm it completed without a runtime CUDA error. A common trap is that the flag silently has no effect because the library was installed into a different Python environment than the one running main.py — ComfyUI portable installs on Windows, for example, use their own embedded Python, so a pip install into your system Python is invisible to it. Install into the same interpreter that launches ComfyUI.
A quick sanity check
Inside that Python environment, import the module and confirm it resolves:
python -c "import sageattention; print(sageattention.__file__)"
If that import succeeds from the same interpreter ComfyUI uses, and your launch command carries --use-sage-attention, and the console log reports SageAttention as the active backend, then it is genuinely on. If any one of those three is false, you are looking at a silent fallback and have not actually enabled it.
Common Pitfalls to Avoid
- Wheel from the wrong arch. A wheel built for Ada/Hopper will install cleanly and then produce zero-acceleration or a runtime error on Blackwell because the GPU target is absent. Build from source or use a Blackwell-targeted wheel.
- Environment mismatch. Installing into system Python while ComfyUI runs from a portable/venv Python is the single most common “I enabled the flag and nothing happened” cause.
- Assuming speed means correctness. SageAttention trades a tiny amount of numerical precision for speed. For most image/video generation this is visually irrelevant, but if you are chasing pixel-exact reproducibility you should A/B against the default backend before adopting it wholesale.
- Skipping the log. ComfyUI’s web UI will not tell you which attention kernel loaded. The console is the only source of truth for backend selection.
- Treating SageAttention as the root cause. On a 50-series card, several distinct failures (cuDNN frontend, torch/CUDA skew, Triton) all overlap with “attention-related” symptoms. If SageAttention is already correctly enabled and still slow, the problem is likely elsewhere — see the related coverage on attention backend selection in ComfyUI Attention Backends Explained and on Blackwell-specific cuDNN errors in ComfyUI cuDNN Frontend Error: No Valid Execution Plans Built.
Conclusion
SageAttention on an RTX 50-series GPU fails for one dominant, fixable reason: the build lacked a sm_120 Blackwell target, which surfaces as a Triton compilation failed error or a silent performance no-op. The solution is to build (or obtain) a Blackwell-targeted SageAttention against the exact torch/CUDA pair ComfyUI uses, install it into the same Python environment that launches ComfyUI, enable it with --use-sage-attention, and then — crucially — verify the backend actually loaded from the console log before believing the speedup. Everything else — environment mismatches, mutually-exclusive attention flags, skipped verification — is a pitfall that makes the real fix look like it did not work. Get these three variables aligned and the install stops being a mystery.