ComfyEnv: An Environment Manager for ComfyUI

ComfyUI is incredibly flexible, but installing different custom nodes or dependencies often leads to conflicts that can break existing setups. ComfyEnv helps you manage isolated environments, so each project or node set can live in its own stable sandbox.
Supported Platforms:
✅ Windows
✅ Linux
❌ macOS is currently not supported
Features
- Isolated Conda environments per ComfyUI setup
- Install and run ComfyUI without dependency conflicts
- Clean separation of node configurations
- CLI and GUI interface for managing environments
- Flexibility to configure the environments
Requirements
Before using ComfyEnv, make sure the following are installed:
- Miniconda3
- Git
- NVIDIA GPU (Required) - AMD and Intel GPUs are not supported
Installation
conda activate
git clone https://github.com/cancer32/ComfyEnv.git
cd ComfyEnv
pip install -r requirements.txt
chmod +x bin/comfy-env bin/env-manager # For Linux Only
⚠️ Set CONDA_ROOT environment variable (if it gives error)
-
Set the CONDA_ROOT environment variable to the root path of your Miniconda installation eg. C:\ProgramData\miniconda3 in the user’s startup profile
-
OR edit the bin/_conda_root[.bat], uncomment the below line, set the CONDA_ROOT path and Save.
Windows bin/_conda_root.bat
REM ##########################################
REM Uncomment and set CONDA_ROOT path below
set CONDA_ROOT=/path/to/miniconda3
REM ##########################################
Linux bin/_conda_root
##########################################
# Uncomment and set CONDA_ROOT path below
export CONDA_ROOT=/path/to/miniconda3
##########################################
Usage
GUI Interface
- For Windows run
bin/env-manager.bat file from explorer
- For Linux execute
bin/env-manager file from shell
CLI Interface
# Create a new environment
# Note: Edit "nvidia_requirements.txt" file if you want to install specific pytorch version for environment
bin/comfy-env create -n my-env --python=3.13 --comfyui-version=v0.26.2
# List all environments
bin/comfy-env list
# Run ComfyUI inside an environment
bin/comfy-env run -n my-env -- [comfyui args]
# Stop ComfyUI running in an environment
bin/comfy-env stop -n my-env
# Get status of an environment (returns JSON with running state, PID, port, etc.)
bin/comfy-env status -n my-env
Directory Structure
ComfyEnv/
├── bin/
│ └── comfy-env # The main CLI interface
│ └── env-manager # The main GUI interface
├── envs/ # Contains all isolated environments
│ └── <env_name>/ # A specific ComfyUI environment
├── models/ # Shared models directory accessible to all environments
│ └── checkpoints/
│ └── vae/
│ └── .../
TODO:
评论