Show HN: Fluxnation, the Fastest FLUX.1 Execution Kernel

KnoxProtocol1 pts0 comments

My kernel FLUXNATION is the fastest FLUX.1 kernel currently in existence. I engineered this from the ground up to replace standard ComfyUI SingleStreamBlock implementations by shifting the entire execution flow to a custom C++/CUDA engine, eliminating all unnecessary overhead. I developed the custom Triton kernel to handle the neuromorphic inspired Spike Attention, iterating the design via Nsight Compute until the hardware utilization reached its absolute capacity.S Tier Performance: The kernel achieves 4–6 second image generation times on any sampler or scheduler, regardless of whether you are running 20 or 50 steps. Once Spikey kicks in, it goes ham and COOKS with 0 image quality loss.Bare metal C++/CUDA Engine: I stripped out the standard execution path and built a custom SSBEngine that interfaces directly with torch.ops. Zero ctypes latency, zero wasted cycles.Fused Computations: The kernel executes gate, residual, and bias computations in a single high velocity lovelace pass. This completely eliminates the intermediate float32 memory bottlenecks that choke standard pipelines.Custom Neuromorphic Spike Attention: This aint an off the shelf implementation. I wrote a JIT-compiled Triton kernel from the ground up that uses block-sparse logic to drop attention FLOPs by ~90% after a defined step threshold, without degrading image fidelity. Spikey straight cooks.Cache Stepping Native FP8: I integrated explicit cache stepping logic to manage state. The first generation takes a moment to saturate the system, but every run after that operates at peak velocity. I also built in native float8_e4m3fn support with automated per-tensor scaling and module-level weight caching to ensure zero redundant extractions. Spikey and cache stepping compliment each other beautifully.Nsight Compute Verified: I profiled and iterated this through Nsight Compute until there was literally no more theoretical headroom. The kernel utilizes the lovelace architecture at full physical capacity. I have untested 10 series through 30 series iterations on my github, I have a 1080TI in my other rig but I havent tested the 10 series iteration on it, or the 20 or 30 series as I dont have those cards. I cooked only on the lovelace architecture, so feel free to give them a whirl if you rock those cards or want to fix it if broke.ComfyUI Integration: The kernel is fully integrated into the ComfyUI Manager, allowing for immediate deployment via custom nodes. I don t think anyone has seen it yet though it s been up for a while. Hopefully some people here can appreciate my work and utilize it themselves. Its night and day difference and allows image generation to cook on whole new level. Just search FLUXNATION is comfyui manager.Access: The codebase is live on GitHub for developers requiring high concurrency, high velocity diffusion performance. GitHub Repository: https://github.com/ULT7RA/FLUXNATION

kernel fluxnation custom github comfyui image

Related Articles