{"id":23233628,"url":"https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt","last_synced_at":"2025-08-19T18:34:18.945Z","repository":{"id":229343536,"uuid":"776356243","full_name":"yuvraj108c/ComfyUI-Depth-Anything-Tensorrt","owner":"yuvraj108c","description":"ComfyUI Depth Anything (v1/v2) Tensorrt Custom Node (up to 14x faster)","archived":false,"fork":false,"pushed_at":"2024-12-02T18:15:56.000Z","size":3340,"stargazers_count":83,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-02T19:28:23.059Z","etag":null,"topics":["comfyui","comfyui-nodes","depth-anything","depth-map","onnx","stable-diffusion","tensorrt","tensorrt-inference"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuvraj108c.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"yuvraj108c","custom":["https://paypal.me/yuvraj108c"]}},"created_at":"2024-03-23T09:21:41.000Z","updated_at":"2024-12-02T18:16:00.000Z","dependencies_parsed_at":"2024-05-08T05:31:42.131Z","dependency_job_id":"98c758cd-f1dc-4817-aa41-aa456c698d83","html_url":"https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt","commit_stats":null,"previous_names":["yuvraj108c/comfyui-depth-anything-tensorrt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuvraj108c%2FComfyUI-Depth-Anything-Tensorrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuvraj108c%2FComfyUI-Depth-Anything-Tensorrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuvraj108c%2FComfyUI-Depth-Anything-Tensorrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuvraj108c%2FComfyUI-Depth-Anything-Tensorrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuvraj108c","download_url":"https://codeload.github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230367780,"owners_count":18215325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","comfyui-nodes","depth-anything","depth-map","onnx","stable-diffusion","tensorrt","tensorrt-inference"],"created_at":"2024-12-19T03:01:57.107Z","updated_at":"2025-08-19T18:34:18.883Z","avatar_url":"https://github.com/yuvraj108c.png","language":"Python","funding_links":["https://github.com/sponsors/yuvraj108c","https://paypal.me/yuvraj108c","https://www.buymeacoffee.com/yuvraj108cZ"],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ComfyUI Depth Anything TensorRT\n\n[![python](https://img.shields.io/badge/python-3.10.12-green)](https://www.python.org/downloads/release/python-31012/)\n[![cuda](https://img.shields.io/badge/cuda-12.3-green)](https://developer.nvidia.com/cuda-downloads)\n[![trt](https://img.shields.io/badge/TRT-10.0-green)](https://developer.nvidia.com/tensorrt)\n[![mit](https://img.shields.io/badge/license-MIT-blue)](https://github.com/spacewalk01/depth-anything-tensorrt/blob/main/LICENSE)\n\n\u003c/div\u003e\n\nThis repo provides a ComfyUI Custom Node implementation of the [Depth-Anything-Tensorrt](https://github.com/spacewalk01/depth-anything-tensorrt) in Python for ultra fast depth map generation (up to 14x faster than [comfyui_controlnet_aux](https://github.com/Fannovel16/comfyui_controlnet_aux))\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo.gif\" /\u003e\n\u003c/p\u003e\n\n\n\n## ⭐ Support\nIf you like my projects and wish to see updates and new features, please consider supporting me. It helps a lot! \n\n[![ComfyUI-Depth-Anything-Tensorrt](https://img.shields.io/badge/ComfyUI--Depth--Anything--Tensorrt-blue?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt)\n[![ComfyUI-Upscaler-Tensorrt](https://img.shields.io/badge/ComfyUI--Upscaler--Tensorrt-blue?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Upscaler-Tensorrt)\n[![ComfyUI-Dwpose-Tensorrt](https://img.shields.io/badge/ComfyUI--Dwpose--Tensorrt-blue?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Dwpose-Tensorrt)\n[![ComfyUI-Rife-Tensorrt](https://img.shields.io/badge/ComfyUI--Rife--Tensorrt-blue?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Rife-Tensorrt)\n\n[![ComfyUI-Whisper](https://img.shields.io/badge/ComfyUI--Whisper-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Whisper)\n[![ComfyUI_InvSR](https://img.shields.io/badge/ComfyUI__InvSR-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI_InvSR)\n[![ComfyUI-FLOAT](https://img.shields.io/badge/ComfyUI--FLOAT-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-FLOAT)\n[![ComfyUI-Thera](https://img.shields.io/badge/ComfyUI--Thera-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Thera)\n[![ComfyUI-Video-Depth-Anything](https://img.shields.io/badge/ComfyUI--Video--Depth--Anything-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-Video-Depth-Anything)\n[![ComfyUI-PiperTTS](https://img.shields.io/badge/ComfyUI--PiperTTS-gray?style=flat-square)](https://github.com/yuvraj108c/ComfyUI-PiperTTS)\n\nSpecial thanks to [livepeer.org](https://www.livepeer.org/) for supporting the project! \n\n[![buy-me-coffees](https://i.imgur.com/3MDbAtw.png)](https://www.buymeacoffee.com/yuvraj108cZ)\n[![paypal-donation](https://i.imgur.com/w5jjubk.png)](https://paypal.me/yuvraj108c)\n---\n\n## ⏱️ Performance (Depth Anything V1)\n\n_Note: The following results were benchmarked on FP16 engines inside ComfyUI_\n\n| Device  |      Model       | Model Input (WxH) | Image Resolution (WxH) | FPS  |\n| :-----: | :--------------: | :---------------: | :--------------------: | :--: |\n| RTX4090 | Depth-Anything-S |      518x518      |        1280x720        |  35  |\n| RTX4090 | Depth-Anything-B |      518x518      |        1280x720        |  33  |\n| RTX4090 | Depth-Anything-L |      518x518      |        1280x720        |  24  |\n|  H100   | Depth-Anything-L |      518x518      |        1280x720        | 125+ |\n\n## ⏱️ Performance (Depth Anything V2)\n\n_Note: The following results were benchmarked on FP16 engines inside ComfyUI_\n\n| Device |      Model       | Model Input (WxH) | Image Resolution (WxH) | FPS |\n| :----: | :--------------: | :---------------: | :--------------------: | :-: |\n|  H100  | Depth-Anything-S |      518x518      |        1280x720        | 213 |\n|  H100  | Depth-Anything-B |      518x518      |        1280x720        | 180 |\n|  H100  | Depth-Anything-L |      518x518      |        1280x720        | 109 |\n\n## ⏱️ Performance (Distill Any Depth)\n\n_Note: The following results were benchmarked on FP16 engines inside ComfyUI_\n\n| Device |      Model       | Model Input (WxH) | Image Resolution (WxH) | FPS |\n| :----: | :--------------: | :---------------: | :--------------------: | :-: |\n|  H100  | Distill-Any-Depth-Multi-Teacher-Small |      518x518      |        1280x720        | 76 |\n|  H100  | Distill-Any-Depth-Multi-Teacher-Base |      518x518      |        1280x720        | 68 |\n|  H100  | Distill-Any-Depth-Multi-Teacher-Large |      518x518      |        1280x720        | 59 |\n|  H100  | Distill-Any-Depth-Dav2-Teacher-Large-2w-iter |      518x518      |        1280x720        | 57 |\n\n## 🚀 Installation\n\nNavigate to the ComfyUI `/custom_nodes` directory\n\n```bash\ngit clone https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt.git\ncd ./ComfyUI-Depth-Anything-Tensorrt\npip install -r requirements.txt\n```\n\n## 🛠️ Building TensorRT Engine\n\nThere are two ways to build TensorRT engines:\n\n### Method 1: Using the EngineBuilder Node\n1. Insert node by `Right Click -\u003e tensorrt -\u003e Depth Anything Engine Builder`\n2. Select the model version (v1 or v2 or DAD) and size (small, base, or large)\n3. Optionally customize the engine name, FP16 settings, and onnx path\n4. Run the workflow to build the engine\n\nThe 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. \n\n### Method 2: Manual Building\n1. Download one of the available onnx models:\n   - [Depth Anything v1](https://huggingface.co/yuvraj108c/Depth-Anything-Onnx/tree/main)\n   - [Depth Anything v2](https://huggingface.co/yuvraj108c/Depth-Anything-2-Onnx/tree/main)\n   - [Distill Any Depth](https://huggingface.co/yuvraj108c/distill-any-depth-onnx/tree/main)\n2. Run the export script, e.g\n ```bash\npython export_trt.py --onnx-path ./depth_anything_vitl14-fp16.onnx --trt-path ./depth_anything_vitl14-fp16.engine\n ```\n3. Place the exported engine inside ComfyUI `/models/tensorrt/depth-anything` directory\n\n## ☀️ Usage\n\n- Insert node by `Right Click -\u003e tensorrt -\u003e Depth Anything Tensorrt`\n- Choose the appropriate engine from the dropdown\n\n## 🤖 Environment tested\n\n- Ubuntu 22.04 LTS, Cuda 12.3, Tensorrt 10.0.1, Python 3.10, RTX 4090 GPU\n- Windows (Not tested)\n\n## 📝 Changelog\n\n- 08/07/2025\n\n  - Add support for [Distill-Any-Depth](https://github.com/Westlake-AGI-Lab/Distill-Any-Depth)\n  - Add benchmark for Distill-Any-Depth models\n\n- 20/05/2025\n\n  - Merge [PR#15](https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt/pull/15) for auto engine building inside comfyui by [ryanontheinside](https://github.com/ryanontheinside)\n  - Merge [PR#14](https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt/pull/14) for configurable params in export_trt.py by [rickstaa](https://github.com/rickstaa)\n    \n- 02/07/2024\n\n  - Add Depth Anything V2 onnx models + benchmarks\n  - Merge [PR](https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt/pull/9) for engine caching in memory by [BuffMcBigHuge](https://github.com/BuffMcBigHuge)\n\n- 26/04/2024\n\n  - Update to tensorrt 10.0.1\n  - Massive code refactor, remove trtexec, remove pycuda, show engine building progress\n  - Update and standardise engine directory and node category for upcoming tensorrt custom nodes suite\n\n- 7/04/2024\n\n  - Fix image resize bug during depth map post processing\n\n- 30/03/2024\n\n  - Fix CUDNN_STATUS_MAPPING_ERROR\n\n- 27/03/2024\n\n  - Major refactor and optimisation (remove subprocess)\n\n## 👏 Credits\n\n- [NVIDIA/Stable-Diffusion-WebUI-TensorRT](https://github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT)\n- [spacewalk01/depth-anything-tensorrt](https://github.com/spacewalk01/depth-anything-tensorrt)\n- [martenwikman/depth-anything-tensorrt-docker](https://github.com/martenwikman/depth-anything-tensorrt-docker)\n- [Westlake-AGI-Lab/Distill-Any-Depth](https://github.com/Westlake-AGI-Lab/Distill-Any-Depth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuvraj108c%2FComfyUI-Depth-Anything-Tensorrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuvraj108c%2FComfyUI-Depth-Anything-Tensorrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuvraj108c%2FComfyUI-Depth-Anything-Tensorrt/lists"}