This guide will help you create and manage multiple isolated ComfyUI environments, perfect for different workflows while sharing models and optimizing for your RTX 5090.
- Understanding the Approach
- Prerequisites
- Quick Start
- File Structure
- Step-by-Step Setup
- Managing Environments
- Troubleshooting
- Best Practices
- Dependency Isolation: Different custom nodes require different package versions
- Stability: Experimental features won't break your main installation
- Specialization: Optimized environments for specific tasks (training, audio, etc.)
- Testing: Try new features without risking your stable setup
Base Directory/
├── comfyui_main/ # Stable daily use
├── comfyui_experimental/ # Latest features
├── comfyui_training/ # Model training
├── comfyui_audio/ # Audio-specific nodes
└── Shared Models/ # All installations use the same model files
- NVIDIA RTX 5090 (or any CUDA-compatible GPU)
- 16GB+ RAM recommended
- 50GB+ free disk space (for models and environments)
- Windows 10/11 with latest updates
- Python 3.10-3.11 (recommended for compatibility)
- Git installed and in PATH
- NVIDIA Drivers supporting CUDA 12.8+
Run these commands in Command Prompt:
# Check Python
python --version
# Check Git
git --version
# Check NVIDIA
nvidia-smi
# Check CUDA (if installed)
nvcc --versionCreate a new folder for your AI projects and save these files:
create_comfyui_env.bat - Installation wizard
comfyui_launcher.bat - Master launcher with menu
check_installations.bat - Diagnostic tool
# Navigate to your AI projects folder
cd C:\AI_Projects
# Run the installation wizard
create_comfyui_env.batSelect from the menu:
- 1. Main Stable - Daily use, most stable
- 2. Experimental - Latest features, may be unstable
- 3. Training - Optimized for model training
- 4. Custom - Advanced users
# Use the master launcher (recommended)
comfyui_launcher.bat
# Or direct launchers
start_comfyui_main.bat
start_comfyui_experimental.batC:\AI_Projects\
├── 📜 create_comfyui_env.bat # Installation wizard
├── 📜 comfyui_launcher.bat # Master menu launcher
├── 📜 check_installations.bat # Diagnostic tool
├── 📜 update_comfyui_installations.bat # Batch updater
├── 🔧 comfyui_main\ # Stable installation
│ ├── 🐍 venv\ # Virtual environment
│ └── 💻 ComfyUI\ # ComfyUI files
├── 🔬 comfyui_experimental\ # Testing installation
│ ├── 🐍 venv\
│ └── 💻 ComfyUI\
├── 🎓 comfyui_training\ # Training installation
│ ├── 🐍 venv\
│ └── 💻 ComfyUI\
└── 🗂️ C:\Users\rick\ComfyUI\models\ # SHARED models directory
├── checkpoints\
├── loras\
├── vae\
└── controlnet\
# Create main AI projects folder
mkdir C:\AI_Projects
cd C:\AI_Projects
# Create shared models directory (if needed)
mkdir C:\Users\rick\ComfyUI\models- Run
create_comfyui_env.bat - Select Option 1: Main Stable Version
- Wait for installation (10-20 minutes)
- Verify installation completes successfully
After installation, the script will automatically verify:
- ✅ PyTorch with CUDA 12.8+ support
- ✅ RTX 5090 GPU detection
- ✅ Compute capability sm_120
- ✅ All dependencies installed
Repeat the process for other environment types:
- Experimental - For testing new features
- Training - For LoRA/model training
- Custom - For specialized workflows
Place your models in the shared directory:
C:\Users\rick\ComfyUI\models\
├── checkpoints\ # .safetensors, .ckpt files
├── loras\ # LoRA files
├── vae\ # VAE models
├── controlnet\ # ControlNet models
├── upscale_models\ # ESRGAN, etc.
└── embeddings\ # Textual inversions
comfyui_launcher.batBenefits:
- Shows all available installations
- Automatic port assignment (no conflicts)
- Health checks before launching
- Management menu for updates
start_comfyui_main.bat
start_comfyui_experimental.bat
start_comfyui_training.batEach installation uses different ports:
- Main: Port 8188
- Experimental: Port 8189
- Training: Port 8190
- Custom: Port 8191+
Access them simultaneously:
http://127.0.0.1:8188http://127.0.0.1:8189http://127.0.0.1:8190
# From master launcher, choose 'M' then '2'
# Or run directly:
update_comfyui_installations.bat# From master launcher, choose 'M' then '3'
# Or run directly:
check_installations.batCustom nodes go in each installation's folder:
comfyui_main\ComfyUI\custom_nodes\
comfyui_experimental\ComfyUI\custom_nodes\
Tip: Install nodes separately in each environment to avoid conflicts.
Problem: Launcher can't find the installation directory.
Solution:
# Run diagnostic
check_installations.bat
# Verify directory exists
dir comfyui_*Problem: PyTorch can't find your RTX 5090.
Solution:
- Update NVIDIA drivers to support CUDA 12.8+
- Verify installation used correct PyTorch version:
pip list | findstr torch
- Reinstall with CUDA 12.8 support
Problem: Another application is using the ComfyUI port.
Solution:
- Use different ports for each installation
- Check running processes:
netstat -ano | findstr :8188
Problem: Custom nodes downgrade packages (like huggingface-hub).
Solution:
- Use separate environments for conflicting nodes
- Install problematic nodes in experimental environment first
# Check GPU detection
python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}, GPU: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else None}')"
# Check installation structure
check_installations.bat
# Verify Python environment
where python
pip list | findstr torch- Main: Stable nodes only, daily workflow
- Experimental: New nodes, testing features
- Training: Dedicated to model training
- Audio/Video: Specialized for media processing
- Keep all models in the shared directory
- Use symbolic links if you have models on different drives
- Regularly clean up unused models to save space
- Export your workflows regularly
- Backup your
ComfyUI\userfolder for custom settings - Keep notes on which nodes work in which environment
- Use
--highvramflag if you have sufficient GPU memory - Monitor GPU temperature during long sessions
- Close other GPU-intensive applications when training
C:\AI_Projects\
├── 📁 comfyui_main\ # Daily driver
├── 📁 comfyui_testing\ # Node testing
├── 📁 comfyui_training\ # Model training
├── 📁 comfyui_audio\ # Audio-specific
├── 📁 comfyui_video\ # Video-specific
└── 📁 project_archives\ # Old project backups
# Use main stable environment
start_comfyui_main.bat
# Port 8188, stable nodes only# Use experimental environment
start_comfyui_experimental.bat
# Port 8189, test new nodes here first# Use training environment
start_comfyui_training.bat
# Port 8190, all training dependencies available# Run multiple instances for different clients/projects
start_comfyui_main.bat # Client A - Port 8188
start_comfyui_experimental.bat # Client B - Port 8189- Check logs:
ComfyUI\user\comfyui.log - Run diagnostics:
check_installations.bat - Verify installation: Use management menu in launcher
- If an environment gets corrupted, delete it and recreate
- Models are safe in shared directory
- Custom nodes can be reinstalled quickly
# Monitor GPU usage
nvidia-smi -l 1
# Check system resources
tasklist | findstr pythonThis approach gives you maximum flexibility while maintaining stability. Start with one main environment and expand as needed!