[diffusion] feat: support serialized comfy convrot int8 dits (#35994)

This commit is contained in:
Mick
2026-08-23 09:29:59 +08:00
committed by GitHub
parent 7f30d66045
commit a36c0746b9
11 changed files with 253 additions and 71 deletions
+21 -5
View File
@@ -50,10 +50,11 @@ directory directly as `--model-path`, but that is a compatibility path. If a
repo contains multiple candidate checkpoints, pass
`--transformer-weights-path` explicitly.
MiniMax-H3 auto-detects the per-layer metadata in Comfy's
`pruned_fp8_scaled` safetensors. Pass one selected FL2VA or Ref2VA file by local
path, `owner/repo/path/file.safetensors`, or direct Hugging Face file URL; do
not combine it with `--quantization`. MiniMax-H3 GGUF usage is documented in
MiniMax-H3 is a verified example for Comfy safetensors with per-layer metadata,
including `pruned_fp8_scaled` and serialized ConvRot INT8. Pass one selected
FL2VA or Ref2VA DiT file by local path, `owner/repo/path/file.safetensors`, or
direct Hugging Face file URL; do not combine it with `--quantization`. Its GGUF
usage is documented in
the [MiniMax-H3 cookbook](/cookbook/diffusion/MiniMax/MiniMax-H3#pre-quantized-gguf-transformer).
## Quantized Component Repositories
@@ -165,6 +166,14 @@ backend.
<td>None</td>
<td>CUDA; auto-detected; TP, sequence parallelism, and component/layerwise offload are supported, while FSDP is not. Checkpoint-marked <code>fc2</code> layers retain FP8 storage and use compute-dtype matmul.</td>
</tr>
<tr>
<td><code>comfy-int8-convrot</code></td>
<td>One selected safetensors file with per-layer <code>int8_tensorwise</code> and ConvRot metadata</td>
<td><code>--transformer-weights-path</code></td>
<td>MiniMax-H3 native DiT; pruned FL2VA is E2E-verified and Ref2VA has the same validated tensor contract</td>
<td><code>comfy-kitchen</code></td>
<td>CUDA; auto-detected; uses the fused Kitchen INT8 kernel and validates weight/scale layout before model construction. TP requires every row-parallel input shard to preserve the checkpoint's ConvRot group boundary; the H3 256-group checkpoint supports TP1/2/4, not TP8. Offload is supported; FSDP is not.</td>
</tr>
<tr>
<td><code>qvg-kv</code></td>
<td>Unquantized model with runtime causal KV-cache compression</td>
@@ -334,7 +343,14 @@ sglang generate \
```
**Note:** Requires `aiter` package with MXFP4 kernel support
### Kitchen INT8 Online Quantization
### Kitchen INT8
Serialized Comfy ConvRot INT8 DiTs are selected through
`--transformer-weights-path` and auto-detected from their per-layer markers.
They load INT8 weights and row scales directly; omit `--quantization`.
For a BF16 checkpoint, `--quantization kitchen_int8` instead performs online
quantization after loading:
`kitchen_int8` quantizes DiT linear weights online from the stock BF16
checkpoint. Forward uses the fused `comfy_kitchen.int8_linear` op (rotation,