Fused FP8 CUDA kernel for FLUX.1 SingleStreamBlock with spike attention and step caching. Replaces ComfyUI's entire SingleStreamBlock forward pass with a single torch.ops call — modulation, dual GEMMs, QKV, RoPE, attention, gating and residual all fused. 30%+ faster than stock ComfyUI on RTX 4090. Spike attention: block-sparse Triton kernel that scores attention blocks by dot-product similarity and keeps only the top 45% after image structure forms. Step caching replays cached attention output on alternating spike steps for zero attention compute every other step. Works with all 38 ComfyUI samplers at any step count. FP16 ports included for 10-series, 20-series, and 30-series GPUs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
16 lines
536 B
Batchfile
16 lines
536 B
Batchfile
@echo off
|
|
:: FLUXNATION Low-VRAM Profile
|
|
:: For GPUs with 8-12GB VRAM (RTX 3060, 3070, etc.)
|
|
:: Aggressive spike + step caching to minimize attention memory
|
|
:: Quality trade-off is real but generation is POSSIBLE where it wasn't before
|
|
|
|
set CUDA_LAUNCH_BLOCKING=0
|
|
set TORCH_CUDNN_V8_API_ENABLED=1
|
|
set FLUX_SPIKE=1
|
|
set FLUX_SPIKE_SWITCH=0.15
|
|
set FLUX_SPIKE_CAP=0.20
|
|
set FLUX_SPIKE_TAU=0.03
|
|
set FLUX_SPIKE_CACHE=1
|
|
py -3.10 -s ComfyUI\main.py --windows-standalone-build --fast --dont-upcast-attention --disable-cuda-malloc --lowvram
|
|
pause
|