# Preinstall Enhancements PR ## Overview This PR contains enhancements to the ComfyUI startup script (`run_comfyui.bat`) that improve the user experience for Windows users by automatically checking dependencies, detecting virtual environments, and offering to install missing packages. ## Changes Included ### Files Changed - `run_comfyui.bat` - Enhanced batch file with: - UTF-8 encoding support for proper Unicode display - Comprehensive dependency checking (critical and optional) - Virtual environment detection and warnings - CUDA PyTorch auto-installation with progress bars - User-friendly error messages and troubleshooting tips - ASCII art banner with "Comfy" text - `create_shortcut.ps1` - PowerShell script for desktop shortcut creation ### Key Features 1. **Automated Dependency Checking**: Checks all critical Python dependencies before launching 2. **CUDA PyTorch Detection**: Automatically detects CPU-only PyTorch and offers to install CUDA version 3. **Progress Bars**: Shows progress during pip installations 4. **User-Friendly Prompts**: Clear, interactive prompts for installation options 5. **Error Handling**: Detailed error messages with troubleshooting steps ## PR Status - **Branch**: `preinstall-enhancements` - **Base**: `master` - **Status**: Ready for PR submission - **Commits**: 2 commits (run_comfyui.bat enhancements, create_shortcut.ps1) ## Testing Recommendations 1. Test in clean environment with no dependencies 2. Test with missing critical dependencies 3. Test with missing optional dependencies 4. Test CPU-only PyTorch detection and installation 5. Test virtual environment detection 6. Test error handling scenarios ## Notes - All changes are backward compatible - No breaking changes to existing functionality - Works with both system Python and virtual environments