Skip to content

Veda attention ​

attention_backend="veda-sm89" selects learned sparse video attention for the original LightX v0.1 four-step keyframe profiles on one SM89 GPU. It also accepts the explicit FL/Ref HybridModel. auto remains dense for these profiles. Other model profiles and cooperating GPUs reject this option.

After installing Vflash's pipeline dependencies, run python -m vflash.install_veda. The installer fetches Veda revision fd59c7277ccc37ebf1a8f6823474b8c2ef2e33a0, packages its independent core and retains its MIT license and SageAttention 1.0.6 BSD notice. It does not install ComfyUI or download model weights. Supply the Veda H3 predictor separately under the MiniMax H3 Community License; the evaluated revision is 76f202874608115408d73280be9531c4ab888242.

python
pipeline = H3Pipeline(
    prepared, device=device, trust_local_code=True,
    attention_backend="veda-sm89",
    veda_predictor=Path("models/veda-predictor.safetensors"),
    hybrid_model=HybridModel(Path("models/MiniMax-H3/transformer_ref")),
)

generate and denoise accept --attention-backend veda-sm89 --veda-predictor FILE. For the native HTTP service set VFLASH_ATTENTION_BACKEND=veda-sm89 and VFLASH_VEDA_PREDICTOR to the mounted predictor. Missing or incompatible assets, a dependency revision mismatch, or a failed GPU self-test stops execution; there is no dense fallback. The predictor is session-owned; geometry and statistics reset before each serial request and resources are released on close.

Layers 0–4 and 45–49 retain Torch Flash attention. The other forty layers use Veda's actual triton-int8 kernel with generated keep budget 0.1. Text, audio and condition connections remain dense within that approximate kernel; this is not an exact-arithmetic guarantee. Receipts identify the actual kernel, 160 sparse and 40 dense calls per four-step request, target grid, predictor-plan match and observed sparse-layer work. The predictor's training schedule and geometry do not make this four-step combination numerically equivalent to dense H3.

An exploratory matched-input/actual-noise control on one RTX 4090 48 GB measured Hybrid denoising at 102.928 s dense and 72.867 s Veda; denoising plus media was 124.408 s versus 94.063 s. Workload: 1536×640, five seconds, four evaluations, BF16 trunk/runtime LoRA, two-slot block ring, Torch 2.11/CUDA 13.0, frozen clean conditioning and a common official decoder. Another GPU was active: these are bounded control timings, not isolated complete-request or same-quality claims. Eight sampled times and native face/fabric crops showed motion changes without new large structural failures; fine-detail softness remained. Audio semantics were not assessed. Independent complete-pipeline qualification is separate.

Six complete Python-pipeline requests additionally ran on the same single GPU, with the real official encoder and decoder: two source families, I2VA and L2VA paired controls, a larger I2VA canvas, and a one-image hybrid Ref request. At 896×512/5s, I2VA denoising was 37.507 s dense and 34.196 s Veda; L2VA was 36.582 s and 34.372 s. The matched warm L2VA request was 64.733 s versus 61.608 s (4.83% faster). Cold I2VA totals were 165.293 s and 171.789 s, including different 94.647/101.967 s initialization and first-use costs: no cold-start win is claimed. Veda I2VA at 1344×768 took 118.634 s warm, including 74.010 s denoising; hybrid Ref at 896×512 took 59.002 s warm. This shows why one speed ratio must not be applied to every canvas. Native-size crops showed more facial detail on the larger canvas, alongside the extra cost; existing object-contact errors persisted. Changed expressions/reflections are visible in the attention comparison. Audio semantic equivalence and universal quality gains remain unestablished.

Explicit 42/8 partition ​

Version 0.17 adds --veda-dense-edge-layers 4: layers 0–3 and 46–49 use the selected dense backend; the remaining 42 use Veda. Options 3 (44/6) and 5 (40/10) retain their behavior, and the default stays 5. The four-layer setting also preserves its partition during the optional audio context pass.

On SM120, selecting sageattention2 retains INT8 QK / FP8 PV for both dense and sparse attention at every supported partition. Selecting frost-flash uses BF16 dense attention and INT8 QK / FP16 PV sparse attention. These independent settings support matched layer-count and precision comparisons. Evaluate native subject detail, object structure and temporal continuity against the original brief, alongside complete-clip time. The earlier four specification pairs cover two independent scenes; their sharpness/flicker statistics describe those samples.

The 42/8 Sage policy completed five-second clips at 1344×768, 544×960 and 2720×1536 on RTX PRO 6000. Four-step receipts recorded 168 sparse and 32 dense calls; the portrait case also retained eight dense layers in its six-step audio context pass. This execution coverage supports the explicit option; paired outputs determine scene-specific quality and complete-clip performance.

Explicit SM120 dense-block acceleration ​

Quality review reopened (2026-10-10). Temporal instability has been reported in high-resolution Sage output. Consecutive-frame review of a matched 2048-square pair shows detail fluctuations in both Flash/Veda and Sage/Veda, with larger variation in one Sage region; the cause is not isolated. Earlier five-frame sampling and successful playback do not qualify temporal quality. Treat this option as experimental, not a quality-qualified production recommendation. Flash dense blocks remain the default; removing Sage is not a proven flicker fix. A 0.16.0 recheck on RTX PRO 6000 Server measured four same-seed pairs (2720×1536/5 s, 1344×768/15 s, two dialogues) without reference: frame-to-frame change of the fine-detail luma band was 0.97–1.02 of the FROST baseline and Laplacian sharpness 0.96–1.01. This bounds flicker against the baseline on these cases; it is not a universal quality claim.

On a tested single RTX PRO 6000 or RTX 5090, keep attention_backend="veda-triton" and select veda_dense_backend="sageattention2" in H3Pipeline. The complete generate CLI exposes --veda-dense-backend sageattention2. Default dense blocks remain Torch Flash; missing extensions and failed kernels stop execution.

Install SageAttention 2.2.0 separately, compiled for SM120 and the actual Torch/CUDA environment. The tested build used Torch 2.11/CUDA 13.0 and the pinned upstream revision above. SageAttention has its own Apache-2.0 license; no optional extension or model is bundled here. Do not use an SM90-only wheel on SM120, or treat successful CPU import as GPU qualification.

Only layers 0–4 and 45–49 switch to INT8 QK / FP8 PV, with per-warp QK quantization, FP32+FP16 accumulation, key smoothing and no value smoothing. The other forty Veda layers, keep budgets, four-step schedule, conditioning and decoder stay unchanged. Receipts identify both effective backends, dense precision and actual call counts. This option is intentionally approximate; it is not an equivalence guarantee.

Since 0.16.0 the option is one precision policy: Veda's sparse layers also switch their P·V product to FP8 (V quantized per head and channel to e4m3, FP32 accumulation), keeping their walk, masks, tile selection and INT8 Q·K. A startup self-test compares the sparse kernel with Veda's own; receipts add sparse_precision. On a resident FP8 RTX PRO 6000 Server with three-layer dense edges, the denoising stage took 182.3 versus 211.1 s at 2720×1536/5 s, 96.8 versus 110.6 s at 1344×768/15 s and 26.2 versus 28.4 s for 1 MP dialogue/5 s (FROST BF16 dense with FP16 sparse P·V as baseline).

Same-PRO-6000-Server I2VA comparisons with BF16 hybrid weights and block-ring loading measured 1536×864/15 s at 257.718 s Flash versus 223.718 s Sage (13.19% shorter), and 2048²/5 s at 314.753 versus 302.123 s (4.01% shorter). These are complete warm conditioning/denoising/media requests, excluding initialization and transfer. At 1344×768/5 s, Flash/Sage/Flash was 49.683/49.775/52.914 s: no stable short-request win. The batch's 1205.634 s initialization shows why warm gains do not guarantee lower first-output latency or rental cost.

All eight outputs decoded with audio/video and played in the application. Five sampled times per clip plus native detail crops retained subject/architectural structure without a new obvious structural failure; motion trajectories changed. Existing camera adherence defects persist and audio semantics are unassessed. These bounded observations do not establish universal quality equivalence. H100 and other architectures retain Flash dense blocks until separately qualified.

Same-RTX-5090 1344×768/5 s Flash/Sage/Flash measured 75.632/70.395/75.428 s; 1536×864/15 s measured 379.763/310.595 s (18.21% shorter). Both fifteen-second arms peaked at 24.143 GiB of denoising allocation with the corrected profiler. The longer result has full audio/video decode and application playback; sampled faces, fabric and motion retain the same limitations described above.

The same 5090 batch also completed 2048²/5 s with Sage in 368.807 s, at 26.982 GiB peak denoising allocation. It has complete AV decode and application playback, but no matched same-instance Flash control; this establishes capacity and delivery, not a four-MP speedup.

Explicit SM90 CuTe Flash dense blocks ​

H3Pipeline(..., attention_backend="veda-triton", veda_dense_backend="cute-flash") and generate --veda-dense-backend cute-flash select the pinned FlashAttention CuTe implementation. Install flash-attn-4==4.0.0b34 separately; the measured environment used nvidia-cutlass-dsl==4.8.0, Torch 2.11.0/CUDA 13.0 and Triton 3.6.0. No optional extension, private model, or runtime credential is bundled.

The option currently admits SM90 only. It retains BF16 QKV, complete dense context, noncausal attention, one split and the original forty Veda layers. Only the ten dense layers change implementation. Kernel errors, unsupported devices and wrong package versions fail instead of silently choosing another backend. Torch Flash remains the default. This does not restore Sage, enable FP8 attention, change the model precision, or expand a profile's geometry/memory admission limits.

Six actual H100 SXM kernel probes at H3 lengths 9,984–438,784 measured Torch Flash at 7.888–16,796.029 ms and CuTe at 4.292–8,383.208 ms. Both kernels ran on the device; these are dense-layer timings, not whole-video speedups. Full I2VA comparisons hold experimental FP8 Linear/text, hybrid four-step denoising and Veda fixed. Their limited quality review and complete timings are recorded below; this option is not a claim of universal same-quality performance or new public FP8 support.

Canvas / durationTorch full request secondsCuTe full request seconds
512×512 / 5s81.74477.015
768×768 / 10s41.03240.115
1024×1024 / 15s130.214114.534
1536×1344 / 10s207.546168.019
2048×2048 / 5s235.523195.820
2048×2048 / 15s1237.038891.409

One physical H100 SXM ran all six controls before all six candidates, with one seed per scene. The table includes conditioning, denoising and media, excluding initialization and network delivery. Six-case process makespan including initialization was 2068.473 versus 1629.436 seconds. Initialization itself increased from 131.435 to 138.192 seconds. The first case includes cold conditioning and first-layout compilation; its total difference is not proof of a short-clip dense-kernel improvement. For the largest case, measured dense attention fell from 692.458 to 348.078 seconds and the whole request from 1237.038 to 891.409 seconds (27.94% shorter). Nested timings are not additive.

All twelve videos fully decoded and played in the application. Sampled people, objects and architecture retained their structure; consecutive native-size rain-street and bookshelf crops showed no newly observed major structural failure. Both the control and candidate retain an early library camera reframe and insufficient intended action. This limited inspection is not full quality equivalence. Audio semantics, other modes and multiple seeds remain unassessed. Sequential order/cache effects remain, and warm stage gains do not imply a faster complete cold start.

Explicit SM120 FROST dense blocks ​

Select H3Pipeline(..., attention_backend="veda-triton", veda_dense_backend="frost-flash") or generate --veda-dense-backend frost-flash. Install the optional NVIDIA cuDNN frontend 1.31.0 separately. Set CUTE_DSL_ARCH=sm_120a before starting the process; the wrapper rejects a missing/different target rather than changing process-global compiler state. The tested environment used CUTLASS DSL 4.8.0, Torch 2.11.0 and CUDA 13.0.

Only ten dense layers use FROST BF16, full-context, noncausal attention with 128×128 tiles and one split. Forty Veda layers and their keep budgets remain unchanged. Native fused-projection V strides are accepted without a full QKV copy. Bounded cached plans contain descriptors only; actual tensors and the current CUDA stream are supplied per call. Unsupported layouts, architectures, package versions and kernels fail explicitly. Torch Flash remains the default; this option does not restore Sage or broaden profile capacity.

