Resolves NameError: name 'json' is not defined (#18).
The json module is used in _serialize_camera_data() and error handling
but was never imported when DA3 camera pose estimation was added in v1.3.4.
Bump version to 1.3.7.
- Fix scoping bug in __init__.py where module_version was undefined after
ImportError, causing incorrect DA3_AVAILABLE check
- Add defensive try/except guard around depth_anything_3 import in
depth_estimation_node.py to handle edge cases
- Move logger initialization before DA3 import to prevent NameError
- Bump version to 1.3.6
Resolves node loading failures on RunPod with PyTorch nightly builds
where the error node "Depth Estimation (Error)" was incorrectly shown
even when DA3 was intentionally not installed.
- Revert blur_radius parameter from INT to FLOAT type
- Add median_size odd-number validation for PIL compatibility
- Use dynamic dimensions for placeholder tensors (not fixed 512x512)
- Refactor tensor squeezing with list comprehension
- Simplify _check_pose_support() logic with better comments
- Add informative JSON output for non-DA3 models
- Fix GEMINI.md duplicate input_size documentation line
- Update CLAUDE.md with DA3 camera pose estimation documentation
- 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.