Flash Attn V100 Config
The tuning dial for ComfyUI's V100 attention patch
- config_status
The node you actually fiddle with
FlashAttention-2 became the default in every modern ComfyUI workflow - and it quietly requires an Ampere (SM 8.0+) GPU. If you're on a Tesla V100, a T4, or an RTX 20-series, that's exactly the hardware it refuses to run on. Modern video and TTS models then greet you with a cheery CUDA error: operation not supported. This pack is the workaround: it patches ComfyUI's built-in attention so it routes through a Volta-compatible flash-attention kernel instead.
Flash Attn V100 Config is the third node in that pack, the one nobody screenshots. Its sibling Controller enables the patch and picks the model type, Status tells you whether the kernel library is even installed, and Config is what you reach for when a generation runs but comes out wrong. It tunes the patch's behavior at runtime - no restart, no editing the Python. Think of it as the EQ knobs on the back of the amp, not the power switch.
How it works
Every time you run it, this node writes five values into the pack's global PatchConfig object, which the patched attention reads on the next forward pass. That's the whole mechanism - it's a configuration node, not a processing node, which is why its only output is a config_status STRING. Wire that into a ShowText/display node and you get a one-line readout like Config updated: FP16=True | Sanitize=True[-10000:10000] | Debug=False. It's a receipt, not a control.
Under the hood, the patch grabs your model's Q/K/V, forces it to FP16 (Volta tensor cores only accelerate half precision), calls the flash_attn_v100 kernel, then restores the original dtype before handing the result back. The Config node controls the risky middle steps.
The two inputs that matter
force_fp16(default true): the Volta kernel strictly requires half-precision inputs - the code doesn't bother calling it with anything else. If this gets flipped off, you'll hitRuntimeError: q must be fp16. Leave it on; the only cost is conversion overhead on models that natively want BF16 or FP32.sanitize_output(default true): the unsung hero. After the kernel runs, the patch runsnan_to_numplus a clamp so a NaN or Inf in a long softmax doesn't poison the whole branch. The tooltip calls it "critical for audio/video" and it's not exaggerating - that's where a stray NaN turns into corrupted output or a black clip. Keep it on.
The other three you'll almost never touch. sanitize_min/sanitize_max (defaults ±10000) set the clamp bounds - they're wide enough that they only matter if you're chasing a specific failure. debug_mode flips on verbose console logging so you can watch tensor shapes before the kernel call, which is genuinely useful when a tensor layout mismatch is the culprit.
Installing it
ComfyUI Manager: search "Flash Attention V100" and install the pack. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/NetVoobrazhenia/ComfyUI_Flash-Attention_v100
Then restart ComfyUI. Here's the trap: this pack installs nothing itself. Its pyproject declares zero dependencies, and ComfyUI Manager won't build the actual kernel for you. The flash_attn_v100 library (from ai-bond/flash-attention-v100) is a separately-compiled CUDA extension you have to install into your environment yourself, following that repo's build instructions. If it's missing, the patch degrades gracefully back to ComfyUI's native attention - so the pack never bricks anything, but it's also doing nothing useful. The Status node exists precisely to tell you which of those two realities you're in.
Where people get burned
Mostly by expecting this to be FlashAttention-2. It isn't. It's a Python-level fallback that processes batched sequences one at a time - the gains come from tensor-core utilization, not from the fancy kernel optimizations. Realistic expectation: "make my 2017 datacenter card stop choking," not "double my speed." Also, this pack is strictly for compute capability below 8.0 - on a 30-series+ card it's pure overhead, so don't install it out of habit.
Beyond the FP16 and sanitize knobs above, remember the kernel's hard limits: head dimensions divisible by 8, no dropout, no ALiBi, no GQA/MQA. If your generation runs but looks wrong and your model uses grouped-query attention, that's not a Config node problem - the patch should have fallen back to native attention rather than feed you garbage. When in doubt, debug_mode on and watch the console.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| force_fp16 | BOOLEAN | true | Convert inputs to FP16 (required for V100 kernel) |
| sanitize_output | BOOLEAN | true | Remove NaN/Inf from output (critical for audio/video) |
| sanitize_minopt | FLOAT | -10000.00-1000000–0 | Minimum value after sanitization |
| sanitize_maxopt | FLOAT | 10000.000–1000000 | Maximum value after sanitization |
| debug_modeopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config_status | STRING | — |