ComfyUI Master Manager (PowerShell) #12675
Rogala
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Reliable Version & Environment Control
Prerequisites & Compatibility
This tool is specifically designed for:
Git-based Installations: You must have a local version of ComfyUI cloned via git clone.
Virtual Environments (Venv): The script expects a standard Python virtual environment (located in the ./venv/ folder relative to the script).
Standard Directory Structure: It targets a setup where ComfyUI and the venv folder reside in the same root directory.
[!IMPORTANT]

This manager is not compatible with "Portable/Embedded" ComfyUI distributions that use internal python runners.
update.zip
Overview
This manager is a robust tool for users who need to switch between different ComfyUI releases or hardware backends (Nvidia, Intel, CPU) without breaking their Python environment. It focuses on stability and clean installation, preventing common "dependency hell" issues.
How to Run
Launcher: Run via update.bat.
System: Works on Windows PowerShell 5.1+.
Automation: It automatically bypasses execution policies to ensure a smooth start.
Key Features
Smart Environment Diagnostics
Quickly check your current setup, including ComfyUI version, Python details, and full Torch/CUDA status. It even monitors your Pip cache to help manage disk space.
Conflict-Free Version Switching
Switch between ComfyUI releases with confidence. The script doesn't just change the code; it performs an automated compatibility check and patches critical system libraries to prevent startup warnings and network errors common in older versions.
Unified Hardware Stack Management
Switch between NVIDIA (CUDA), Intel (XPU), or CPU modes.
Simplified Selection: The menu shows clean, easy-to-read version numbers.
Deep Sync: It forces all core components to update simultaneously, ensuring they are perfectly matched for your chosen hardware.
Future-Proofing: The script is designed to be easily updated. If new CUDA versions are released, the developer can simply update the $cu array (e.g., @("126", "128", "130")) with values from the official PyTorch Get Started page to support the latest drivers.
Clean Reinstalls: Automatically removes conflicting leftovers when switching between different GPU types.
Integrated Release Intelligence
Before switching versions, you can view the official Release Notes directly in the console to see what’s new or what might have changed.
Maintenance & Logs
Includes automated cleanup of temporary lock files that often cause "Permission Denied" errors during updates. All actions are logged for easy troubleshooting.
Summary of Benefits
No more "RequestsDependencyWarning" or broken network nodes.
No more mismatched CUDA versions that prevent ComfyUI from seeing your GPU.
One-click launch with a clean, vertical menu interface.
File update.bat
@echo off
start powershell -NoProfile -ExecutionPolicy Bypass -NoExit -File "%~dp0update_comfy.ps1"
update_comfy.ps1
=========================================================
ComfyUI Master Manager v6.6 (Final Stable Edition)
Interface: Vertical English | Support: CUDA 126, 128, 130
Features: Nuclear Dep-Patch, Clean Versioning, Auto-Cache
=========================================================
------------------ MODULE 1: Initialization ------------------
$ScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition
$CacheDir = Join-Path $ScriptRoot ".cache"
if (!(Test-Path $CacheDir)) { New-Item $CacheDir -ItemType Directory | Out-Null }
$LogFile = Join-Path $CacheDir "history.log"
$rnFile = Join-Path $CacheDir "release_notes.log"
$VenvPython = Join-Path $ScriptRoot "venv\Scripts\python.exe"
$ComfyDir = Join-Path $ScriptRoot "ComfyUI"
$SitePackages = Join-Path $ScriptRoot "venv\Lib\site-packages"
$OutputEncoding = [System.Text.UTF8Encoding]::new()
function Write-Log([string]$msg) {
"$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | $msg" | Add-Content $LogFile
}
function Cleanup-Venv {
if (Test-Path $SitePackages) {
Get-ChildItem $SitePackages -Filter "~*" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
}
}
------------------ MODULE 2: UI Engine ------------------
function Read-Choice([string]$Prompt, [int[]]$Allowed) {$input -match '^\d+$ ' -and $Allowed -contains [int]$input) { return [int]$input }
while ($true) {
$input = Read-Host $Prompt
if (
Write-Host "[!] Error: Invalid selection." -ForegroundColor Red
}
}
------------------ MODULE 3: Show Environment Info ------------------
function Show-Info {
Cleanup-Venv
Write-Host "`n=== SYSTEM ENVIRONMENT INFO ===" -ForegroundColor White -BackgroundColor DarkBlue
}
------------------ MODULE 4: ComfyUI Management ------------------
function Change-ComfyUI {
Cleanup-Venv
if (!(Test-Path $ComfyDir)) { Write-Host "[ERROR] ComfyUI directory not found!" -ForegroundColor Red; return }
}
------------------ MODULE 5: Torch Management ------------------
function Change-Torch {
Cleanup-Venv
if (!(Test-Path $VenvPython)) { Write-Host "[ERROR] venv not found!" -ForegroundColor Red; return }
}
------------------ MAIN LOOP ------------------
while ($true) {
Clear-Host
Write-Host "`n=== COMFYUI MANAGER v6.6 ===" -ForegroundColor White -BackgroundColor DarkMagenta
Write-Host " [1] Change ComfyUI Version (Tags/Notes)"
Write-Host " [2] Change Torch Stack (CPU/Nvidia/Intel)"
Write-Host " [3] Show Environment Info"
Write-Host " [9] Exit"
}
All reactions