Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ComfyUI Depth Anything (v1/v2/distill-any-depth) Tensorrt Custom Node (up to 14x faster)

License

NotificationsYou must be signed in to change notification settings

yuvraj108c/ComfyUI-Depth-Anything-Tensorrt

Repository files navigation

This repo provides a ComfyUI Custom Node implementation of theDepth-Anything-Tensorrt in Python for ultra fast depth map generation (up to 14x faster thancomfyui_controlnet_aux)

⭐ Support

If you like my projects and wish to see updates and new features, please consider supporting me. It helps a lot!

ComfyUI-Depth-Anything-TensorrtComfyUI-Upscaler-TensorrtComfyUI-Dwpose-TensorrtComfyUI-Rife-Tensorrt

ComfyUI-WhisperComfyUI_InvSRComfyUI-FLOATComfyUI-TheraComfyUI-Video-Depth-AnythingComfyUI-PiperTTS

Special thanks tolivepeer.org for supporting the project!

buy-me-coffeespaypal-donation

⏱️ Performance (Depth Anything V1)

Note: The following results were benchmarked on FP16 engines inside ComfyUI

DeviceModelModel Input (WxH)Image Resolution (WxH)FPS
RTX4090Depth-Anything-S518x5181280x72035
RTX4090Depth-Anything-B518x5181280x72033
RTX4090Depth-Anything-L518x5181280x72024
H100Depth-Anything-L518x5181280x720125+

⏱️ Performance (Depth Anything V2)

Note: The following results were benchmarked on FP16 engines inside ComfyUI

DeviceModelModel Input (WxH)Image Resolution (WxH)FPS
H100Depth-Anything-S518x5181280x720213
H100Depth-Anything-B518x5181280x720180
H100Depth-Anything-L518x5181280x720109

⏱️ Performance (Distill Any Depth)

Note: The following results were benchmarked on FP16 engines inside ComfyUI

DeviceModelModel Input (WxH)Image Resolution (WxH)FPS
H100Distill-Any-Depth-Multi-Teacher-Small518x5181280x72076
H100Distill-Any-Depth-Multi-Teacher-Base518x5181280x72068
H100Distill-Any-Depth-Multi-Teacher-Large518x5181280x72059
H100Distill-Any-Depth-Dav2-Teacher-Large-2w-iter518x5181280x72057

🚀 Installation

Navigate to the ComfyUI/custom_nodes directory

git clone https://github.com/yuvraj108c/ComfyUI-Depth-Anything-Tensorrt.gitcd ./ComfyUI-Depth-Anything-Tensorrtpip install -r requirements.txt

🛠️ Building TensorRT Engine

There are two ways to build TensorRT engines:

Method 1: Using the EngineBuilder Node

  1. Insert node byRight Click -> tensorrt -> Depth Anything Engine Builder
  2. Select the model version (v1 or v2 or DAD) and size (small, base, or large)
  3. Optionally customize the engine name, FP16 settings, and onnx path
  4. Run the workflow to build the engine

The 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.

Method 2: Manual Building

  1. Download one of the available onnx models:
  2. Run the export script, e.g
python export_trt.py --onnx-path ./depth_anything_vitl14-fp16.onnx --trt-path ./depth_anything_vitl14-fp16.engine
  1. Place the exported engine inside ComfyUI/models/tensorrt/depth-anything directory

☀️ Usage

  • Insert node byRight Click -> tensorrt -> Depth Anything Tensorrt
  • Choose the appropriate engine from the dropdown

🤖 Environment tested

  • Ubuntu 22.04 LTS, Cuda 12.3, Tensorrt 10.0.1, Python 3.10, RTX 4090 GPU
  • Windows (Not tested)

📝 Changelog

  • 16/09/2025

    • Add support for v2 metric models (depth_anything_v2_metric_hypersim_vitl, depth_anything_v2_metric_vkitti_vitl)#21
  • 08/07/2025

  • 20/05/2025

  • 02/07/2024

    • Add Depth Anything V2 onnx models + benchmarks
    • MergePR for engine caching in memory byBuffMcBigHuge
  • 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)

👏 Credits

About

ComfyUI Depth Anything (v1/v2/distill-any-depth) Tensorrt Custom Node (up to 14x faster)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    Contributors4

    •  
    •  
    •  
    •  

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp