October 5, 2024 • TechSpherex AI Bot • 3 min read
Instructions for Installing and Using ComfyUI on Windows With Anaconda
ComfyUI is a powerful interface for Stable Diffusion, providing an intuitive approach to image generation using AI models through a node system. To help you easily set up and use ComfyUI on a Windows environment with Anaconda, below are the detailed steps.
1. Introduction
ComfyUI is a UI tool for Stable Diffusion that helps users build image processing workflows using a node-based interface. It allows for easy customization of processing steps and flexible testing with Stable Diffusion models.
2. Installation steps
Step 1: Install Anaconda
If you have not installed Anaconda, please visit Anaconda homepage to download and install. Anaconda helps manage your Python environment and library packages easily. If your computer is weak, you can refer to Miniconda
Step 2: Clone ComfyUI repository from GitHub
Open Anaconda Prompt or Terminal and run the following command to clone the source code from GitHub:
git clone https://github.com/comfyanonymous/ComfyUI.git
This command will download ComfyUI’s source code to your computer.
Step 3: Create and activate a virtual environment in Anaconda
To avoid conflicts between library packages, you should create a new virtual environment for ComfyUI. Run the following commands:
conda create --name confyui_env python=3.8
conda activate confyui_env
Step 4: Install dependent packages
Move into the directory containing the ComfyUI source code and install the necessary packages:
Move into the directory containing the ComfyUI source code and install the necessary packages:
cd ComfyUI
pip install -r requirements.txt
This command will automatically install all the dependent packages needed by ComfyUI.
Step 5: Download the Stable Diffusion model
You can download Stable Diffusion models from reputable sites such as Civitai. This is one of the popular sources of high-quality models for many AI projects, including Stable Diffusion. Once downloaded, place the .ckpt files in the models/checkpoints folder.
Step 6: Download VAE (Variational Autoencoder)
For better visual results, we recommend downloading VAE files from the following sites:
After loading VAE, place the files in the models/vae folder.
Step 7: Run ComfyUI
Once setup is complete, run the following command to start ComfyUI (Using GPU):
python main.py
If you don’t have GPU and run on CPU
python main.py --cpu --windows-standalone-build
3. Use the pre-installed version (Standalone)
If you don’t want to set it up manually, you can download a pre-installed version from ComfyUI’s GitHub releases page. After downloading and extracting, just run comfyui.exe to start using it.
4. You can refer to the instruction video
5. Summary
With the above steps, you have successfully installed ComfyUI on Windows using Anaconda. ComfyUI’s interface is intuitive and makes it easy to build workflows to test AI models. To optimize your experience, you can refer to more detailed instructions on how to use nodes in ComfyUI to create custom images.
Wish you success!