modelscope / DiffSynth-Studio

Enjoy the magic of Diffusion models!
Apache License 2.0
6.4k stars 575 forks source link

PyTorch在编译时没有启用Flash Attention优化 #26

Open SirenYan opened 6 months ago

SirenYan commented 6 months ago

在使用过程非常坎坷/(ㄒoㄒ)/,真的非常想体验这个应用的效果,有没有懂得大佬帮忙康康这个问题啊

D:\AIGC\DiffSynth-Studio-main\diffsynth\models\attention.py:43: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:263.) hidden_states = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=attn_mask)

会一直卡在这里 9cfe7593e788d76049ea08c6b43edf5

Artiprocher commented 6 months ago

这个 warning 不影响使用;并不是卡在那里,而是速度比较慢,可以在 cmd 上输入 nvidia-smi 查看 GPU 使用情况