-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Enhanced run_comfyui.bat – safer preflight checks (no auto-installs) #10717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Enhanced run_comfyui.bat – safer preflight checks (no auto-installs) #10717
Conversation
Enhanced run_comfyui.bat with: - Automatic detection of missing critical dependencies - Virtual environment detection and warnings - Optional user-prompted installation with clear warnings - Comprehensive dependency checking for all essential packages NOTE: Author is not a professional coder and relied heavily on Cursor AI for implementation. Please review code thoroughly before merging.
… PyTorch auto-installation - Added UTF-8 encoding (chcp 65001) to fix Unicode character display in ASCII art header - Enabled progress bars for all pip installations (--progress-bar on) - Fixed CUDA PyTorch auto-installation logic to properly continue to ComfyUI launch - Updated CUDA availability variables after successful installation - Fixed misleading Restart message to accurately reflect Continue to launch - Improved error handling and user feedback throughout the installation process
…iance - Created FEATURE_REQUEST_ISSUE.md with complete issue content - Created CREATE_ISSUE_INSTRUCTIONS.md with step-by-step instructions - Created PR_COMPLIANCE_ANALYSIS.md analyzing compliance with wiki requirements - Created SEARCH_RESULTS_SUMMARY.md documenting search for existing issues/PRs - Updated PR_DESCRIPTION.md with: - Issue Addressed section (explicitly states problems solved) - Potential Concerns and Side Effects section (required by wiki) - PR Size Note (acknowledges large PR size) - Placeholder for Related Issue number
- Updated PR_SUBMISSION_CHECKLIST.md with Feature Request issue creation step - Added FINAL_SUMMARY.md with complete status and next steps - All documentation and preparation complete
Feature Request issue created successfully. PR now references the issue as required by contribution guidelines.
…and referenced
…dwell/ComfyUI into preinstall-enhancements
…ocking prompts, optional updates, auto port selection and browser open
|
You've accidentally committed all of your Markdown files that I assume are prompts for Cursor, which I imagine is unintended here. 😅 |
|
…install-enhancements-docs
- Remove non-upstream packages from requirements.txt - Make dependency check advisory only (no auto-install) - Remove CUDA PyTorch auto-install/update flows - Trim banner and keep minimal preflight checks - Drop non-portable create_shortcut.ps1
Title: Enhanced run_comfyui.bat – safer preflight checks (no auto-installs)
Scope reduction for easier review:
Manual steps if dependencies are missing:
If PyTorch is CPU-only:
This update has only been tested on Windows 11
“Tested on Windows 10/11, Python 3.10/3.11, GPU+CPU”
Author's Note
Important: I am not a professional coder and have relied heavily on Cursor AI for the development of this script. While I have done my best to ensure its functionality and safety, I kindly request a thorough review by experienced developers before merging. Please pay special attention to:
Related Issue
Addresses #10705 - Feature Request: Enhanced run_comfyui.bat with Automated Dependency Checking and CUDA PyTorch Detection
Issue Addressed
This PR addresses common user pain points when setting up ComfyUI on Windows:
This PR solves these issues by providing automated dependency checking, intelligent PyTorch detection, and user-friendly error messages with actionable troubleshooting steps.
Overview
This PR enhances the
run_comfyui.batstartup script for Windows users, significantly improving the user experience by automatically checking dependencies, detecting virtual environments, and offering intelligent installation options. The script now provides a polished, user-friendly interface with clear error messages and troubleshooting guidance.Key Features
1. Automated Dependency Checking
2. CUDA PyTorch Auto-Installation
--progress-bar on)3. Virtual Environment Awareness
4. Enhanced User Experience
5. Comprehensive Error Handling
Files Changed
run_comfyui.bat(408 lines, +347 insertions, -61 deletions)create_shortcut.ps1(1 line addition)Screenshots
ASCII Art Banner
The script displays a polished ASCII art banner with "Comfy" text:
╔═══════════════════════════════════════════════════════════╗
║ Missing Required Packages ║
╚═══════════════════════════════════════════════════════════╝
▓ ComfyUI needs some additional software to run.
The following critical packages are missing:
yaml, torch, numpy
▓ [Heads Up] You're using your main Python installation.
Installing packages here might affect other programs that use Python.
▓ Installation Options:
[I] Install all missing packages (recommended)
[C] Install only critical packages
[N] Cancel and exit
╔═══════════════════════════════════════════════════════════╗
║ CPU-Only PyTorch Detected - CUDA Version Required ║
╚═══════════════════════════════════════════════════════════╝
▓ Your PyTorch installation doesn't support GPU acceleration.
ComfyUI requires CUDA-enabled PyTorch to run properly.
▓ We can automatically install the CUDA-enabled version for you.
This will:
1. Remove the current CPU-only version
2. Install the CUDA-enabled version (this will take several minutes)
3. Continue to launch ComfyUI automatically
Would you like to install CUDA-enabled PyTorch now? (Y/N):