veda-sparse / Veda-on-ComfyUI
git clone https://github.com/veda-sparse/Veda-on-ComfyUI.git
Veda Sparse Attention for ComfyUI
+0
stars, 24h · #33,383
+~0
stars, 7 days · #33,858
+190
stars, 30 days · #2,692
194
★ total
15
forks · 10 open issues
Star history (as recorded here)
LanguagePython
LicenseMIT
Created2026-10-02 (20d ago)
Last push11d ago
Watchers2
OwnerOrganization
GitHub topics
Links
- GitHub: github.com/veda-sparse/Veda-on-ComfyUI
- Homepage: https://veda-sparse.github.io/
- Releases · Issues · Hacker News mentions
README excerpt
# Veda Sparse Attention for ComfyUI (MiniMax-H3) Paper · Project Page · Predictor · Training Code · 中文说明 ## Introduction **Veda** is a learned sparse-attention method for video diffusion models. Attention dominates the cost of a long clip, and a small distilled predictor can say in advance which tiles of the attention map carry the result. Veda computes roughly the top 10% of them and skips the rest. This repository packages Veda as a custom node for ComfyUI's native MiniMax-H3 (T2VA, FL2VA and R2VA): one node, MODEL in and MODEL out. ### Highlights - **Faster inference.** 2.9x end to end and 7.1x on attention alone against ComfyUI's default attention, measured on an RTX 5070. The gain grows with clip length. - **Plug-and-play.** An attention override rather than a weight patch, so Turbo and style LoRAs, fine-tuned and quantized H3 checkpoints, first/last-frame and reference conditioning, and other block patches keep working. - **Never silently off.** Every kernel passes a self-test on the GPU before it is used. When Veda cannot run, the prompt stops with the reason instead of quietly rendering without acceleration: a missing package or a node in the wrong place comes with the fix, anything else with a ready-to-paste report for a GitHub issue. - **Nothing extra to install.** The sparse kernel ships with the node; installing from the Comfy Registry pulls in Triton (NVIDIA SM80 and newer, AMD RDNA3 / RDNA4 on ROCm) or MLX (Apple silicon). ## Installation Requires ComfyUI >= 0.38.0. In ComfyUI Manager, search "Veda". Or: [code] Or clone this repository into `ComfyUI/custom_nodes/` and restart ComfyUI. ## Usage Open *Workflow -> Browse Templates -> Veda-on-ComfyUI* and pick "Veda MiniMax H3 T2VA" or "Veda MiniMax H3 R2VA". The missing-model dialog offers the predictor. Write a prompt and run. To add Veda to an existing H3 workflow, put **Veda Sparse Attention (MiniMax H3)** on the MODEL wire after the model and any LoRA loaders, last before the guider or sampler. Select it and press **Ctrl+B** to bypass it and render the same seed with full attention. Do not combine it with ComfyUI's own "Model Sparse Attention" node on H3: that one replaces the attention blocks outright, so Veda would never be called. The node says so when it sees both. Other attention nodes can stay. Veda runs on top of "Patch Sage Attention KJ" (the calls it does not take go to sage), and KJNodes' "MiniMax H3 Low VRAM Attention" keeps working. A node that swaps out the whole H3 attention, such as "MiniMax H3 Mem Eff Sage Attention Patch", must come *before* Veda: Veda then runs the sparse layers and leaves that node the full-attention ones, and says so on its node. Placed after Veda it would hide every call from Veda; the node warns about that too. ### Predictor The node does not download anything itself. The predictor (275 MB) reaches `models/veda` one of two ways: * **From a template.** Open one of the Veda templates and ComfyUI offers the predictor in its missing-