Skip to content

Latest commit

Β 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 ComfyEnv

Easily manage multiple ComfyUI installations with different versions, Python setups, and GPU configurations - all from one simple script.

Bash Python License: MIT Changelog


✨ Features

πŸ“‚ Shared Resources - Everything in One Place!

ComfyEnv automatically creates a centralized resource management system that keeps all your files organized and accessible across every environment:

🎯 Shared Models Folder

  • One central location for all your models - Every installation automatically connects to a single models/ folder at the root level
  • No duplicate downloads - Download each model once and it's available across all your setups
  • Saves disk space - No need to store multiple copies of the same checkpoints, LoRAs, VAEs, etc.
  • Always accessible - Your models stay with you even when you create or delete installations

πŸ“„ Shared Workflows Folder (NEW!)

  • Centralized workflow storage - All your .json and .png workflow files live in one workflows/ folder
  • Access from any environment - Load and save workflows from any ComfyUI version seamlessly
  • Automatic symlink creation - Each environment automatically links to the shared workflows folder
  • Cloning support - When you clone an environment, workflow symlinks are preserved
  • Easy sharing & backup - Share your entire workflow library by sharing one folder!

πŸ“₯πŸ“€ Shared Inputs & Outputs Folders (NEW!)

  • Centralized file I/O - Single inputs/ and outputs/ folders for all environments
  • No more scattered files - All your input images and generated outputs in predictable locations
  • Automatic organization - Each environment gets its own subfolder within shared spaces
  • Easy file management - Find and organize your assets without digging through multiple directories

βš™οΈ Initial Configs Folder (NEW!)

  • Import your ComfyUI settings once - Place your comfy.settings.json in the root configs/ folder
  • Find your config file: Located at comfyui/user/default/comfy.settings.json in any existing ComfyUI installation or inside an environment (./environments/[env-name]/comfyui/user/default/)
  • Consistent experience - All new environments are created with your settings and preferences

πŸ”„ Shared Workflows _shared Directory (NEW!)

  • Global workflow library - Create workflows/_shared/ to store workflows accessible from ALL environments
  • Automatic linking - Appears as a shared/ subfolder inside each environment's workflow folder
  • Perfect for: Frequently-used workflows you want everywhere

πŸš€ Multi-Version Installation

  • Install any ComfyUI version - Supports all versions from v0.3.x to latest
  • Automatic Python setup - Smart selection based on what your version needs
  • Custom names for your setups - Give them meaningful names like production.v1 or dev-test
  • Browse available versions - See all GitHub releases

πŸ”„ Multi-Instance Support (NEW!)

  • Run multiple instances simultaneously - Start different ComfyUI versions at the same time on different ports
  • Automatic port management - Auto-selects available ports starting from 8188 when default is in use
  • Custom port option - Use --port PORT to specify a specific port number
  • Instance tracking - Built-in system tracks all running instances with PID files
  • Smart cleanup - Automatically handles crashed sessions and stale processes

🎯 GPU-Aware Setup

  • Auto-detects your graphics card - Works with NVIDIA, AMD, Intel Arc, and Apple Silicon
  • Stable or experimental options - Choose between reliable or cutting-edge performance
  • Follows official ComfyUI documentation installation commands

πŸ“¦ Environment Management

Command Description
--env-list See all your installed setups with version info
--env-delete NAME Safely remove a setup (asks for confirmation first)
--env-rename OLD NEW Rename or move a setup directory
--env-clone SRC DST Duplicate an existing setup quickly

πŸ”§ Additional Features

  • ComfyUI-Manager support - Installed automatically by default
  • Detailed progress output - See exactly what's happening during installation
  • Flexible naming - Use letters, numbers, underscores, hyphens, and dots in names
  • Symlink repair tool - --fix-symlinks option to automatically detect and fix broken symlinks

πŸ“œ Changelog

For detailed information about recent changes, new features, and improvements, please see our CHANGELOG.md file.

Latest Updates (2026-04-17):

  • πŸ”§ New --fix-symlinks option to automatically repair broken symlinks
  • 🎯 Enhanced rename functionality now handles workflows, inputs, and outputs folders
  • πŸ“ Centralized I/O management with symlink support for input/output folders
  • πŸ”„ Workflow symlink management with cloning support
  • πŸ“… Release dates displayed in --list output
  • 🏷️ Environment creation and last edit dates shown in lists and menus
  • πŸ” More reliable version detection using comfyui_version.py
  • πŸ”„ Multi-instance support - run multiple ComfyUI instances simultaneously on different ports
  • πŸ“ Shared _shared workflows directory for globally accessible workflow library
  • βš™οΈ Custom comfy.settings.json auto-applied from configs/ folder during installation

πŸ“‹ Prerequisites

Required Software

# On Fedora/RHEL/CentOS:
sudo dnf install git curl python3

# On Ubuntu/Debian:
sudo apt install git curl python3

# On Arch Linux:
sudo pacman -S git curl python

Pyenv Installation (Needed for managing Python versions)

Using pyenv-installer:

curl https://pyenv.run | bash

Manual installation:

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

# Add to ~/.bashrc or ~/.zshrc:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

Verify installation:

pyenv --version  # Should output version number

πŸš€ Quick Start

Install Latest ComfyUI (Auto-Detected Python)

./install_comfy.sh v0.3.62

Install with Custom Name

./install_comfy.sh v0.18.0 --name my-production-env

List All Available Versions

./install_comfy.sh --list

πŸ“– Usage Guide

Installation Commands

Basic Installation

