FastMetal-14B-QAD hangs before first denoise step on M4 Max (1.3B/5B fine; GPU command buffer never completes)
Los mantenedores suelen responder en 2 días
@Ishxn20 ya está trabajando en esto.
Desde el 6/11/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- machine-learning, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4.6k
- Forks
- 486
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 74
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hao-ai-lab/FastVideo
-
platform scope: inference scope: training
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
hao-ai-lab/FastVideo#2096 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
[Bug] tests/test_fasth3_packaging.py: stale TORCH_CUDA_ARCH_LIST assertions fail since #1833Posiblemente ocupada @zyuanbing la tomó hace 36 días. Abiertobug installation platform scope: attention scope: kernel
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
hao-ai-lab/FastVideo#1928 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Feature] Add support for OpenMOSS/MOSS-Image (5B text-to-image DiT)Posiblemente ocupada @noraaren la tomó hace 1 día. Abiertoenhancement 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 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
enhancement installation performance scope: attention scope: docs scope: inference scope: training type: new-model
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
hao-ai-lab/FastVideo#2094 ·
Los mantenedores suelen responder en 2 días
-
[Feature] Add support for Linum-AI/pjit-21k (Pyramid-JiT 21K text-to-image)Posiblemente ocupada @leo2ultimate la tomó hace 2 días. Abiertoenhancement help wanted installation performance scope: attention scope: docs scope: inference scope: kernel scope: model type: new-model
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
hao-ai-lab/FastVideo#2075 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de hao-ai-lab/FastVideo
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
OCA/account-invoicing#2529 ·
Los mantenedores suelen responder en 1 día
-
area/ci
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textAbiertobug imagen skills
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Email validation accepts a trailing newlinePosiblemente ocupada @marcello-pichini la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día