How to Install and Use ComfyUI on Ubuntu 26.04 and 24.04

Share

To install ComfyUI on Ubuntu 26.04 or 24.04 LTS, download the official Comfy Desktop .deb, install it with APT, then open Comfy Desktop and choose Local. ComfyUI connects models, prompts, and image-processing steps in a visual graph. Start by generating one small image on your own computer.

Before you begin
  1. System and access. Use Ubuntu 26.04 LTS (Resolute) or 24.04 LTS (Noble), a graphical session, and a 64-bit Intel or AMD processor (amd64 or x64). You need internet access for setup and sudo for APT.
  2. Memory and storage. Allow about 5 GB for the base environment and budget another 20–50 GB or more of free SSD space for checkpoints and outputs. Comfy Desktop lists 8 GB of system RAM as a minimum and recommends 16 GB.
  3. GPU drivers. Set up a working host driver first. See the Ubuntu CUDA and ROCm guide for GPU and driver checks. For NVIDIA, a compatible host driver is enough for the bundled Desktop environment, which includes its own isolated Python and PyTorch GPU wheels.

Install Comfy Desktop with APT

Step 1. Install the official Ubuntu package

Download the official 64-bit Comfy Desktop .deb, save it in Downloads, and check the file name.

Ubuntu terminal
cd ~/Downloads && ls -1 -- comfyui-desktop-2*.deb

Replace DOWNLOADED-FILENAME.deb with the exact file you downloaded. Keep the leading ./ so APT reads the local package and resolves its dependencies.

Ubuntu terminal
sudo apt install ./DOWNLOADED-FILENAME.deb

APT installs comfyui-desktop-2 under /opt/Comfy Desktop. The installer adds /etc/apt/sources.list.d/comfyui-desktop-2.sources and an unattended-upgrades entry for the launcher.

Step 2. Check the AppArmor profile

Ubuntu 26.04 and 24.04 restrict unprivileged user namespaces. With AppArmor enabled and the bundled profile accepted, the package installs an app-specific profile so Electron can use its sandbox without extra flags.

Ubuntu terminal
ls /etc/apparmor.d/comfyui-desktop-2

If the profile is missing after an Ubuntu upgrade, reinstall the package from the Comfy Desktop APT source to rerun profile setup.

Ubuntu terminal
sudo apt update && sudo apt reinstall comfyui-desktop-2

Create a local instance and check your GPU

Step 3. Launch your first local instance

Open Comfy Desktop from the app menu and choose Local. Use Express Install if the detected hardware is correct and you want the defaults. For a different device or location, leave Express Install unchecked and follow the wizard. Launch the new instance from its dashboard card.

Desktop puts isolated environments under ~/ComfyUI-Installs by default and shared models and generated files under ~/ComfyUI-Shared. Check Desktop Settings → Storage if you chose another location.

Step 4. Confirm ComfyUI is using the GPU

Open the instance startup logs and look for the detected GPU name and Total VRAM. A CPU device line indicates CPU execution. AMD may appear as cuda:0 because PyTorch uses its CUDA device API for ROCm too. Look for the AMD model and ROCm/HIP details together.

On NVIDIA, check that the host driver sees your card.

Ubuntu terminal
nvidia-smi

On AMD, use whichever diagnostic you installed. rocminfo should show a GPU agent, or amd-smi list should list the GPU. The instance logs tell you which device ComfyUI chose.

AMD ROCm device check
rocminfo
AMD SMI device check
amd-smi list

Generate your first image with Stable Diffusion 1.5

Step 5. Put the checkpoint in the right folder

Download v1-5-pruned-emaonly-fp16.safetensors. The checkpoint supplies the model, text encoder, and decoder for this workflow.

  • Comfy Desktop: ~/ComfyUI-Shared/models/checkpoints/
  • Manual Git install: ComfyUI/models/checkpoints/ inside the clone.

Check Desktop Settings → Storage if you set a different shared folder. Create the checkpoints subfolder if needed. Refresh the node definitions or restart the instance to pick up a new file.

Step 6. Connect the nodes and run the workflow

Start a new workflow. Double-click an empty area of the canvas to find each node. Drag from the named output on the right side of one node to the matching input on the next.

  1. Add Load Checkpoint and select the SD 1.5 file. Connect its MODEL to KSampler → model.
  2. Add two CLIP Text Encode (Prompt) nodes. Connect the checkpoint’s CLIP to both clip inputs. Connect their CONDITIONING outputs to KSampler’s positive and negative inputs, respectively. Try an alpine lake at dawn, pine trees, watercolor illustration for the positive prompt and blurry, text, watermark for the negative prompt.
  3. Add Empty Latent Image. Set width and height to 512 and batch_size to 1. Connect LATENT to KSampler’s latent_image input. Leave the sampler defaults for the first run.
  4. Connect KSampler’s LATENT to VAE Decode → samples and the checkpoint’s VAE to the decoder’s vae. Connect the decoder’s IMAGE to Save Image → images.
  5. Click Run. The finished image appears in Save Image.

Find the PNG in ~/ComfyUI-Shared/output/ in Desktop or ComfyUI/output/ in a manual install. Drag the original PNG back onto the canvas to reopen the workflow if its embedded metadata is intact. Save a separate workflow JSON if you plan to edit or share the image.

Fix GPU, checkpoint, and memory problems

GPU absent or ComfyUI uses the CPU

Check the host driver and restart Ubuntu if you just updated it. Check the hardware selected for the Desktop instance. On a manual install, run the PyTorch check below from the environment you use to start ComfyUI.

Checkpoint is missing from Load Checkpoint

Check the folder for your install type, the file’s .safetensors extension, and whether the download finished. Refresh the node definitions or restart the instance, then select the checkpoint again.

