Comfy-Org / Comfy-Org/ComfyUI

Enable --use-pytorch-cross-attention for gfx1201

Open
#9,910 1 comment 1 reaction 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Feature Idea

Well, as you've asked:

> If this improves speed for you on latest pytorch on your GPU please report it so that I can enable it by default.

Sharing some benchmark on RX9070XT (ASUS @317W TDP):
Linux headless, ROCm 6.4.3
Model for test: QWEN-Image, default prompt and workflow (fox-like anime girl with sign)
Comfy log:

> Total VRAM 16304 MB, total RAM 515564 MB
> pytorch version: 2.8.0+rocm6.4
> AMD arch: gfx1201
> ROCm version: (6, 4)
> Set vram state to: NORMAL_VRAM
> Device: cuda:0 AMD Radeon RX 9070 XT : native
> Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
> Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
> ComfyUI version: 0.3.51
> ComfyUI frontend version: 1.25.9
> ### Loading: ComfyUI-Manager (V3.36)
> [ComfyUI-Manager] network_mode: public
> ### ComfyUI Version: v0.3.51-12-gff577936 | Released on '2025-08-22'

Default run:

> Requested to load QwenImage
> loaded partially 7639.87951171875 7635.648010253906 0
> 20/20 [02:37<00:00, 7.89s/it]
> Requested to load WanVAE
> 0 models unloaded.
> loaded completely 6176.400000000001 242.02829551696777 True
> Prompt executed in 219.98 seconds

Run with pytorch-cross-attention:
_**TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python3 main.py --listen 0.0.0.0 --use-pytorch-cross-attention**_

> Requested to load QwenImage
> loaded partially 14013.98351171875 14008.940002441406 0
> 20/20 [02:13<00:00, 6.66s/it]
> Requested to load WanVAE
> 0 models unloaded.
> loaded completely 6148.0 242.02829551696777 True
> Prompt executed in 200.87 seconds

Seems about 20% performance increase, no visible issues on image

### Existing Solutions

_No response_

### 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.