brunzelBrain Dump Deutsch

Installing ComfyUI cleanly on Windows 11: the ultimate Conda guide (troubleshooting included)

About 5 min read
Installing ComfyUI cleanly on Windows 11: the ultimate Conda guide (troubleshooting included)
Cover

Once you get deeper into generative AI, there's hardly any way around ComfyUI. The node-based interface is extremely powerful, but it rarely forgives a messy system. If you don't want to wreck your regular system Python with clashing dependencies, Conda is the way to go.

In this guide I'll show you how to set up ComfyUI in a completely isolated environment – and how to elegantly hop over the typical Windows stumbling blocks (keywords: the CPU trap and missing paths).

1. Get the tools ready

Before we type any code, we need the foundation. Download the following two tools and install them with the default settings:

  1. Git for Windows: We need it to pull ComfyUI straight from the repository and keep it up to date later. (git-scm.com)
  2. Miniconda: The slim version of Anaconda. It gives us the virtual environment without loading the system with unnecessary ballast. (docs.anaconda.com/miniconda/)

2. Step-by-step installation

Once the tools are installed, we set up the environment. Open the Miniconda Prompt from your Windows Start menu.

Step 1: Create & activate the Conda environment

We create a dedicated environment called comfyui and go with Python 3.11 – currently the most stable sweet spot for most custom nodes.

Bash

conda create -n comfyui python=3.11 -y
conda activate comfyui

(You'll know it worked when the prefix in the terminal changes from (base) to (comfyui).)

Step 2: Clone the repository

Navigate to the drive and folder where ComfyUI should live (e.g. E:\), clone the official repository and change into the folder:

Bash

E:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

Step 3: Install the core dependencies

Now we install the remaining Python packages ComfyUI needs to come to life:

Bash

pip install -r requirements.txt

3. Troubleshooting: when things get stuck (the classics)

The theory sounds great, but in Windows practice you almost always run into at least one of two traps. Here are the fixes.

Boss fight #1: PowerShell refuses to cooperate

You type the conda command into your normal Windows PowerShell and get a red error message:

The term "conda" is not recognized as the name of a cmdlet, function […].

  • The cause: Your normal PowerShell simply doesn't know where Miniconda lives yet.
  • The fix: Either you stubbornly stick to the Miniconda Prompt for the setup, or you register Conda once for your normal PowerShell with this command (PowerShell): & "$env:USERPROFILE\miniconda3\Scripts\conda.exe" init powershell Then close PowerShell completely, open it again, and conda works everywhere.

Boss fight #2: the PyTorch CPU trap

You try to start ComfyUI with python main.py and get kicked out with this error:

AssertionError: Torch not compiled with CUDA enabled

  • The cause: On Windows, pip often quietly downloads the CPU-only version of PyTorch. But ComfyUI absolutely needs CUDA support for your NVIDIA graphics card.
  • The test: You can check detection in the terminal with (PowerShell): python -c "import torch; print('CUDA available:', torch.cuda.is_available())" If it says False, you've got the wrong version.
  • The fix (the crowbar): We force pip to ignore the default sources and pull PyTorch with CUDA 12.4 support straight from PyTorch's own servers (PowerShell): pip install --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
  • Plan B via Conda: If pip keeps being stubborn, we let Conda do the work. It pulls the NVIDIA packages in isolation and reliably (PowerShell): conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia -y

4. Don't panic about the log warnings

When ComfyUI starts successfully for the first time, a few yellow warnings sometimes show up in the log. Don't worry, the system still runs:

  • Unsupported Pytorch / DynamicVRAM: ComfyUI supports a new VRAM feature that requires PyTorch 2.8+. If you're on CUDA 12.4 and an older Torch version (for stability), ComfyUI simply uses the classic, proven memory management. For cards like an RTX 3060 Ti (8 GB) that's no problem at all.
  • User settings moved to server: That's actually good news. Your UI settings are now stored locally on disk instead of in the volatile browser cache.
  • Multi-user setup hint: Just a heads-up in case several people were accessing the instance. Since you're sitting in front of it alone locally, you can ignore it.

5. Comfort tuning: the perfect launch file

So you don't have to open the terminal and activate the environment by hand every time, let's build a launch script. Create a text file in the ComfyUI main folder, name it start_comfyui.bat (important: the extension must be .bat, not .txt) and put the following in it:

Code snippet

@echo off
call "%USERPROFILE%\miniconda3\Scripts\activate.bat" comfyui
cd /d "%~dp0"
python main.py --auto-launch --preview-method taesd
pause

Why exactly these launch arguments?

  • --auto-launch: Automatically opens your default browser with the ComfyUI interface (http://127.0.0.1:8188) as soon as the backend is ready.
  • --preview-method taesd: Enables an extremely lightweight live preview while rendering. That saves precious VRAM and prevents "out of memory" crashes just before the image is finished.

Tip for power users: If ComfyUI runs on your main PC but you want to control it from the laptop on the couch, add the argument --listen to the end of the command. That opens the interface to your local network.

Now all that's left is to drop your checkpoints into the ComfyUI/models/checkpoints/ folder, and nothing stands in the way of the creative phase!