File format of input image data
Very excellent work! Can you elaborate on how to construct the input data? Sorry I didn't read the composition of the input data at GameWorldScore, when I directly use Matrix-Game-main/GameWorldScore/asset/init_image as the input path, I get the following error:
Traceback (most recent call last):
File "/home/suqian.lhf/video_model/Matrix-Game-main/inference_bench.py", line 317, in
hello @haofengl, it seems that you haven't installed flash-attn 3 correctly
hello @haofengl, it seems that you haven't installed flash-attn 3 correctly
Thanks, my environment is as follows: python 3.10.18 、 torch 2.5.1 、 cuda 12.4 、 apex 0.1、 flash-attn 2.7.4.post1, Are there environmental conflicts?
In addition, I downloaded "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+ cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" and executed pip install to install flash-attn and it shows that the installation was successful.
hello @haofengl, it seems that you haven't installed flash-attn 3 correctly
Thanks, my environment is as follows: python 3.10.18 、 torch 2.5.1 、 cuda 12.4 、 apex 0.1、 flash-attn 2.7.4.post1, Are there environmental conflicts?
In addition, I downloaded "https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+ cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl" and executed pip install to install flash-attn and it shows that the installation was successful.
This code requires flash-attn3 and is incompatible with flash-attn2
@haofengl
If you're encountering difficulties installing Flash Attention 3, you can try the following modifications to the code in matrixgame/model_variants/matrixgame_dit_src/attention.py:
- Change the import statement:
from flash_attn_interface import flash_attn_varlen_func
-->
from flash_attn.flash_attn_interface import flash_attn_varlen_func
- Modify the function call
x, _ = flash_attn_varlen_func(
q,
k,
v,
cu_seqlens_q,
cu_seqlens_kv,
max_seqlen_q,
max_seqlen_kv,
)
-->
x = flash_attn_varlen_func(
q,
k,
v,
cu_seqlens_q,
cu_seqlens_kv,
max_seqlen_q,
max_seqlen_kv,
)
@haofengl If you're encountering difficulties installing Flash Attention 3, you can try the following modifications to the code in
matrixgame/model_variants/matrixgame_dit_src/attention.py:
- Change the import statement:
from flash_attn_interface import flash_attn_varlen_func --> from flash_attn.flash_attn_interface import flash_attn_varlen_func 2. Modify the function call
x, _ = flash_attn_varlen_func( q, k, v, cu_seqlens_q, cu_seqlens_kv, max_seqlen_q, max_seqlen_kv, ) --> x = flash_attn_varlen_func( q, k, v, cu_seqlens_q, cu_seqlens_kv, max_seqlen_q, max_seqlen_kv, )
Thank you very much.