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.
- Use Ubuntu 26.04 LTS (Resolute) or 24.04 LTS (Noble), a graphical session, and a 64-bit Intel or AMD processor (
amd64or x64). You need internet access for setup andsudofor APT. - 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.
- 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.
On this page
ToggleInstall Comfy Desktop with APT
Download the official 64-bit Comfy Desktop .deb, save it in Downloads, and check the file name.
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.
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.
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.
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.
sudo apt update && sudo apt reinstall comfyui-desktop-2
Create a local instance and check your GPU
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.
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.
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.
rocminfo
amd-smi list
Generate your first image with Stable Diffusion 1.5
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.
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.
- Add Load Checkpoint and select the SD 1.5 file. Connect its
MODELto KSampler →model. - Add two CLIP Text Encode (Prompt) nodes. Connect the checkpoint’s
CLIPto bothclipinputs. Connect theirCONDITIONINGoutputs to KSampler’spositiveandnegativeinputs, respectively. Try an alpine lake at dawn, pine trees, watercolor illustration for the positive prompt and blurry, text, watermark for the negative prompt. - Add Empty Latent Image. Set width and height to 512 and
batch_sizeto 1. ConnectLATENTto KSampler’slatent_imageinput. Leave the sampler defaults for the first run. - Connect KSampler’s
LATENTto VAE Decode →samplesand the checkpoint’sVAEto the decoder’svae. Connect the decoder’sIMAGEto Save Image →images. - 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
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.
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.
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.
--lowvramhas no effect while it is active. On setups without Dynamic VRAM, such as standard ROCm 7.2,--lowvrammoves text encoders to the CPU. --reserve-vram 1.5reserves about 1.5 GB for Ubuntu and other apps. Use it to give the desktop headroom. It reduces the VRAM available to ComfyUI.--cache-noneavoids retaining cached node outputs in RAM or VRAM between runs. Expect nodes to rerun even when their inputs stay the same.--novramis a last resort for more aggressive offloading. Use it in place of--lowvramand expect slower runs.
Install ComfyUI with uv and use it in your browser
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.
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.
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.
uv pip install --python .venv/bin/python torch torchvision torchaudio \
--extra-index-url https://download.pytorch.org/whl/cu130
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.
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.
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
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.
sudo apt update && sudo apt upgrade
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.
sudo apt remove comfyui-desktop-2
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.