The following six paired I2VA requests ran on one RTX PRO 6000 Blackwell Server 96 GB, with experimental native NVFP4 Linear and FP8 text encoding held fixed. They demonstrate the dense backend in that integration, not public support for those private quantization runners. This is not an RTX 5090, SM89 or H100 qualification.

Canvas / durationCuTe 128×64 full request secondsFROST 128×128 full request seconds
512×512 / 5s69.92672.095
768×768 / 10s43.67340.588
1024×1024 / 15s139.261136.206
1536×1344 / 10s221.993215.276
2048×2048 / 5s259.359250.704
2048×2048 / 15s1324.8111232.634

Each request includes conditioning, denoising and media; initialization, probe selection and network delivery are excluded. Initialization was 52.650 and 53.620 seconds. Sum of initialization and the six requests was 2111.672 versus 2001.123 seconds. The first small request includes cold conditioning/compilation; controls ran before candidates, so cache/order effects remain.

All twelve outputs fully decoded and played in the application. Limited timeline and native consecutive-frame review covered walking, fine street detail and long library scenes. Existing camera reframing and action-adherence defects remain; no new major structural failure was observed in the reviewed regions. This is not universal visual or temporal equivalence. Audio semantics, other modes and multiple seeds remain unassessed. Private integration source: video-gen eec85fd7; only aggregate evidence is public.

Explicit SM90 FA3 dense blocks ​

Select H3Pipeline(..., attention_backend="veda-triton", veda_dense_backend="fa3-flash") or generate --veda-dense-backend fa3-flash. Install the optional official FlashAttention-3 Hopper build, package flash-attn-3==3.0.0, from that fixed revision with its pinned CUTLASS submodule 7127592069c2fe01b041e174ba4345ef9b279671. The measured build used Torch 2.11.0/CUDA 13.0, SM90a, BF16, forward-only head dimension 128. Build/install optional dependencies before renting a GPU. No extension or model payload is included in this Python package.

Only the ten dense layers change from CuTe to FA3: BF16 full-context noncausal attention, one split, no GQA packing and no attention-probability output. All forty Veda layers remain. The fused-projection V view is passed directly. Unsupported devices, dtypes, layouts and package versions fail explicitly; no backend fallback or new geometry admission is added. Torch Flash remains the default. This does not enable FP8 attention or claim bitwise identity: changed floating-point accumulation can change the generation trajectory.

Six I2VA controls followed six candidates on one H100 SXM 80 GB. Experimental FP8 Linear/text, streamed text residency, in-memory conditioning, the prepared official VAE and CPU output assembly were held fixed. These timings do not publish a new quantization API.

Canvas / durationCuTe complete request secondsFA3 complete request seconds
512×512 / 5s57.76013.829
768×768 / 10s39.67135.799
1024×1024 / 15s111.710106.385
1536×1344 / 10s166.739169.017
2048×2048 / 5s192.559191.791
2048×2048 / 15s882.097863.367

Requests include conditioning, denoising and media, excluding initialization and delivery. The first request and initialization are strongly confounded by order/shared caches; their large difference is not an FA3 cold-start win. The remaining five requests total 1392.776 versus 1366.360 seconds (1.90% shorter). The largest request is 2.12% shorter; its dense CUDA time fell from 346.348 to 322.647 seconds while media became slower. The 1536×1344 case is 1.37% slower, so this is an explicit option rather than a universal winner.

All twelve videos fully decoded and played in the application. Limited timelines and native consecutive-frame regions covered clothing/hands, foliage and library shelves. No new obvious large structural disruption was observed in those windows. Both variants retain unwanted camera movement/reframing and action-adherence defects. Other temporal regions, audio semantics, multiple seeds and other input modes remain unassessed. This is not a universal quality-equivalence claim or qualification of other H100 models. Private integration source: video-gen 6d9a2823.

Vflash · Native MiniMax H3 inference