Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Matrix-Game-3: --fa_version 0 (SDPA) is not implemented; attention() asserts a flash-attn install instead of falling back

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

Start in Matrix-Game-3/wan/modules/attention.py at flash_attention() and trace how the CLI's --fa_version value reaches it. Check the original Wan attention module's SDPA fallback and its warning, then run the CLI with --fa_version 0 both without flash-attn and with FA2 installed. Done means version 0 uses SDPA and attention still works when neither flash-attn build is importable.

索引モデルが issue の本文から書いたものです。

説明

Matrix-Game-3/wan/modules/attention.py no longer has the SDPA fallback that the original Wan attention module ships. The non-FA3 branch of flash_attention() is:

else:
    assert FLASH_ATTN_2_AVAILABLE or FLASH_ATTN_3_AVAILABLE

Two consequences:

  • Without a flash-attn install, every attention call dies on that assertion, so the model cannot run at all on a machine where flash-attn does not build (the CLI's --fa_version 0 suggests SDPA is meant to be selectable).
  • With flash-attn 2 installed, --fa_version 0 still runs the flash-attn 2 kernel: version=0 is neither 3 nor handled anywhere, so it falls through to the same branch. --fa_version 3 with only FA2 installed does degrade with a warning, which is the configuration that worked for us on an H100.

Suggested fix: restore the torch.nn.functional.scaled_dot_product_attention path for version == 0 (and as the fallback when neither flash-attn build is importable), with the warning the upstream Wan module prints. Happy to open a PR if that is the intended behaviour.

Related, still open as of today: the multi-GPU path passes fa_version= to attention() whose parameter is named version (#80, fix in #61), so --ulysses_size > 1 raises TypeError on a clean checkout.

主要言語
Python
スター
2.3k
フォーク
256
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SkyworkAI/Matrix-Game のほかの issue

SkyworkAI/Matrix-Game の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。