Some ComfyUI nodes, like CatVTON with Detectron2 and DensePose, are much easier to install on Linux than on Windows. WSL 2 gives you a real Ubuntu inside Windows with access to your NVIDIA GPU. This guide installs WSL, CUDA, Miniconda, ComfyUI and CatVTON step by step.
First published February 2025 on the old PixelAI Labs blog. Refreshed in October 2026: the steps below are checked, the links point to the current project pages, and newer options are mentioned where they help.
Requirements
- Windows 10 (version 1903 or later) or Windows 11, 64-bit
- Virtualization turned on in the BIOS/UEFI
- An NVIDIA GPU with a current Windows driver
1. Install WSL 2 and Ubuntu
Turn on Windows Subsystem for Linux and Virtual Machine Platform in Windows Features, restart, then in PowerShell:
wsl --install
wsl --set-default-version 2
wsl -l -vIf Ubuntu shows version 1, upgrade it:
wsl --set-version ubuntu 22. Set up Ubuntu
sudo apt update
sudo apt upgrade
sudo apt install -y build-essentialInstall CUDA 12.1 with GCC 11:
wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
sudo sh cuda_12.1.0_530.30.02_linux.runAdd CUDA to your environment (nano ~/.bashrc), then reload it and check:
export PATH=/usr/local/cuda-12.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
source ~/.bashrc
nvcc --versionInstall cuDNN for CUDA 12 (Ubuntu 24.04):
wget https://developer.download.nvidia.com/compute/cudnn/9.7.1/local_installers/cudnn-local-repo-ubuntu2404-9.7.1_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2404-9.7.1_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2404-9.7.1/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn-cuda-123. Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_24.4.0-0-Linux-x86_64.sh
bash Miniconda3-py311_24.4.0-0-Linux-x86_64.sh
source ~/.bashrcBuilding an AI influencer? The UltraRealistic AI Influencer Pro course shows the complete system with today's models: design one character, train her own LoRA, and make KREA 2 photos and MiniMax H3 talking videos, on the cloud or your own GPU.
4. Install ComfyUI and CatVTON
mkdir comfy && cd comfy
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI/custom_nodes
git clone https://github.com/Comfy-Org/ComfyUI-Manager.git comfyui-manager
git clone https://github.com/pzc163/Comfyui-CatVTON.git
cd ..Create the environment from the main ComfyUI folder:
conda create --name comfyui python=3.11
conda activate comfyui
conda install pytorch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install -r requirements.txt5. CatVTON dependencies
pip install git+https://github.com/facebookresearch/detectron2.git@v0.6
pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose
pip install accelerate diffusers fvcore huggingface_hub hydra-core omegaconf pycocotools scikit-image yacs
pip install ninja==1.11.1.1 iopath==0.1.9 setuptools==58.2.0 Pillow==9.5.0If ComfyUI later complains about libstdc++, link the system library into your conda environment (adjust the path if your environment isn't called comfyui):
sudo apt install --only-upgrade libstdc++6
rm -rf ~/.cache/torch_extensions/
cd ~/miniconda3/envs/comfyui/lib
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.66. Run ComfyUI
conda activate comfyui
cd ~/comfy/ComfyUI
python main.pyOpen the address it prints in your Windows browser. The first run downloads CatVTON's models; the basic workflow is in custom_nodes/Comfyui-CatVTON/workflow.
FAQ
Why use WSL instead of Windows?
Nodes with Linux-first dependencies such as Detectron2 install cleanly on Ubuntu, and WSL 2 still uses your NVIDIA GPU.
Does WSL slow down generation?
GPU speed is about the same. Reading models from Windows drives (/mnt/c) is slower, so keep models inside the Linux file system.
CatVTON broke after I installed other nodes. What now?
Activate the conda environment again and reinstall CatVTON's dependencies from step 5.
Take it further
Once WSL is set up, most Linux-only nodes become easy to install. If you want a ready-made, tested system instead of assembling one yourself, the UltraRealistic AI Influencer Pro course walks through character design, LoRA training, KREA 2 photos and MiniMax H3 videos step by step, and the InstantClone AI Influencer Suite creates consistent images and motion videos from one character image. More free guides are on the PixelAI Labs blog.
Downloads
The basic CatVTON workflow for a local install.



