tensorrt opencv-python polygraphy huggingface_hub

[](https://www.python.org/downloads/release/python-3123//)
[](https://developer.nvidia.com/cuda-downloads)
[](https://developer.nvidia.com/tensorrt)
[](https://github.com/spacewalk01/depth-anything-tensorrt/blob/main/LICENSE)
This repo provides a ComfyUI Custom Node implementation of the Depth-Anything-Tensorrt in Python for ultra fast depth map generation (up to 14x faster than comfyui_controlnet_aux)
Last tested: 10 January 2026 (ComfyUI v0.8.2@a60b7b8 | Torch 2.9.1 | Python 3.12.3 | RTX5090 | CUDA 13.1 | Ubuntu 24.04)
If you like my projects and wish to see updates and new features, please consider supporting me. It helps a lot!
[](https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt)
[](https://github.com/yuvraj108c/ComfyUI-Upscaler-Tensorrt)
[](https://github.com/yuvraj108c/ComfyUI-Dwpose-Tensorrt)
[](https://github.com/yuvraj108c/ComfyUI-Rife-Tensorrt)
[](https://github.com/yuvraj108c/ComfyUI-Whisper)
[](https://github.com/yuvraj108c/ComfyUI_InvSR)
[](https://github.com/yuvraj108c/ComfyUI-FLOAT)
[](https://github.com/yuvraj108c/ComfyUI-Thera)
[](https://github.com/yuvraj108c/ComfyUI-Video-Depth-Anything)
[](https://github.com/yuvraj108c/ComfyUI-PiperTTS)
Special thanks to livepeer.org for supporting the project!
[](https://www.buymeacoffee.com/yuvraj108cZ)
[](https://paypal.me/yuvraj108c)
_Note: The following results were benchmarked on FP16 engines inside ComfyUI_
| Device | Model | Model Input (WxH) | Image Resolution (WxH) | FPS |
| :—–: | :————–: | :—————: | :——————–: | :–: |
| RTX4090 | Depth-Anything-S | 518×518 | 1280×720 | 35 |
| RTX4090 | Depth-Anything-B | 518×518 | 1280×720 | 33 |
| RTX4090 | Depth-Anything-L | 518×518 | 1280×720 | 24 |
| H100 | Depth-Anything-L | 518×518 | 1280×720 | 125+ |
_Note: The following results were benchmarked on FP16 engines inside ComfyUI_
| Device | Model | Model Input (WxH) | Image Resolution (WxH) | FPS |
| :—-: | :————–: | :—————: | :——————–: | :-: |
| H100 | Depth-Anything-S | 518×518 | 1280×720 | 213 |
| H100 | Depth-Anything-B | 518×518 | 1280×720 | 180 |
| H100 | Depth-Anything-L | 518×518 | 1280×720 | 109 |
_Note: The following results were benchmarked on FP16 engines inside ComfyUI_
| Device | Model | Model Input (WxH) | Image Resolution (WxH) | FPS |
| :—-: | :————–: | :—————: | :——————–: | :-: |
| RTX5090 | DA3Mono-Large | 518×518 | 1280×720 | 85 |
| RTX5090 | DA3Metric-Large | 518×518 | 1280×720 | 85 |
_Note: The following results were benchmarked on FP16 engines inside ComfyUI_
| Device | Model | Model Input (WxH) | Image Resolution (WxH) | FPS |
| :—-: | :————–: | :—————: | :——————–: | :-: |
| H100 | Distill-Any-Depth-Multi-Teacher-Small | 518×518 | 1280×720 | 76 |
| H100 | Distill-Any-Depth-Multi-Teacher-Base | 518×518 | 1280×720 | 68 |
| H100 | Distill-Any-Depth-Multi-Teacher-Large | 518×518 | 1280×720 | 59 |
| H100 | Distill-Any-Depth-Dav2-Teacher-Large-2w-iter | 518×518 | 1280×720 | 57 |
Navigate to the ComfyUI /custom_nodes directory
git clone https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt.git
cd ./ComfyUI-Depth-Anything-Tensorrt
pip install -r requirements.txt
There are two ways to build TensorRT engines:
Right Click -> tensorrt -> Depth Anything Engine BuilderThe engine will be automatically downloaded and built in the specified location. Refresh the webpage or strike ‘r’ on your keyboard, and the new engine will appear in the Depth Anything Tensorrt node.
“`bash
python export_trt.py –onnx-path ./depth_anything_vitl14-fp16.onnx –trt-path ./depth_anything_vitl14-fp16.engine
“`
/models/tensorrt/depth-anything directoryRight Click -> tensorrt -> Depth Anything TensorrtFor more control over depth visualization, use the two-node pipeline:
Right Click -> tensorrt -> Depth Anything Tensorrt Advanced)Right Click -> tensorrt -> Depth Map Display)depths output| Parameter | Default | Range | Description |
|———–|———|——-|————-|
| colormap | — | grayscale, inferno, viridis, plasma, magma, turbo, jet, hot, cool, spring, summer, autumn, winter, bone, rainbow, ocean, hsv, parula, pink | Color scheme for depth visualization |
| invert | false | true/false | Flip depth so near becomes far and vice versa |
| contrast | 1.0 | 0.1 – 5.0 | Spread of depth values around the midpoint |
| brightness | 0.0 | -1.0 – 1.0 | Shifts all depth values up or down |
| gamma | 1.0 | 0.1 – 5.0 | Non-linear tone curve. Below 1.0 reveals detail in distant regions, above 1.0 in near regions |
| percentile_clip | 2.0 | 0.0 – 20.0 | Clips outlier depth values at this percentile from both ends before normalizing. Prevents extreme values from compressing the useful range |
config/models.json