FastMetal-14B-QAD hangs before first denoise step on M4 Max (1.3B/5B fine; GPU command buffer never completes)
メンテナーはふだん 2 日以内に返信
@Ishxn20 がすでに取り組んでいます。
2026年11月6日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start with examples/inference/basic/mlx_wan_prompt_to_video.py and reproduce using the documented command with the 14B checkpoint; compare against the working 1.3B and 5B runs. Read the MLX issue #3797 mentioned in the report and investigate where the 14B run stalls after weights load. Done means identifying the cause or a reliable diagnostic and confirming the 14B run reaches its first denoise step.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
FastMetal-14B-QAD hangs indefinitely on Apple M4 Max (128 GB, macOS 27.0.1) when running the documented MLX text-to-video example. The process never reaches the first denoise step. Reproduced twice, including with OMP_NUM_THREADS=1 MKL_NUM_THREADS=1.
FastMetal-1.3B-QAD and FastMetal-5B-QAD work perfectly on the same machine, same script, same environment (1.3B: 3.87 GiB peak, matching the published baseline exactly; 5B 720p: 9.337 GiB peak / 122.1 s denoise, both matching the published numbers).
Command
.venv/bin/python examples/inference/basic/mlx_wan_prompt_to_video.py \
--model-root /Users/yanyu/models/FastMetal-14B-QAD \
--mlx-checkpoint /Users/yanyu/models/FastMetal-14B-QAD \
--height 480 --width 832 --num-frames 81 \
--output-path video14b.mp4 \
--prompt "A fox runs through a misty pine forest, leaves kicking up behind it."
Last log line: Loading weights: 100%|██| 242/242 — then silence (no denoise step 1/3 ever).
Environment
- MacBook Pro, Apple M4 Max (40-core GPU), 128 GB unified memory
- macOS 27.0.1 (build 26A434)
- Python 3.13, FastVideo installed via
pip install -e '.[mlx]' - mlx 0.32.4 / mlx-lm 0.32.2 / mlx-metal 0.32.4
- Model downloaded via
hf download FastVideo/FastMetal-14B-QAD(39 GB on disk, all 8 safetensors open cleanly)
Evidence that the hang is in the 14B DiT load / first step (not text encoding)
- Text encoding completed on the first attempt: FastVideo wrote the prompt-embeds cache at
~/.cache/fastvideo/prompt_embeds/04cc776e*.npy(its.npy.jsonfingerprint points at the 14Btext_encoderroot) before the hang. Subsequent runs hit this cache instantly and still hang — so the hang is strictly after prompt encoding. sample <pid>stack (macOS): main thread parked in_PySemaphore_Wait; all libmlx ThreadPool workers idle incondition_variable::wait; one MetalCommandQueueDispatchthread is live insideIOGPUCommandQueueSubmitCommandBuffers— i.e. a GPU command buffer was submitted and never completes (kernel-level hang/livelock signature), while the CPU side is doing nothing.- CPU time frozen:
pscpu_time stops advancing (~15 s total after 10+ min wall); process sits at 0.0–0.3% CPU. - Partial residency: at hang, system-wide wired memory is only ~12.7 GiB (baseline ~7 GiB) while process RSS is ~14.8 GiB — the 14.4 GB DiT checkpoint is not fully resident on the GPU when it stalls.
- Not shader compilation:
MTLCompilerServiceidle, Metal shader cache byte-identical over 5 minutes of waiting.
What we ruled out
- Missing
--mlx-checkpoint(the classic silent-online-fetch hang): both args passed on every attempt. - libomp/OpenMP deadlock:
OMP_NUM_THREADS=1changes nothing; 1.3B/5B run fine in the same env. - Network wait: zero TCP connections on the hung process.
- Memory pressure: Metal budget 107.5 GiB; the published 14B peak is 21.68 GiB. System had >60 GiB free at hang.
Suspicion
Given mlx issue #3797 (NAX split-K GEMM NaN/livelock family on Apple GPUs for specific feed-forward shapes) already affected Qwen-Image-Flash at 4096-token sequences, the 14B Wan DiT may hit a related kernel path on M4 Max at this size. The 1.3B/5B models don't reach that regime.
Happy to run any diagnostics or test a fixed checkpoint/runtime build on this machine.
Full local dossier
We keep a Chinese dossier with raw sample output and a reproducible timeline at: yyc3-22:~/models/apple-silicon-stack/results/fastmetal-14b-hang-dossier.md.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 486
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 74
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hao-ai-lab/FastVideo のほかの issue
-
platform scope: inference scope: training
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
hao-ai-lab/FastVideo#2096 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] tests/test_fasth3_packaging.py: stale TORCH_CUDA_ARCH_LIST assertions fail since #1833対応中かも @zyuanbing が 36 日前に担当しました。 オープンbug installation platform scope: attention scope: kernel
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
hao-ai-lab/FastVideo#1928 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Feature] Add support for OpenMOSS/MOSS-Image (5B text-to-image DiT)対応中かも @noraaren が 1 日前に担当しました。 オープンenhancement help wanted installation performance scope: attention scope: docs scope: inference scope: kernel scope: model scope: training type: new-model
hao-ai-lab/FastVideo#2095 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
enhancement installation performance scope: attention scope: docs scope: inference scope: training type: new-model
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
hao-ai-lab/FastVideo#2094 ·
メンテナーはふだん 2 日以内に返信
-
[Feature] Add support for Linum-AI/pjit-21k (Pyramid-JiT 21K text-to-image)対応中かも @leo2ultimate が 2 日前に担当しました。 オープンenhancement help wanted installation performance scope: attention scope: docs scope: inference scope: kernel scope: model type: new-model
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
hao-ai-lab/FastVideo#2075 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
hao-ai-lab/FastVideo の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OCA/account-invoicing#2529 ·
メンテナーはふだん 1 日以内に返信
-
area/ci
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textオープンbug imagen skills
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Email validation accepts a trailing newline対応中かも @marcello-pichini が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信