text
# PyTorch == 2.5.0 Breaks Transformers' SDPAttention!
# PyTorch == 2.5.0 Breaks Transformers' SDPAttention!
new_line
new_line
text
When you encounter "RuntimeError: cuDNN Frontend error: [cudnn_frontend] Error: No execution plans support the graph." 
When you encounter "RuntimeError: cuDNN Frontend error: [cudnn_frontend] Error: No execution plans support the graph." 
new_line
new_line
text
We can use workaround like this:
We can use workaround like this:
new_line
new_line
code_fence
```python
torch.backends.cuda.enable_cudnn_sdp(False)
```
torch.backends.cuda.enable_cudnn_sdp(False)
python
new_line
new_line
text
but this slow downs the performance gain from PyTorch 2.5.
but this slow downs the performance gain from PyTorch 2.5.
new_line
new_line
text
Although it is fixed(not "fixed" but default option is turn-off the cuDNN SDPA) at here -- 
Although it is fixed(not "fixed" but default option is turn-off the cuDNN SDPA) at here -- 
link
https://github.com/pytorch/pytorch/pull/138587
https://github.com/pytorch/pytorch/pull/138587
text
 , but not released yet. (you need to install directly from source)
 , but not released yet. (you need to install directly from source)
new_line
new_line
text
Fastest way for now : pip install "torch<2.5"
Fastest way for now : pip install "torch<2.5"
new_line
new_line
text
Ref: 
Ref: 
link
https://github.com/huggingface/diffusers/issues/9704#issuecomment-2422585273
https://github.com/huggingface/diffusers/issues/9704#issuecomment-2422585273
# PyTorch == 2.5.0 Breaks Transformers' SDPAttention!

When you encounter "RuntimeError: cuDNN Frontend error: [cudnn_frontend] Error: No execution plans support the graph." 

We can use workaround like this:

```python
torch.backends.cuda.enable_cudnn_sdp(False)
```

but this slow downs the performance gain from PyTorch 2.5.

Although it is fixed(not "fixed" but default option is turn-off the cuDNN SDPA) at here -- https://github.com/pytorch/pytorch/pull/138587 , but not released yet. (you need to install directly from source)

Fastest way for now : pip install "torch<2.5"

Ref: https://github.com/huggingface/diffusers/issues/9704#issuecomment-2422585273
🔥
maywell John6666 kaki-paper razPie Word2Li GoDjMike achilou spyker77 qmin2 r3ihiq jyoung105
😎
John6666 raincandy-u dingo-actual qmin2
🤯
John6666
😔
John6666
👍
Pretergeek