4.0 KiB
🚀 QUICK FIX for MiniMax-Remover Node
✅ UPDATED: OpenCV Conflict Issue RESOLVED!
Good News: The OpenCV/CV2 reinstallation issue has been fixed! This updated version prevents the dependency conflicts that were breaking existing OpenCV installations.
What Was Causing CV2 Reinstalls?
The original project had conflicting OpenCV version requirements:
requirements.txt:opencv-python==4.5.5.64(old exact version)requirements_bmo.txt:opencv-python>=4.8.0(newer minimum)pyproject.toml:opencv-python>=4.7.0(different minimum)
Result: Pip would uninstall and reinstall OpenCV, often breaking working installations.
✅ What's Fixed Now?
- Standardized Requirements: All files now use
opencv-python>=4.5.0,<5.0.0 - Safe Fix Script: Checks and preserves OpenCV during repairs
- No More Conflicts: Compatible version range works with existing installations
The Main Issue (Still Applies)
Your node loads correctly in ComfyUI now (✅ startup error fixed!), but when you try to use it, you get:
ImportError: Could not import any VAE encoder from diffusers
This means ComfyUI's Python environment has a broken diffusers installation.
💡 The Solution
Method 1: Automatic Fix (Recommended) - NOW OPENCV-SAFE
Run this script to automatically fix ComfyUI's diffusers:
python fix_comfyui_diffusers.py
NEW: This script now:
- ✅ Checks OpenCV status before starting
- ✅ Uses safe installation methods
- ✅ Automatically restores OpenCV if needed
- ✅ Reports status of both diffusers and OpenCV
Method 2: Manual Fix (Safe)
Based on your error path D:\COMFY_UI\ComfyUI\, run these commands:
Step 1: Open Command Prompt as Administrator
Step 2: Navigate to your ComfyUI directory:
cd D:\COMFY_UI\ComfyUI
Step 3: Fix diffusers safely (preserves OpenCV):
python_embeded\python.exe -c "import cv2; print(f'OpenCV {cv2.__version__} before fix')"
python_embeded\python.exe -m pip install diffusers==0.33.1 --force-reinstall
python_embeded\python.exe -m pip install transformers==4.52.4 --upgrade
python_embeded\python.exe -c "import cv2; print(f'OpenCV {cv2.__version__} after fix')"
Step 4: Restart ComfyUI
Method 3: ComfyUI Manager Fix
- Open ComfyUI
- Go to Manager → Install Models → pip packages
- Install:
diffusers==0.33.1 - Restart ComfyUI
Note: Your OpenCV should remain intact with the updated requirements.
✅ How to Verify It's Fixed
- Try your node again - it should work now
- Check the console - you should see:
🔄 Lazy loading diffusers components... ✅ Using AutoencoderKLWan from diffusers.models ✅ UniPCMultistepScheduler imported successfully - Verify OpenCV still works:
python -c "import cv2; print(f'✅ OpenCV {cv2.__version__} working')"
🎯 Why This Happened
- Your regular Python: Has working diffusers 0.33.1 ✅
- ComfyUI's Python: Has broken/incompatible diffusers ❌
- The fix: Updates diffusers specifically in ComfyUI's environment
- NEW: Preserves OpenCV to prevent reinstallation issues ✅
🆘 If You Had the Old Version
If you previously installed the old version that broke OpenCV:
-
Restore OpenCV first:
pip install opencv-python --upgrade -
Update to the fixed version:
git pull # In your MiniMax-Remover directory -
Run the safe fix script:
python fix_comfyui_diffusers.py -
Restart ComfyUI
🆘 If Still Not Working
-
Run diagnostic script (now shows both diffusers and OpenCV status):
python fix_comfyui_diffusers.py -
Check ComfyUI console for detailed error messages
-
Try ComfyUI Manager: Let it automatically install dependencies
-
Last resort: Reinstall ComfyUI with latest dependencies
The good news: Your node loading issue is completely fixed! The dependency management is now much safer and won't break your existing OpenCV installation.