DEV Community

Cover image for Installing ComfyUI in any Linux distro (quick and easy)
Shishir Bhandari
Shishir Bhandari

Posted on

Installing ComfyUI in any Linux distro (quick and easy)

ComfyUI is one of the most popular tool to run local LLMs whether it is image generation, video generation or text generation; On Windows OS, ComfyUI provides official desktop app, however, in linux, there is no such desktop app. We can easily install ComfyUI on our own by using their official github repository.

Following steps can be followed on any linux environment; I have tried to keep this instruction distro-independent.

Please make sure to have already installed the GPU drivers for your specific GPU (Nvidia/AMD/Intel).

Installation Steps

Clone ComfyUI repository

First of all, let's clone the official ComfyUI repository in a local folder. For example, I have created a folder called softwares in my home directory.

mkdir -p softwares
cd softwares
Enter fullscreen mode Exit fullscreen mode
git clone https://github.com/Comfy-Org/ComfyUI.git
Enter fullscreen mode Exit fullscreen mode
cd ComfyUI
Enter fullscreen mode Exit fullscreen mode

Install uv

uv is a very fast python package manager that also supports python verion management, alternative to popular tool pyenv.

curl -LsSf https://astral.sh/uv/install.sh | sh
Enter fullscreen mode Exit fullscreen mode
exec "$SHELL"
Enter fullscreen mode Exit fullscreen mode

Verify

uv --version
Enter fullscreen mode Exit fullscreen mode

Install python 3.13

Let's install uv to install python 3.13 because ComfyUI might break and some components might not work on the latest python version 3.14.

uv python install 3.13
Enter fullscreen mode Exit fullscreen mode
exec "$SHELL"
Enter fullscreen mode Exit fullscreen mode

Create virtual environment

In the ComfyUI directory, let's create a new python 3.13 virtual environment using uv

uv venv --python 3.13
Enter fullscreen mode Exit fullscreen mode

Install pytorch

We need to install pytorch differently depending on what GPU we have. This step might take some time depending on the internet speed.

Nvidia GPU

uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
Enter fullscreen mode Exit fullscreen mode

AMD GPU

uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.2
Enter fullscreen mode Exit fullscreen mode

Intel GPU

uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu
Enter fullscreen mode Exit fullscreen mode

Install dependencies/requirements

After installing the pytorch based on your GPU, we have to install the requirements of ComfyUI using the following commands.

uv pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Installing manager requirements is optional, but it is recommended to install manager requirements as well because we might want to install ComfyUI addons and plugins later.

# Optional: Installing ComfyUI manager requirements
uv pip install -r manager-requirements.txt
Enter fullscreen mode Exit fullscreen mode

All the requirements have been installed; now, we can run the comfy ui.

Running the comfy UI

Run one of the following command depending whether you want ComfyUI manager or not. Enabling manager is recommended
Without manager

uv run python3.13 main.py
Enter fullscreen mode Exit fullscreen mode

With manager

uv run python3.13 main.py --enable-manager
Enter fullscreen mode Exit fullscreen mode

Accessing on the browser

Go to your browser and enter the URL: http://127.0.0.1:8188.

Note: the URL and port number is shown in the terminal if you have correctly installed and run the comfyUI.

On the browser, following windows will show up.

Comfy UI home page on first run

Running a workflow and beyond

Choose one of the templates you are interested in and download the required models for that template and run the workflow.

If you are confused in running the workflow, or if it the first time you are using ComfyUI, following youtube video guides you in understanding ComfyUI workflows, how they work and how to create your own workflows.

Top comments (0)