Comfy-Org / Comfy-Org/ComfyUI

Sage Attention doesn't support head_dim >= 256

Open
#10,689 8 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

Comfy should not attempt to run sageattn() for cases where head_dim is one of the unsupported values. Should just bypass the call with some other attention. See https://github.com/thu-ml/SageAttention/issues/47

### Actual Behavior

Comfy spits out continuous error messages with "Unsupported head dim"

### Steps to Reproduce

Run a model (Pony7 in my case) with sage attention with an unsupported head_dim.

### Debug Logs

```powershell
[2025-11-09 10:39:33.383] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.384] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.384] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.385] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.386] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.388] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.389] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.389] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.390] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.391] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.392] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.393] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.394] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.394] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.395] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.396] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.396] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
[2025-11-09 10:39:33.397] Error running sage attention: Unsupported head_dim: 256, using pytorch attention instead.
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.