Comfy-Org / Comfy-Org/ComfyUI

update default command-line arguments for run_amd_gpu.bat

Open
#11,624 0 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Feature Idea

The deault command line in run_amd_gpu.bat is currently:
.\python_embeded\python.exe -s .\ComfyUI\main.py --windows-standalone-build

I ran dozens of tests to find out what the best command line would be.
For me, on my RX 7900 XTX, the best solution is to use both --use-pytorch-cross-attention --disable-smart-memory
This setting gives me about 15% better times.
And when pushing workflows to their limits, then this is the only settings that keeps working without crashing.

proposal: add "--use-pytorch-cross-attention --disable-smart-memory" to run_amd_gpu.bat
(or add this as a suggestion in a comment in run_amd_gpu.bat or in README_VERY_IMPORTANT.txt)

### Existing Solutions

I could not immediately find other references to this issue.

### Other

My findings (limited to Z-Image Turbo and Wan 2.2, and quantized models limited to Q8)
- when using the FP8 or BF16 models : always use both --use-pytorch-cross-attention --disable-smart-memory
- when using Z-Image Turbo : you can skip --disable-smart-memory to gain 1 second, but not necessary. Using use both --use-pytorch-cross-attention --disable-smart-memory give near identical results.
- when using the Q8 models in Wan 2.2:
* resolution <= 640 x 640 : use both --use-pytorch-cross-attention --disable-smart-memory
* resolution > 640 x 640 : use --disable-smart-memory only
(See attched excel for detailed findings)
(if needed: I can provide the comfyui.log for each of these test)

This is of course only tested om my 7000-series card. I don't know if this is also the best solution for 6000- or 9000-series cards.

[CLI_Args.xlsx](https://github.com/user-attachments/files/24422042/CLI_Args.xlsx)

Contributor guide

Open the contributing guide

Research direction

Start with run_amd_gpu.bat and compare its current default command with the proposed PyTorch cross-attention and smart-memory flags. Review README_VERY_IMPORTANT.txt as an alternative location, then check the documented GPU/model findings and determine whether the change should apply broadly or only to the tested hardware. Done means the chosen launcher or documentation clearly reflects the supported recommendation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.