How to Check if ComfyUI Is Using the GPU
In this article
To check if ComfyUI is using your GPU, open the ComfyUI console/terminal window when you start it. If you see a line like Using device: cuda or Using device: cuda:0, it is using your NVIDIA GPU. If it says cpu, it is not. This guide explains the exact steps to confirm GPU usage, including during image generation, and how to fix it if it's not using the GPU.
What You'll Need
- ComfyUI installed and working (either the standalone version or via Git clone).
- An NVIDIA GPU with up-to-date drivers (ComfyUI uses CUDA, so AMD/Intel GPUs require extra setup).
- Access to the terminal/console window where ComfyUI runs (or the ability to open a new one).
- Basic familiarity with launching ComfyUI from the command line (optional, but helpful).
Step-by-Step
- Start ComfyUI normally – Double-click the
run_nvidia_gpu.batfile (Windows) or runpython main.pyin your terminal (Linux/macOS). Note the terminal window that opens – this is where the device info appears. - Look at the first few lines of the console output – When ComfyUI starts, it prints a line like
Using device: cudaorUsing device: cpu. If you seecuda, your GPU is being used. If you seecpu, it is not. - If you missed the startup output – You can also check by generating an image. Open the ComfyUI web interface (usually
http://127.0.0.1:8188), load a simple workflow (e.g., the default text-to-image), and click Queue Prompt. - Watch the console during generation – While the image is being generated, the console will show progress lines like
100%|██████████| 20/20 [00:05<00:00, 3.85it/s]. If you seeit/s(iterations per second) and the generation is fast, it is likely using the GPU. If you seeit/sbut the speed is very slow (like 0.1 it/s) and the CPU usage is high, it may be using CPU. - Use the NVIDIA System Monitor (Windows) or nvidia-smi (all platforms) – While generating an image, open a new terminal and run
nvidia-smi. Look for thepythonprocess in the list. If it shows a high GPU memory usage (e.g., 2GB+) and a high GPU-Util percentage (e.g., 90-100%), ComfyUI is using the GPU. On Windows, you can also open Task Manager > Performance > GPU to see the utilization. - Check the ComfyUI settings (optional) – In the ComfyUI web interface, click on the Settings (gear icon) in the top-right. Look for a setting like Device or Execution. It may show the current device. However, this is not always present in all versions, so the console method is more reliable.
Common Mistakes
- Looking at the wrong terminal – If you launched ComfyUI from a shortcut or a script that hides the console, you might not see the output. Make sure you run it from a visible terminal.
- Using the wrong .bat file – The standalone version includes
run_nvidia_gpu.batandrun_cpu.bat. If you accidentally double-click the CPU version, it will use CPU. Always use the GPU version. - Assuming
cudameans GPU is working – If the console saysUsing device: cudabut your GPU drivers are outdated, it may still fail or fall back to CPU. Check the console for any error messages likeCUDA error. - Not checking during generation – The device is only used when generating. If you check the console when idle, it may not show the device. Always run a generation to confirm.
Tips
- Use the
--force-fp16flag – If you have a GPU that supports half-precision, adding--force-fp16to the launch command can speed up generation and confirm GPU usage. But be aware it may cause issues on older GPUs. - Check the ComfyUI version – Newer versions (after 2023) often show the device more clearly. Update if you are using an old version.
- Use
nvidia-smifor a definitive check – It shows real-time GPU utilization. If the GPU-Util column is 0% during generation, it is definitely not using the GPU. - Install the ComfyUI Manager – It provides a system info panel that shows the device in the UI, making it easier to verify without the terminal.
Troubleshooting
- It says
Using device: cpu– This means ComfyUI is not detecting your GPU. Causes: outdated NVIDIA drivers, missing CUDA toolkit, or you launched the CPU version. Update your drivers, install CUDA 11.8 or 12.1 (matching your PyTorch version), and ensure you run the GPU .bat file. - It says
cudabut generation is very slow – This can happen if the GPU is not actually being used due to a fallback. Checknvidia-smiduring generation; if GPU-Util is 0%, try restarting ComfyUI, or reinstall PyTorch with CUDA support. - Error:
CUDA out of memory– This actually confirms GPU usage, but it means your GPU doesn't have enough VRAM. Reduce the image size or batch size, or use the--lowvramflag. - No console output at all – If you are using the standalone version, the console might be hidden. Open a terminal in the ComfyUI folder and run
python main.pymanually to see the output. - AMD/Intel GPU – ComfyUI primarily supports NVIDIA via CUDA. For AMD, you can try the DirectML or ROCm builds, but they are less stable. Check the ComfyUI GitHub for experimental builds.
Frequently Asked Questions
Q: Does ComfyUI automatically use the GPU?
Yes, if you have an NVIDIA GPU with CUDA installed, ComfyUI defaults to using it. If it doesn't, it falls back to CPU.
Q: Can I force ComfyUI to use the GPU?
Yes, run the run_nvidia_gpu.bat file or launch with python main.py --cuda-device 0 (or your GPU index).
Q: How do I know if my GPU is supported?
ComfyUI requires an NVIDIA GPU with at least 4GB VRAM and CUDA compute capability 3.0 or higher. Most modern NVIDIA GPUs work.
Q: Why does ComfyUI use CPU even when I have a GPU?
Common reasons: outdated drivers, missing CUDA toolkit, or launching the CPU version. Also, if you have an old GPU that doesn't support the required CUDA version, it may fall back.
Q: Does using the GPU make generation faster?
Yes, significantly. A GPU can be 10-50x faster than CPU for image generation, depending on the model and hardware.
Q: Can I check GPU usage without generating an image?
Yes, look at the startup console output. If it says Using device: cuda, it is using the GPU even before generation. But to be sure it's actually working, generate a small image.