Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| for group in [dit.weights, *dit.blocks, *dit.refiner]: | ||
| for value in group.values(): | ||
| _eval_value(value) |
There was a problem hiding this comment.
Resident preload evaluates dropped weights When an MLX checkpoint includes the AdaLN cache produced by the documented converter, its block dictionaries contain
None where AdaLN projection weights were dropped. This loop passes those values to mx.eval, so resident preparation fails before generation. Skip the dropped values and test preload with a converted checkpoint.
| for group in [dit.weights, *dit.blocks, *dit.refiner]: | |
| for value in group.values(): | |
| _eval_value(value) | |
| for group in [dit.weights, *dit.blocks, *dit.refiner]: | |
| for value in group.values(): | |
| if value is not None: | |
| _eval_value(value) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: fastvideo/mlx_runtime/minimax_h3_pipeline.py
Line: 445-447
Comment:
**Resident preload evaluates dropped weights** When an MLX checkpoint includes the AdaLN cache produced by the documented converter, its block dictionaries contain `None` where AdaLN projection weights were dropped. This loop passes those values to `mx.eval`, so resident preparation fails before generation. Skip the dropped values and test preload with a converted checkpoint.
```suggestion
for group in [dit.weights, *dit.blocks, *dit.refiner]:
for value in group.values():
if value is not None:
_eval_value(value)
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| def test_mxfp8_checkpoint_preserves_quantized_matrix(tmp_path): | ||
| spec = MLXQuantizationSpec.from_name('mxfp8') |
There was a problem hiding this comment.
FP8 source conversion lacks coverage This test starts with an already-quantized MLX matrix, so it checks checkpoint save/load but not the new conversion of uint8 FP8 source weights. A scale-decoding or AdaLN-cache regression in the documented FP8-source workflow could go unnoticed. Add a small source safetensors fixture that checks the converted values and cache against a reference.
Prompt To Fix With AI
This is a comment left during a code review.
Path: fastvideo/mlx_runtime/tests/test_minimax_h3_fp8_checkpoint.py
Line: 11-12
Comment:
**FP8 source conversion lacks coverage** This test starts with an already-quantized MLX matrix, so it checks checkpoint save/load but not the new conversion of uint8 FP8 source weights. A scale-decoding or AdaLN-cache regression in the documented FP8-source workflow could go unnoticed. Add a small source safetensors fixture that checks the converted values and cache against a reference.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Track C: Spark and Apple Silicon
This is the Track C release branch. It is a draft while full Mac benchmarks and the Spark repeat-quality failure are being resolved.
Base
Stacked on
h3-spark-main-base, which integratesh3-sm120-experimentalwith the latest upstreammainchecked on October 3 (0cc41a22). The base carries the experimental CUDA NVFP4 prerequisites. This keeps the Track C diff focused; upstream delivery will stack on the reviewed release core.Changes
Weights and workload
FastVideo/FastH3-Pruned-8Step-BF16-ckpt300, locally converted to INT8 and INT6. Normal V2 BF16-source conversion is also required. Complete local conversions and end-to-end clips are pending weight transfer.FastVideo/FastVideo-FastH3-8-Step-V2-NVFP4, converted to the experimental packed DiT layout; released NVFP4 encoder and light H3 VAE. A separate diagnostic artifact restores 100 source FFN activation scales without further quantization.FastVideo/FastH3-Pruned-8Step-NVFP4-ckpt300; testing in progress.Measurements and quality status
Full records and commands: release plan, section 6.
Old values are from FastH3 Goes Local: four-step Preview and full H3 VAE. New runs use a different checkpoint, eight forwards, VSA 0.8 and the light VAE. These are not controlled model-only speedup comparisons. The blog has no matching 243-frame baseline or release-prompt results.
The first V2 243-frame probe produced colored noise. Restoring the omitted ModelOpt FFN input scales fixes a real activation-clipping defect, but one 124-frame ceramics repeat remains gray noise. Its 142.943 s median is invalid and must not be advertised. Stage hashes, activation ranges and encoder backend controls are being used to locate the remaining failure. Saved clips and review sheets are listed in the plan.
Validation
Remaining release gates
Mac component measurement update
The released NVFP4 encoder now runs natively on the M4 Max with packed W4 weights and FP32 activations. The first 50 language-model layers and BF16 embedding use 14.224 GiB active and 15.209 GiB peak. Both required prompts return finite 1000×5120 hidden states. After warmup, ceramics encoding is 8.890 / 8.871 s and harbor is 8.819 / 8.846 s. These are encoder component timings; Mac end-to-end INT6 and INT8 timings remain pending source transfer and conversion. No prompt cache is used for clip timing.
A focused rank-16 test checks all 42 blocks and final modulation against independent NumPy projection calculations, then verifies cache reload. It passed; pre-commit respects the deliberate test-file excludes. The prior focused suite had 31 passing tests.
The official pruned Spark artifact also fails repeated visual quality: ceramics 142.436 s warmup, 131.959 / 132.905 s timed calls, with corrupted timed outputs. The 132.432 s median is invalid for release. Harbor warmup was 132.509 s before stopping. All raw records are in the release plan; no speedup is claimed from corrupted clips.
The PR does not yet appear safe to merge because resident preparation still fails on checkpoints with dropped AdaLN weights.
Fix with agent prompt
Summary
This PR adds Spark NVFP4 recipes and benchmarking, MLX support for the pruned FastH3 checkpoint and packed encoder, and resident component loading. Since the previous review, it adds a synthetic rank-16 AdaLN arithmetic and checkpoint round-trip test.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Source checkpoint] --> B[MLX conversion and AdaLN cache] B --> C[Resident component loading] C --> D[Prompt conditioning] D --> E[DiT denoising] E --> F[Video and audio decoding]Reviews (2) · Last reviewed commit: "[test]: verify rank-16 H3 modulation and..."