Repository navigation
[feat] Add FastKandinsky 6.0 NVFP4 inference - #2123
Conversation
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 PR merge requirements
|
|
This pull request is merged. |
[Medium impact] The reviewed changes appear safe to merge.
|
fv-superagent
left a comment
There was a problem hiding this comment.
fv-superagent score: 3/5
The packed NVFP4 profile wiring is sound: is_kandinsky6_nvfp4_linear_prefix matches exactly the DiT linears the model tags, the converter writes the four buffers the loader expects with the same alpha/global-scale semantics as convert_model_to_nvfp4, and the new visual_blocks/audio_outLayer rules leave existing BF16 visual_transformer_blocks keys byte-identical. Thanks for a careful converter.
Must fix:
-
pre-commitis red (job).yapfrewritesfastvideo/configs/models/dits/kandinsky6.py,fastvideo/layers/quantization/nvfp4_config.pyandfastvideo/pipelines/basic/kandinsky6/kandinsky6_ti2va_pipeline.py;mypyfails atkandinsky6_ti2va_pipeline.py:69withCannot determine type of "_extra_config_module_map". Runpre-commit run --files <those three>and commit; for mypy, type the assignment or build a typed local:self._extra_config_module_map: dict[str, str] = { **self._extra_config_module_map, "transformer": os.path.abspath(packed_transformer), }
-
Title tag. The title has no
[type]tag, so the Mergify merge requirement fails. Rename to e.g.[feat] Add FastKandinsky 6.0 NVFP4 inference. -
The documented source doesn't resolve.
docs/inference/fastkandinsky6.mdpoints atkandinskylab/FastKandinsky-6.0-Pro-NVPF4-QAD, which returns 401 to an anonymous HF API call (gated) and isn't inkandinskylab's public list; the name also transposes NVFP4 to NVPF4. The converter needs a dense BF16 Diffusers directory and rejects a repo that already carriesnvfp4/transformer/nvfp4_weights.safetensors. Point the guide at the public BF16 source you converted, or confirm the new repo is public and spelled right. -
No test, and no end-to-end evidence. The converter contributor guide (
scripts/checkpoint_conversion/AGENTS.md) asks for a smoke test;fastvideo/tests/ops/quantization/test_minimax_h3_modelopt_nvfp4_converter.pyis the precedent, and Fastcheck'sunitlane auto-collects that directory. Please also coveris_kandinsky6_nvfp4_linear_prefixandNVFP4Config(layer_profile="kandinsky6"). The PR-body hardware box (- [ x ]) renders unchecked, so the 5090 path is unverified.
Also
- Greptile's three P2s look fair (index-based shard read in the converter, drop the narrating comments, cookbook entry). The cookbook gap is the same missing entry point as the guide above:
docs/cookbook/kandinsky6.mdanddocs/inference/optimizations.md(the QAD section) don't link the new page, anddocs-site/navigation.json:134puts it as a top-level Run-inference leaf wheredocs-site/INFORMATION_ARCHITECTURE.mdwants family references under Cookbook > Kandinsky 6. kandinsky6_ti2va_pipeline.py:59-74: the packed branch only fires for a local path. A Hub id never redirectstransformerand then trips the new guard infsdp_load.py:392, even though the export exists.- Reused H3 error text (
nvfp4_config.py:1005,fsdp_load.py:398) tells Kandinsky users to setlayer_profile='h3_dit'.
— fv-superagent · NVFP4 or NVPF4? The GPUs don't care; the downloader does. · run by aryan5v
fv-superagent
left a comment
There was a problem hiding this comment.
fv-superagent score: 3/5 (was 3/5)
visual_blocks / audio_outLayer were the only over-broad part of the mapping, so this narrowing is right.
Still blocking on da838ed:
pre-commit(job):yapfstill rewritesfastvideo/layers/quantization/nvfp4_config.py(the three blank lines and there.compileclose) andfastvideo/pipelines/basic/kandinsky6/kandinsky6_ti2va_pipeline.py(thenvfp4_component_dirstuple);mypystill fails atkandinsky6_ti2va_pipeline.py:69.kandinsky6.pynow passes. Onepre-commit run --files fastvideo/layers/quantization/nvfp4_config.py fastvideo/pipelines/basic/kandinsky6/kandinsky6_ti2va_pipeline.pyshould settle it.- The title still has no
[type]tag, so Mergify keeps failing:[feat] Add FastKandinsky 6.0 NVFP4 inference. - Unchanged from the first review:
docs/inference/fastkandinsky6.mdstill points at the gated/transposed Hub source and the converter still has no test.
— fv-superagent · Second verse, same as the first, minus one file. · run by aryan5v
fv-superagent
left a comment
There was a problem hiding this comment.
fv-superagent score: 4/5 (was 3/5)
All review items are addressed on afaca451:
- Title
[feat] Add FastKandinsky 6.0 NVFP4 inferenceandpre-commitboth pass. - The converter now reads
diffusion_pytorch_model.safetensors.index.json(glob only as a fallback), andfastvideo/tests/ops/quantization/test_kandinsky6_nvfp4_converter.pycovers the packed layout,NVFP4Config(layer_profile="kandinsky6")tagging and the packed loader. It passed the Fastcheck unit lane (10m15s). - Cookbook entry added; the narrating comments removed.
Remaining nits, none blocking: _load_config detects the packed export only for a local path, so a Hub-id direct from_pretrained falls back to the dense transformer/ and then trips the new guard; the nav entry sits at top level instead of under Cookbook > Kandinsky 6; and the reused H3 error text still tells Kandinsky users to set layer_profile='h3_dit'.
— fv-superagent · Shard index consulted, narrating comments retired, CI queue forgiven. · run by aryan5v
|
The Kandinsky 6 cookbook/serving surface still needs the NVFP4 weight-quantization option before this is serving-ready.
— fv-superagent · A quantization option is just a checkbox with commitment issues. · run by aryan5v |
|
Added an 8-step NVFP4 Cookbook preset and serving config. The workflow converts the BF16 checkpoint locally, and fastvideo serve loads the packed weights from |
|
/merge |
Purpose
Add native NVFP4 inference for FastKandinsky 6.0. Users can convert the existing BF16 Diffusers checkpoint locally and generate video with synchronized audio using FastVideo.
Changes
nvfp4/transformer/. The pipeline loads the shared components from the model root.ATTN_QAT_INFERbackend. The converter derives weight scales from each weight tensor, and inference uses a global activation scale of1.0.VideoGenerator, with CFG 1.0, DiT compilation, and layerwise offload.Test Plan
Ran locally:
A synthetic checkpoint with mocked CUDA packing verified the exported file layout and routing to the packed transformer. The local
pre-commitrun stopped during hook setup because it could not resolvegithub.com.ATTN_QAT_INFER, and saves an MP4 with audio.