3481e14bc921044b22539b9a35387ddb8962b654
This change updates minimum dependency versions in requirements.txt: - Pillow from >=9.0.0 to >=9.1.0 for compatibility with nodes requiring >=9.2.0 - numpy from >=1.21.2 to >=1.23.0 to resolve numpy.dtypes issues - transformers set to >=4.20.0 for broader compatibility The fix resolves conflicts with other ComfyUI nodes while ensuring the depth estimation node continues to function properly.
ComfyUIDepthEstimation ComfyUIDepthEstimation
A custom depth estimation node for ComfyUI using Depth-Anything models to generate depth maps from images.
Features
- Multiple model options:
- Depth-Anything-Small
- Depth-Anything-Base
- Depth-Anything-Large
- Depth-Anything-V2-Small
- Depth-Anything-V2-Base
- Post-processing options:
- Gaussian blur (adjustable radius)
- Median filtering (configurable size)
- Automatic contrast enhancement
- Gamma correction
Installation
-
Clone the repository:
git clone https://github.com/yourusername/ComfyUIDepthEstimation.git -
Navigate to the repository directory:
cd ComfyUIDepthEstimation -
Install the required dependencies:
pip install -r requirements.txt
Usage
Node Parameters
Node Parameters
- image: Input image (IMAGE type)
- model_name: Select from available Depth-Anything models
- blur_radius: Gaussian blur radius (0.0 - 10.0, default: 2.0)
- median_size: Median filter size (3, 5, 7, 9, 11)
- apply_auto_contrast: Enable automatic contrast enhancement
- apply_gamma: Enable gamma correction
Integrate with ComfyUI
-
Copy the
depth_estimation_node.pyfile to your ComfyUI custom nodes directory. -
Update ComfyUI configuration to include the custom node if necessary.
-
Restart ComfyUI to load the new custom node.
Example Usage
- Add the
Depth Estimationnode to your ComfyUI workflow - Connect an image source to the node's image input
- Configure the parameters:
- Select a model (e.g., "Depth-Anything-V2-Small")
- Adjust blur_radius (0-10) for depth map smoothing
- Choose median_size (3-11) for noise reduction
- Toggle auto_contrast and gamma correction as needed
- Connect the output to a Preview Image node or other image processing nodes
The node will process the input image and output a depth map that can be used in your ComfyUI workflow.
License
This project is licensed under the Apache License.
Languages
Python
100%

