Nodes/ComfyUI YoloNasPose Tensorrt/Yolo Nas Pose Engine Builder
ComfyUI Node

Yolo Nas Pose Engine Builder

The one-time chore that makes YOLO-NAS-POSE actually fast

By yuvraj108c·Created 2 years ago·Updated about a year ago· 19
Yolo Nas Pose Engine Builder
    • message
    model_sizelarge_0.5
    custom_engine_name
    use_fp16true
    custom_onnx_path

    Yolo Nas Pose Engine Builder is the boring prerequisite that makes the whole pack work, and honestly that's its charm. Run it once per model, let it churn for a few minutes, and you never touch it again - it compiles YOLO-NAS-POSE into a TensorRT engine tuned to your GPU. The other node in this pack just runs the engine; this one builds it.

    Why you'd put up with this at all

    Pose estimation is the boring middle step of every OpenPose-style ControlNet workflow: you extract a skeleton from a reference image, then let the ControlNet steer the generation. The usual route - DWPose or OpenPose inside ComfyUI's ControlNet Auxiliary Preprocessors - works but it's genuinely slow, and it gets brutal once you feed it video frames instead of stills. People in the community have posted about DWPose taking fifteen minutes on a video. The fix the author of this pack keeps shipping is the same one across all his repos (this one, Dwpose-Tensorrt, Rife-Tensorrt): compile the detector into a TensorRT engine so it runs at inference speed instead of Python speed. The README's own numbers are 105–115 FPS on an H100 at 720p.

    TensorRT's catch, and the reason this node exists, is that engines are GPU-specific. The author benchmarks on an H100; you can't grab his engine file and run it on your 4070. You have to build your own, on the machine that will actually run it.

    What it does under the hood

    The node downloads an ONNX model from the author's Hugging Face repo (yuvraj108c/yolo-nas-pose-onnx), then hands it to polygraphy + TensorRT to compile into an engine saved at ComfyUI/models/tensorrt/yolo-nas-pose/. That's it. The engine build itself takes a few minutes and prints progress in the console - a long tqdm bar, not a hang.

    The inputs that matter:

    • model_size - here's the trap. All five choices (large_0.1 through large_0.8) are the same large YOLO-NAS-POSE-L model. The trailing number is the confidence threshold baked in at export time, not the model size. Lower threshold (0.1) catches more people and joints with more false positives; higher (0.8) keeps only confident detections. For a single clear subject, 0.5 is a sane default.
    • custom_engine_name - set this if you want a memorable name in the engine dropdown; leave empty and it uses the model-based default.
    • use_fp16 - on by default and you probably want it (faster, less VRAM). The tooltip's advice to disable it "if you experience stability issues" is worth heeding on finicky GPUs.
    • custom_onnx_path - a path to your own ONNX if you want to bypass the download entirely. The node exports YOLO-NAS-POSE models itself via super-gradients, but you don't need super-gradients installed unless you go that route.

    Its single output, message, is just a STRING telling you what happened. If it says the engine already exists, that's not an error - the node deliberately refuses to rebuild over an existing file, so delete it from models/tensorrt/yolo-nas-pose/ if you want a fresh compile.

    Installing it

    Through ComfyUI Manager, search for ComfyUI YoloNasPose Tensorrt and install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yuvraj108c/ComfyUI-YoloNasPose-Tensorrt
    cd ComfyUI-YoloNasPose-Tensorrt
    pip install -r requirements.txt
    

    The requirements are where it gets heavy: tensorrt, polygraphy, opencv-python, matplotlib. The tensorrt wheel has to match your CUDA setup, and the README only claims testing on Ubuntu 22.04 with CUDA 12.4 / TRT 10.x and an H100. Windows is "not tested, but should work" - and the single most common install failure across the author's packs is ModuleNotFoundError: No module named 'tensorrt', usually on Windows portable installs where the wheel landed in the wrong Python environment. If that's you, install the requirements into the exact environment ComfyUI uses, or let Manager handle it.

    After the build finishes, refresh the page or hit r - the new engine appears in the dropdown of the Yolo Nas Pose Tensorrt node.

    Categorytensorrt

    Inputs (4)

    NameTypeDefaultDescription
    model_sizeCOMBOlarge_0.5Select the YoloNasPose model size. Larger models provide better accuracy but require more VRAM.
    custom_engine_nameSTRINGOptional custom name for the TensorRT engine file. If empty, will use the default name based on the model.
    use_fp16BOOLEANtrueEnable FP16 precision for faster inference and lower VRAM usage. Disable if you experience stability issues.
    custom_onnx_pathSTRINGOptional path to a custom ONNX model file. If provided, will use this instead of downloading the predefined model.

    Outputs (1)

    NameTypeDescription
    messageSTRING