df39a94d385f408f56f1ee91778ec0d69cd7c2f2
This repo provides a ComfyUI Custom Node implementation of the Depth-Anything-Tensorrt in Python for ultra fast depth map generation (30 fps, up to 5x faster)
⏱️ Performance
| Device | Model | Model Input (WxH) | Image Resolution (WxH) | Inference Time(ms) |
|---|---|---|---|---|
| RTX4090 | Depth-Anything-S | 518x518 | 1280x720 | 3 |
| RTX4090 | Depth-Anything-B | 518x518 | 1280x720 | 6 |
| RTX4090 | Depth-Anything-L | 518x518 | 1280x720 | 12 |
🚀 Installation
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
🛠️ Building Tensorrt Engine
- Download one of the available onnx models (e.g depth_anything_vitl14.onnx)
- Edit paths inside
export_trt.pyaccordingly and run it - Place the engine inside ComfyUI
/models/tensorrt/depth-anythingdirectory
🤖 Environment tested
- Ubuntu 22.04 LTS, Cuda 12.3, Tensorrt 10.0.1, Python 3.10, L40s GPU
- Windows (Not tested)
📝 Changelog
-
26/04/2024
- Update to tensorrt 10.0.1
- Massive code refactor, remove trtexec, remove pycuda, show engine building progress
- Update and standardise engine directory for future tensorrt custom nodes suite
-
7/04/2024
- Fix image resize bug during depth map post processing
-
30/03/2024
- Fix CUDNN_STATUS_MAPPING_ERROR
-
27/03/2024
- Major refactor and optimisation (remove subprocess)
👏 Credits
Languages
Python
100%
