This project is licensed under CC BY-NC-SA, everyone is FREE to access, use, modify and redistribute with the same license.
For commercial purposes, please contact me directly at yuvraj108c@gmail.com
If you like the project, please give me a star! ⭐
This repo provides a ComfyUI Custom Node implementation of the Depth-Anything-Tensorrt in Python for ultra fast depth map generation (up to 5x faster)
Note: The following results were benchmarked on FP16 engines inside ComfyUI
Device | Model | Model Input (WxH) | Image Resolution (WxH) | FPS |
---|---|---|---|---|
RTX4090 | Depth-Anything-S | 518x518 | 1280x720 | 35 |
RTX4090 | Depth-Anything-B | 518x518 | 1280x720 | 33 |
RTX4090 | Depth-Anything-L | 518x518 | 1280x720 | 24 |
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
- Download one of the available onnx models (e.g depth_anything_vitl14.onnx)
- Edit model paths inside export_trt.py accordingly and run
python export_trt.py
- Place the exported engine inside ComfyUI
/models/tensorrt/depth-anything
directory
- Insert node by
Right Click -> tensorrt -> Depth Anything Tensorrt
- Choose the appropriate engine from the dropdown
- Ubuntu 22.04 LTS, Cuda 12.3, Tensorrt 10.0.1, Python 3.10, RTX 4090 GPU
- Windows (Not tested, but should work)
-
08/05/2024
- Clean utilities.py
- Fix engine path in custom node
- Add citation in readme
-
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 and node category for upcoming 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)
@inproceedings{depthanything,
title={Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data},
author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
booktitle={CVPR},
year={2024}
}
- NVIDIA/Stable-Diffusion-WebUI-TensorRT
- spacewalk01/depth-anything-tensorrt
- martenwikman/depth-anything-tensorrt-docker
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)