ComfyUI on WSL with ROCm | Full Walkthrough
Published on:
Views: 0
Likes: 0
Tags:
# If you dont have WSL installed view this: https://youtu.be/Z05cgYgqG2A # If you do not have ROCm installed on WSL view this: https://youtu.be/lIAQeoqSCfo # Install Git sudo apt install -y git # Install Python 3 and pip sudo apt install -y python3 python3-pip # Install venv module for virtual environments sudo apt install -y python3-venv # create a change directory to comfyui directory mkdir -p ~/comfyui && cd ~/comfyui # Create virtual environment python3 -m venv comfyuivenv --system-site-packages # Activate virtual environment source comfyuivenv/bin/activate # Download pytorch and triton wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.2/torch-2.6.0%2Brocm6.4.2.git76481f7c-cp312-cp312-linux_x86_64.whl wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.2/torchvision-0.21.0%2Brocm6.4.2.git4040d51f-cp312-cp312-linux_x86_64.whl wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.2/pytorch_triton_rocm-3.2.0%2Brocm6.4.2.git7e948ebf-cp312-cp312-linux_x86_64.whl wget https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4.2/torchaudio-2.6.0%2Brocm6.4.2.gitd8831425-cp312-cp312-linux_x86_64.whl # Uninstall any old version of pytorch and triton pip3 uninstall torch torchvision pytorch-triton-rocm # Install pytorch and triton pip3 install torch-2.6.0+rocm6.4.2.git76481f7c-cp312-cp312-linux_x86_64.whl torchvision-0.21.0+rocm6.4.2.git4040d51f-cp312-cp312-linux_x86_64.whl torchaudio-2.6.0+rocm6.4.2.gitd8831425-cp312-cp312-linux_x86_64.whl pytorch_triton_rocm-3.2.0+rocm6.4.2.git7e948ebf-cp312-cp312-linux_x86_64.whl # Remove conflicting file from torch rm comfyuivenv/lib/python3.12/site-packages/torch/lib/libhsa-runtime64.so # Clone comfyui git clone https://github.com/comfyanonymous/ComfyUI.git # Remove torch, torchvision, and torchaudio from requirements file sudo nano requirements.txt # Install requirements for comfyui pip install -r requirements.txt # Run comfyUI python3 main.py # Getting to WSL files \\wsl.localhost # How to stop comfyui from running control + C # How to get out of your virtual environment deactivate # How to start comfyUI from fresh terminal cd comfyui/ComfyUI source ~/comfyui/comfyuivenv/bin/activate python3 main.py