Matrix-Game-3: all multi-GPU runs fail with TypeError - attention() called with fa_version= instead of version=
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
調査の方向性
Matrix-Game-3/wan/distributed/ulysses.py:63-70 から始め、attention() のキーワードと wan/modules/attention.py:176 のシグネチャを比較します。提供されているマルチGPU再現手順または Matrix-Game-3/test.sh を実行します。--ulysses_size が 1 より大きい、ドキュメントに記載されたパスで unexpected-keyword TypeError が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Every run with --ulysses_size > 1 crashes immediately in the first DiT block with a TypeError. This includes the configuration in the repo's own Matrix-Game-3/test.sh (which uses --ulysses_size 7/8), so the documented multi-GPU path does not run as shipped.
Tested at commit 71c3cd7f741311f8100f6cf9cde942b6c1378d11.
Error
File "Matrix-Game-3/wan/distributed/ulysses.py", line 63, in distributed_attention
x = attention(
TypeError: attention() got an unexpected keyword argument 'fa_version'
Cause
wan/distributed/ulysses.py:63-70 calls attention() with fa_version=:
from ..modules.attention import attention
x = attention(
q, k, v,
k_lens=seq_lens,
window_size=window_size,
fa_version=fa_version, # <-- wrong keyword
)
but the parameter in wan/modules/attention.py:176 is named version:
def attention(
q, k, v,
...
version=None,
):
Only this call site is affected. The other fa_version=fa_version call sites (sequence_parallel.py:307,364 and model.py:591,596,613,615,678,1015,1027) target functions that do declare fa_version, so they are correct.
Fix
One word, in wan/distributed/ulysses.py:69:
- fa_version=fa_version,
+ version=fa_version,
Reproduce
torchrun --nproc_per_node=2 generate.py \
--size 704*1280 --ckpt_dir Matrix-Game-3.0 \
--image demo_images/001/image.png --prompt "..." \
--ulysses_size 2 --dit_fsdp --t5_fsdp \
--num_iterations 3 --num_inference_steps 3 --use_int8
Fails identically regardless of --fa_version, GPU model, or whether FlashAttention is installed — the TypeError is raised before any attention backend is selected.
Environment
2x RTX 5090 (sm_120), torch 2.11.0+cu128, Python 3.12, WSL2 Ubuntu 22.04. The bug is hardware-independent.
Related minor issues
Happy to open these separately if you'd prefer — noting them here since they came up while getting the model running on 2 GPUs:
-
WAN_VAE_SEGMENT_SIZEis undocumented.inference_pipeline.py:643reads it (default4), and it decides whether inference fits in 32 GB. At4the VAE decode exhausts VRAM at 704x1280 even with--use_int8,--t5_cpuand--lightvae_pruning_rate 0.5; at1the same run completes. A README note or a--vae_segment_sizeflag would help. -
stream_decodeswallows exceptions.wan/modules/vae2_2.py:1349catchesException, logs one line, and returnsNone. ThatNonethen surfaces ~200 lines away asAttributeError: 'NoneType' object has no attribute 'cpu'(inference_pipeline.py:652), hiding the real CUDA/OOM error. Addingtraceback.format_exc()there would make debugging much easier.
Thanks for open-sourcing the weights and code — the one-word fix above got 2-GPU inference working end to end for us.
- 主要言語
- Python
- スター
- 2.4k
- フォーク
- 257
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SkyworkAI/Matrix-Game のほかの issue
-
Replace deprecated v2.ToTensor() in Matrix-Game-2/inference.py with v2.ToImage() + v2.ToDtype(scale=True)対応中かも @xyf5432 が 53 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
SkyworkAI/Matrix-Game#82 ·
-
run logic error when finish対応中かも @Arison591 が 90 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
SkyworkAI/Matrix-Game#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 12/100
SkyworkAI/Matrix-Game#88 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
SkyworkAI/Matrix-Game#87 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
SkyworkAI/Matrix-Game#86 ·
SkyworkAI/Matrix-Game の issue をすべて見る
似ている issue
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 72/100
sujithputta02/Esapay#13 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gke-labs/kube-agents#3277 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jbacalso24/mimry#291 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
eli-alvarado/us-watchlist-alerts#14 ·
メンテナーはふだん 1 日以内に返信