Optimizing ComfyUI Startup on NVIDIA GPUs
While running ComfyUI is as simple as launching the run_nvidia_gpu.bat
script, you can significantly enhance its performance and ensure you're using the latest interface by modifying this file. This guide explains the default command and introduces powerful flags to speed up generation.
Default Startup Command
By default, the script contains a basic command to launch the application:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
pause
Enhanced Startup Command
For better performance and the latest features, you can replace the default command with this enhanced version:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast --use-sage-attention --front-end-version Comfy-Org/ComfyUI_frontend@latest
pause
Understanding the Flags
Flag | Purpose |
---|---|
--fast | Enables experimental speed optimizations, especially for Flux models, at the potential cost of slight quality variation. Recommended for RTX 40 series and newer. |
--use-sage-attention | Activates SageAttention for potentially faster or more efficient attention computations. You must install it and Triton first. |
--front-end-version Comfy-Org/ComfyUI_frontend@latest | Loads the very latest UI version directly from the official frontend GitHub repository, ensuring you always have the newest features. |
How to Apply
- Navigate to your ComfyUI installation directory.
- Right-click on run_nvidia_gpu.bat, select "Show more options" (on Windows 11), and click "Edit".
- Replace the original command line with the new Enhanced Startup Command.
- Save and close the file. Now, when you run the script, ComfyUI will launch with the optimizations enabled.