Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#86 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
2.3k
Fork
256
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SkyworkAI/Matrix-Game

Tutte le issue di SkyworkAI/Matrix-Game

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.