# Install specific version with auto-detected Python
./install_comfy.sh v0.3.62

# Force specific Python version
./install_comfy.sh v0.18.0 --python 3.13

# Skip ComfyUI-Manager installation
./install_comfy.sh v0.3.62 --no-manager

Named Environments

# Create environment with custom name
./install_comfy.sh v0.3.62 --name production.v1

# Valid characters: a-z, A-Z, 0-9, _, -, .
./install_comfy.sh v0.18.0 --name dev-test-env

Environment Management Commands

List All Environments

./install_comfy.sh --env-list

# Output:
# NAME                         VERSION      PYTHON             PATH
# ----                         -------      ------             ----
# v0.3.62                      v0.3.62      python_3.11        /path/to/environments/v0.3.62/
# production.v1                v0.18.0      python_3.13        /path/to/environments/production.v1/

Delete Environment

./install_comfy.sh --env-delete old-environment-name

Rename Environment

./install_comfy.sh --env-rename old-name new-name

Clone Environment

# Creates a complete copy (faster than fresh install)
./install_comfy.sh --env-clone source-env target-env

Help & Information

./install_comfy.sh --help

πŸ—‚οΈ Directory Structure

After installation, your folder will look like this:

comfy/
β”œβ”€β”€ install_comfy.sh          # Main installer script
β”œβ”€β”€ models/                   # ⭐ Shared models - all environments use this!
β”‚   β”œβ”€β”€ checkpoints/
β”‚   β”œβ”€β”€ vae/
β”‚   └── loras/
β”œβ”€β”€ workflows/                # πŸ”„ Shared workflows - accessible from all environments
β”‚   β”œβ”€β”€ my-environment/
β”‚   β”‚   β”œβ”€β”€ my-workflow1.json
β”‚   β”‚   └── my-workflow2.json
β”‚   └── _shared/              # 🌐 Global workflow library (linked as 'shared/' in each env)
β”‚       └── utility-workflow.json
β”œβ”€β”€ inputs/                   # πŸ“₯ Shared inputs folder
β”‚   β”œβ”€β”€ v0.3.62/             # Per-environment subfolders
β”‚   └── production.v1/
β”œβ”€β”€ outputs/                  # πŸ“€ Shared outputs folder  
β”‚   β”œβ”€β”€ v0.3.62/
β”‚   └── production.v1/
β”œβ”€β”€ configs/                  # βš™οΈ Initial configuration folder
β”‚   └── comfy.settings.json   # Your ComfyUI settings (imported to all envs)
└── environments/             # All installations stored here
    β”œβ”€β”€ v0.3.62/
    β”‚   β”œβ”€β”€ python_3.11/      # Python setup
    β”‚   β”œβ”€β”€ comfyui/          # ComfyUI source code
    β”‚   β”œβ”€β”€ models -> ../../models/       # β†’ Shared models
    β”‚   β”œβ”€β”€ workflows -> ../../workflows/  # β†’ Shared workflows
    β”‚   β”œβ”€β”€ inputs -> ../../inputs/v0.3.62/# β†’ Per-env input folder
    β”‚   └── outputs -> ../../outputs/v0.3.62/# β†’ Per-env output folder
    └── production.v1/
        β”œβ”€β”€ python_3.13/
        β”œβ”€β”€ comfyui/
        β”œβ”€β”€ models -> ../../models/       # β†’ Shared models
        β”œβ”€β”€ workflows -> ../../workflows/  # β†’ Shared workflows
        β”œβ”€β”€ inputs -> ../../inputs/production.v1/# β†’ Per-env input folder
        └── outputs -> ../../outputs/production.v1/# β†’ Per-env output folder

🎯 GPU Configuration Examples

NVIDIA GPU (CUDA)

./install_comfy.sh v0.3.62
# Select: 1) NVIDIA (CUDA)
# Choose stable or nightly PyTorch when prompted

PyTorch versions:

  • Stable: CUDA 13.0 - Production-ready
  • Nightly: CUDA 13.2 - Latest features, may have better performance

AMD GPU (ROCm)

./install_comfy.sh v0.3.62
# Select: 2) AMD (ROCm)

Note: Ensure ROCm drivers are installed on your system.

Intel Arc GPU (XPU)

./install_comfy.sh v0.3.62
# Select: 3) Intel (XPU)

Apple Silicon (M1/M2/M3)

./install_comfy.sh v0.3.62
# Select: 4) Apple Silicon

Note: Uses nightly PyTorch for best Metal performance.


πŸ”§ Troubleshooting

Common Issues

"pyenv command not found"

# Add to ~/.bashrc or ~/.zshrc:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

# Reload shell:
source ~/.bashrc  # or source ~/.zshrc

Python version not found in pyenv

# List available versions:
pyenv install --list | grep "^  3."

# Install specific version:
pyenv install 3.13.0

PyTorch installation fails

  • NVIDIA: Ensure CUDA drivers are up to date
  • AMD: Verify ROCm is properly installed
  • Try switching between stable/nightly PyTorch versions

"Environment already exists" error

# List existing environments:
./install_comfy.sh --env-list

# Delete if needed:
./install_comfy.sh --env-delete conflicting-name

πŸ“š Resources


πŸ™ Support & Attribution

Vibecoded With

This project was vibecoded with: Qwen3.5-27B-Claude-4.6-Opus-Reasoning-Distilled-v2-GGUF

Support Development

If this project helped you, consider buying me a coffee!


Made with ❀️ for the ComfyUI community

About

ComfyUI Environment Manager

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages