- Fix tensor dimension handling in MiDaSWrapper
- Add robust type conversion to consistently use float32
- Implement authentication-free model fallbacks
- Improve error recovery with progressive fallbacks
- Add detailed logging for better debugging
- Updated model paths to use the correct organization 'depth-anything' instead of 'LiheYoung'
- Fixed direct URLs to point to the correct Hugging Face repositories
- Added more fallback model paths to try multiple organization/repo formats
- Updated error messages with correct download links
- Fixed tensor shape handling for output images
- Fixed authentication error when loading V2 models by adding non-auth direct URLs
- Added multi-URL fallback downloading system for better reliability
- Fixed tensor dimensionality mismatch in MiDaS model interpolation
- Added tensor shape standardization to ensure consistent dimensions
- Enhanced model directory detection to support multiple folder structures
- Improved error messages with targeted solutions based on error type
- Added tensor type validation to prevent DoubleTensor vs FloatTensor issues
- Fixed tensor type mismatch error between DoubleTensor and FloatTensor
- Added explicit tensor type conversion in MiDaSWrapper
- Improved error handling for tensor type mismatches
- Enhanced process_image to handle float64 tensors properly
- Added debugging logs to track tensor types
- Add explicit dimension handling for improved tensor shape control
- Add check to ensure tensors are in [0, 1] range
- Respect force_cpu flag when moving tensor to device
- Add debug logging for output tensor shape
- Improve code comments for clarity
This comprehensive update improves the depth estimation node with:
- Robust error handling that continues workflow execution instead of crashing
- Visual error reporting with informative messages displayed on error images
- Intelligent resource management with VRAM usage tracking and requirements
- Automatic fallback to CPU when insufficient VRAM is detected
- Multiple fallback strategies for model loading issues
- Better handling of problematic inputs like NaN values
- Detailed logging for easier troubleshooting
These changes make the node much more stable and user-friendly in
complex ComfyUI setups, preventing workflow-breaking errors.
This change implements multiple fallback paths for depth model loading, handles both online and offline scenarios, and provides clear error messages for troubleshooting. It maintains backward compatibility while addressing the 'model not found' error.