DiT on a V100: speeding up MiniMax H3 in ComfyUI

An FP16 patch gave 1.52×, Sol-Attn another 5–8%: what actually works on a V100 in ComfyUI, and what does not.

On a 16 GB V100, MiniMax H3 in ComfyUI took 205 seconds at 512×384, five seconds of video and eight steps. With the FP16 patch it took 135 seconds; with Sol-Attn, 124. Here is what worked and what did not.

What we are speeding up

MiniMax H3 in the int8_convrot variant, merged with an eight-step turbo. It is a specific finetune, but it behaves like the base H3: video, audio and attention blocks are all there, only with fewer steps.

The machine: a V100-SXM2-16GB, sm_70, Windows 10, driver 576.57. ComfyUI 0.46, Python 3.12.15, PyTorch 2.14.1+cu126. The test is 512×384, 124 frames (about 5.17 seconds), eight steps, res_multistep / simple, fixed prompt and seed, one warmup and one measurement.

This is not a benchmark for every case. It is a working setup I wanted to speed up without moving to Linux.

Why the V100 is its own story

H3 officially runs in bf16/fp32, and the V100 has no bf16. ComfyUI falls back to an FP32 manual cast, and Volta’s tensor cores sit idle. That is where the first big gain comes from: not attention, but the data type.

The usual attention accelerators do not save sm_70:

  • SageAttention builds its kernels around int8 tensor cores; the V100 does not have them, so sageattn dies with PassManager::run failed and ComfyUI quietly falls back to PyTorch attention.
  • CK attention is unavailable in this build: Comfy Kitchen attention is unavailable.
  • FlashAttention V100 exists, but the ready wheels are Linux x86_64, and building it needs CUDA ≥12.9 and build tools.
  • xFormers on Windows has no working mslk.
  • split/quad attention do not speed anything up; they make it slower.

The FP16 patch

Install minimax_h3_fp16_fix.py in custom_nodes and start ComfyUI with --fp16-unet. The patch keeps the residual stream in FP32 while moving attention and MLP matmuls to FP16; it also fixes overflow in condition_proj, residual, out_proj and fc2.

The result on the same run:

VariantWarmupMeasurement
Base bf16/fp32 fallback303.13 s205.03 s
FP16 patch224.33 s134.86 s

That is 1.52×. There are no black frames: the first and middle frames have normal brightness around 95. The V100 holds H3 partially — 10.2–10.3 GB in VRAM and 11.3–11.4 GB offloaded — but FP16 still speeds up the math.

Sol-Attn V100

After FP16, it makes sense to add ComfyUI-MiniMaxH3-SolAttn-V100 v1.2.1, a V100-specific sparse attention. It does not run in the main environment: the pyd is built for torch 2.8.0+cu128, while ComfyUI runs 2.14.1+cu126. You need a separate torch28 venv; otherwise you get WinError 127.

The second detail is UTF-8. Without PYTHONUTF8=1 and PYTHONIOENCODING=utf-8, the node printed Chinese characters, hit UnicodeEncodeError and silently fell back to dense. The log must contain [SolAttn] active; if it does not, sparse is not running.

In the workflow, Sol-Attn sits after a bypassed PathchSageAttentionKJ; Sage is useless on the V100 anyway.

VariantWarmupMeasurement
FP16 base224.33 s134.86 s
SolAttn tau=0.75, topk=32216.06 s127.51 s
SolAttn tau=1.0, topk=16213.38 s123.68 s

That is 5.5–8.3% on top of FP16. Not “twice as fast”, but a working path. The quality at the aggressive tau=1.0/topk=16 needs a visual check: sparse attention should matter more at larger resolutions and lengths, but I have not measured that yet.

What did not work

Step caches gave nothing on the eight-step turbo:

  • FirstBlockCache H3 Fast — 0 hits, 135.75 s;
  • T8 Block Cache — 0/8 hits, 138.08 s;
  • TeaCache — partial hits, but wall-clock within noise.

At eight steps a cache has nowhere to unfold. T8, FirstBlock, Spectrum and TeaCache cannot be combined: they own block state in different ways.

How to repeat it

  1. Install the FP16 patch, start with --fp16-unet, check for black frames and measure one run.
  2. If you need more, create the separate torch28 venv, install Sol-Attn v1.2.1, set UTF-8 and use the workflow with Sage bypassed.
  3. Start with the safe tau=0.75, topk=32, check the picture and audio, and only then try tau=1.0, topk=16.
  4. Measure sampling separately from model and text-encoder loading, or the numbers will lie.

The result

The FP16 patch is the main speedup for H3 on a V100: 205 → 135 seconds. Sol-Attn adds another 5–8%, but needs a separate environment and a quality check. Step caches are useless at eight steps. For this model on this card the order is simple: FP16 first, sparse attention second, not the other way around.