CUDA or ROCm runs out of memory

Start at 512 × 512, set batch_size to 1, and close other GPU-heavy apps. If the problem persists, adjust one launch argument at a time and restart. Use the instance’s launch arguments in Desktop or append flags to the manual launch command.

  • Dynamic VRAM: Current ComfyUI enables it by default on supported NVIDIA setups. Look for DynamicVRAM support detected and enabled in the log. --lowvram has no effect while it is active. On setups without Dynamic VRAM, such as standard ROCm 7.2, --lowvram moves text encoders to the CPU.
  • --reserve-vram 1.5 reserves about 1.5 GB for Ubuntu and other apps. Use it to give the desktop headroom. It reduces the VRAM available to ComfyUI.
  • --cache-none avoids retaining cached node outputs in RAM or VRAM between runs. Expect nodes to rerun even when their inputs stay the same.
  • --novram is a last resort for more aggressive offloading. Use it in place of --lowvram and expect slower runs.

Install ComfyUI with uv and use it in your browser

Step 7. Create an isolated Python 3.13 environment

Follow the guide to install uv on Ubuntu first. Ubuntu 26.04 defaults to Python 3.14 and Ubuntu 24.04 to 3.12. Using upstream-recommended Python 3.13 on both releases avoids some custom-node dependency issues with Python 3.14.

These commands assume ~/ComfyUI is available for a new clone. If it already exists, choose a different clone path and enter that folder before creating the environment.

Ubuntu terminal
sudo apt update && sudo apt install git
cd ~ && git clone https://github.com/Comfy-Org/ComfyUI.git && cd ComfyUI
uv venv --managed-python --python 3.13

The uv venv command creates .venv. The next commands install packages into it and leave the Ubuntu Python and APT-managed packages alone.

Step 8. Install PyTorch for your GPU

Run only the command for your hardware. For AMD, the ROCm 7.2 example applies to compatible Ubuntu 24.04 configurations. Check the ROCm 7.2 compatibility matrix for your GPU and kernel. On Ubuntu 26.04, start with Comfy Desktop or use AMD’s PyTorch instructions to choose a compatible GPU, kernel, and PyTorch build before continuing with the manual setup.

NVIDIA RTX 20 series or newer
uv pip install --python .venv/bin/python torch torchvision torchaudio \
  --extra-index-url https://download.pytorch.org/whl/cu130
AMD with a compatible ROCm 7.2 setup
uv pip install --python .venv/bin/python torch torchvision torchaudio \
  --index-url https://download.pytorch.org/whl/rocm7.2

For a legacy GTX 10-series card, use a Pascal-compatible build from the cu126 index in place of cu130. Check that the selected PyTorch wheel still supports Pascal.

Step 9. Install dependencies and launch ComfyUI
Ubuntu terminal
uv pip install --python .venv/bin/python -r requirements.txt
uv run --no-project python -c 'import torch; print(torch.__version__, "CUDA:", torch.version.cuda, "HIP:", torch.version.hip); print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else "GPU unavailable")'

Expect the GPU name and a CUDA version for NVIDIA or a HIP version for AMD. If you see GPU unavailable, check your driver and wheel selection first. --no-project runs the existing virtual environment without syncing the checkout as a uv project.

Ubuntu terminal
uv run --no-project python main.py

Open http://127.0.0.1:8188 on the same computer. ComfyUI listens on localhost by default. Keep the terminal open while you work and press Ctrl+C to stop the server. Use the manual model and output paths in the first-image steps above.

Update or uninstall Comfy Desktop

Step 10. Update the app and its instance

APT updates the Desktop launcher from its configured repository. Review the package list before confirming, since an upgrade can include other Ubuntu packages. To update ComfyUI itself, use the update controls for the instance in the Desktop dashboard.

Ubuntu terminal
sudo apt update && sudo apt upgrade
Step 11. Remove the launcher and keep your files

Close Comfy Desktop first. remove uninstalls the app and its AppArmor profile, leaving the APT source and unattended-upgrades configuration. Choose purge instead to remove those APT files too.

Remove the app
sudo apt remove comfyui-desktop-2
Remove the app and update source
sudo apt purge comfyui-desktop-2

Both commands preserve ~/ComfyUI-Shared and ~/ComfyUI-Installs. Keep both folders and any custom storage locations to preserve your models, generated PNGs, and workflows. Keep any workflow JSON you saved elsewhere too.

For a later full cleanup, review these default user paths separately. Removing this data can clear the app’s settings and instance list.

  • ~/.config/comfyui-desktop-2
  • ~/.config/Comfy Desktop
  • ~/.local/share/comfyui-desktop-2
  • ~/.cache/comfyui-desktop-2
  • ~/.local/state/comfyui-desktop-2

Frequently asked questions

Can I run ComfyUI without a dedicated GPU?

Yes. A CPU-only setup can run small workflows, but image generation is much slower. Start with a 512 × 512 image and a batch size of one.

Do I need to install the CUDA Toolkit for Comfy Desktop?

For the bundled NVIDIA environment, you need a compatible NVIDIA host driver. Comfy Desktop supplies Python, PyTorch, and the CUDA runtime dependencies.

Where does ComfyUI save generated images?

A default Linux Comfy Desktop instance saves PNGs under ~/ComfyUI-Shared/output/. A manual Git install saves them under ComfyUI/output/ unless you change the output directory.

Helpful Resources

r/ComfyUI Ask the community about workflows and hardware.
Comfy Desktop on Linux Official package, update, and removal instructions.
ComfyUI’s first-image walkthrough See the node connections and the finished graph.
ComfyUI on GitHub Find the source, releases, and manual install notes.