Install and Verify a Clean ComfyUI Environment on Linux
Prepare a project-local ComfyUI installation and verify its startup before adding model files or custom nodes.
Difficulty Intermediate
Check the machine and installation instructions
Use a Linux workstation with Git, Python and the matching venv package. A suitable GPU is strongly preferable for diffusion generation. A CPU launch can verify the interface on many machines and may be too slow for practical generation. Read the official installation page for currently supported Python and accelerator combinations. Record your GPU, driver, Python version and free space.
python3 --version
df -h .
git --version
Create a clean environment
Clone the official repository using the URL in the installation page. Enter the checkout and run the following from there. Keep the virtual environment private to this project.
git rev-parse HEAD
python3 -m venv .venv
. .venv/bin/activate
python -m pip --version
Install the documented PyTorch build for your machine before installing ComfyUI's requirements. CPU, CUDA and ROCm use different packages or indexes, and the supported combination can change. Use the vendor instructions for that choice.
python -m pip install -r requirements.txt
python -m pip check
python main.py --cpu --listen 127.0.0.1
Verify the interface
Open the loopback URL printed by the process. The browser should show the editor, even before you add a model. For an accelerator test, stop the CPU session and restart without the --cpu flag once the correct build and driver are in place. Record the detected device from the startup log. Stop the server with Ctrl+C when finished.
Troubleshooting and practice
If the browser cannot connect, read the first startup error and check whether the chosen port is already occupied. If pip reports incompatible requirements, recreate the environment with a supported Python version. If generation later runs out of VRAM, start with a smaller compatible model and lower resolution. For practice, record the exact Git revision and package list, then explain which entries identify the application's code and which identify the installed runtime. Keep the editor on loopback. Download checkpoints from sources you trust and review licences before use.