Install ComfyUI
PyEnv
I'm working with Ubuntu 26
sudo apt install python3-pip pyenv git
Edit ~/.profile and add this (as stated when calling pyenv init):
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"
Log off and in again!!!
Install the newest Python 3.13 version
# Find versions
pyenv install -l | grep 3.13
# Install the latest version (in my case 3.13.7)
pyenv install 3.13.7
Create a directory for comfy and prepare it to use python 3.13:
mkdir $HOME/comfy
cd $HOME/comfy
pyenv local 3.13.7
# Check that the correct version is being used
python --version
Create a virtual environment for confy and enter it:
python -m venv venv
source venv/bin/activate
Follow github.com/Comfy-Org/ComfyUI#manual-install-windows-linux
I had an error with the AMD path becasue my temp directory was too small (16GB), so I jsut created a new one:
mkdir -p $HOME/comfy/tmp
export TMPDIR=$HOME/comfy/tmp
Here is my list of commands for an AMD setup - I had to redo the AMD pip call a few times due to network errors:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.2
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
Then start the server and open the URL stated at the end when started:
python main.py
If you have problems with a non-supported GPU, you can try if everything else is running by starting in CPU mode:
python main.py --cpu --cpu-vae