veda_timing (loader, method veda) logs the time in gather, score, select, kernel and scatter
for a run; off by default and it changes no number. The run line now names the size and tile
plan of each stage, not only the last. Cheap speed-ups that keep the numbers exactly: the
list width of kept tiles comes from the layout instead of a device read, the head groups and
the per-row pattern stay on the device, and the predictor's projections are copied from pinned
memory.
Learned tile-sparse attention (Veda, arXiv 2605.30325): tiles, tile plans, predictor
scoring and selection in plain torch (tested on CPU, including a real tiny H3 with a
stand-in kernel), an INT8 Triton kernel derived from SageAttention (untested on a GPU),
installed through the same override and per-step wrapper as SLA. Runs at the predictor's
trained budget; LoRA, MXFP8, Two stages, dense steps and the attention backend compose.
Settings > Models offers the official Hugging Face download of the predictor on a click,
with its licence beside it; taggers and this share one downloader (core/fetch.py).
Shared video stream and NVIDIA helpers move to core (video_pipe, nvidia); the add-on needs nvidia-vfx 0.2+, moves an older one up and never moves a newer one back; Upscale and Interpolate cannot feed each other in Always mode.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tw9fjW75aYB8UyVRZo6fCr
Skip fewer attention blocks on early steps and more on late ones, in a straight
line up to sla_sparsity. Off at 0, untested on H3. Credit GSRS (arXiv 2610.21129).
tools/test_env.sh and tools/cpuforce.py set up the suite on a GPU-less machine.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0176SHndmQj7T1VtWAWZiNcq
A run can wait at a step boundary (Pause, or every N steps for a preview): its state is saved,
the LoRA so far is written as <name>_preview.safetensors, and the card is let go. Resume carries on
from the saved state under the same run. UNTESTED on real weights.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MpnF7GwNGMbngU11wjym7P
Block swap keeps the frozen weights of the last N transformer blocks in system
memory and lets ComfyUI's weight casting fetch them one layer at a time. The idea
and the block count as the one knob follow musubi-tuner's block swap (kohya-ss,
Apache License 2.0); this is an independent implementation.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MpnF7GwNGMbngU11wjym7P
Prompt Markup strips it before the encoder; Apply Prompt Markup puts weights
and timed windows on attention and blends on the conditioning. Where the words
sit is the H3 module's (text_tokenizer, prompt_rows, video_time_rows). Wired
into both H3 presets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loader-level attention option: mean-pool Q and a smoothed K into
blocks, score them with one small matmul, attend only the top
1-sparsity fraction of key blocks per query block, via a vendored
Triton kernel. Runs alongside the chosen attention backend rather than
replacing it (one override slot; the backend becomes SLA's dense
fall-through for the text refiner, masked calls, and trailing dense
steps), and refuses cleanly -- naming why -- on anything that is not
MiniMax H3 or a machine without CUDA+Triton.
modules/loaders/sla_block_map.py and sla_kernel.py are near-verbatim
ports of v4's vendored files (no FunPack-specific imports, so nothing
to adapt); sla_attention.py is the loader-facing glue (H3 gate,
override composition, per-step wrapper), same content as v4's with a
"not a module" note added to match gguf_support.py's convention.
Wired into FunPackDiffusionModelLoader as six new optional widgets,
following v4's loaders.py wiring but expressed in v5's io.Schema style.
The Triton kernel itself is unexercisable on this Mac (no CUDA) --
matches how real generation is verified in this project (rented GPU,
not local). Ported the CPU-testable half of v4's test suite (the
override contract, the H3 gate, the per-step wrapper); the three
kernel-correctness tests carry the same CUDA+Triton skip guard v4 used.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The bridge piece B and C (resolution source, reference images) both need:
Media bin picks have no way into a ComfyUI graph today. One node, media_id
in, IMAGE out, backed by core/media.py's existing store.
Also fixes a real .gitignore bug found along the way: a bare "media/"
pattern matched modules/media/ (this node's own source) as well as the
intended root-level user-data directory. Rooted both media/ and projects/.