Analysis updated 2026-05-18
Apply the patch to your KJNodes install to enable SageAttention speedups on Krea 2 Turbo without crashing or getting black images.
Load one of the included verified baseline workflows to confirm your Krea 2 setup is working before building a more complex pipeline.
Use dry-run mode to verify the patch is active and see which attention paths are being accelerated in your current workflow.
| surrealbydesign/comfyui-krea2-sageattention-guard | a-bissell/unleash-lite | abhiinnovates/whatsapp-hr-assistant | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Python | Python | Python |
| Setup difficulty | hard | hard | hard |
| Complexity | 4/5 | 4/5 | 3/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a CUDA-capable NVIDIA GPU, SageAttention installed, Krea 2 model files, and comfort applying git patches to an existing custom node package.
ComfyUI is a tool for running AI image-generation models locally through a visual node-based interface. SageAttention is a technique that speeds up how certain models process attention calculations, a key step in generating images. KJNodes is a popular ComfyUI extension that includes a node for applying SageAttention as a speedup. Krea 2 is a locally runnable image-generation model, along with its faster Krea 2 Turbo variant. The problem this repository solves: applying the KJNodes SageAttention patch globally to a Krea 2 workflow can cause it to activate on attention calls that Krea 2's architecture does not support, resulting in crashes, corrupted images, black outputs, or hard-to-trace errors. The root cause is that Krea 2 has a text-fusion path that uses different tensor shapes than the main image-generation attention, and a blanket override trips over those unsupported paths. This repository provides two patch files that modify a single file inside an existing KJNodes installation. The patches add Krea 2 model detection, a guarded version of the SageAttention override that only activates for allowlisted attention calls, and a fallback to ComfyUI's original attention code for anything the speedup cannot handle safely. They also add logging so a user can see which paths are being accelerated and which are being skipped, plus an optional dry-run mode for confirming the patch is active before running a full generation. Installation means applying the two patch files to an existing KJNodes folder using standard git patch commands, not cloning this repo into ComfyUI's custom-nodes directory. The repository also includes ready-to-load workflows for Krea 2 and Krea 2 Turbo as verified baselines, a script to check whether the patches will apply cleanly before touching the live install, and instructions for reverting the changes. Testing was done on Windows with an RTX 5080 GPU, CUDA 12.9, and both SageAttention 1.0.6 and 2.2.0. Linux is untested. Requirements include a CUDA-capable NVIDIA GPU, a working SageAttention install, the Krea 2 model files, and comfort applying git patches to an existing custom node package.
A patch for ComfyUI-KJNodes that makes SageAttention safe to use with Krea 2 image-generation models by adding detection and fallback logic instead of a blind global override.
Mainly Python. The stack also includes Python, ComfyUI, SageAttention.
No license information was found in the README.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.