Nodes/ComfyUI-ProportionChanger/(Down)Load Mascot BBox Model
ComfyUI Node

(Down)Load Mascot BBox Model

The download-and-load node for mascot part detection

By grmchn·Created about a year ago·Updated 3 months ago· 102
(Down)Load Mascot BBox Model
    • mascot_bbox_model
    urlhttps://huggingface.co/grmchn/mascot-pose-detect/resolve/main/bbox/model.onnx
    cudatrue
    warmuptrue

    This is the boring node that makes the fun ones work. DownloadAndLoadMascotBBoxModel grabs the bounding-box ONNX model the mascot nodes need and loads it into an ONNXRuntime session so you can hand it off to Mascot BBox Detector. The name is the whole job: if the model isn't on disk yet, it downloads it; either way it returns a ready-to-use model handle.

    How it works

    The name is also slightly a lie in the reassuring direction - the node only downloads from one pinned HuggingFace URL (grmchn/mascot-pose-detect's bbox/model.onnx), and it caches into ComfyUI/models/mascot_body_detect/. The url input is an enum with a single choice, so there's nothing to misconfigure; the node just checks whether the local copy exists and matches the expected repo (it writes a .repo_id marker file to detect a stale or foreign model), downloads if needed, and builds the ONNXRuntime session. It's the same RTMDet-style detector the Mascot Pose Detector uses internally to find the body ROI before keypoint estimation - this loader just exposes the bbox model standalone for bbox-only workflows.

    The two toggles that matter

    • cuda (default on) - tries CUDAExecutionProvider first and falls back to CPU. Leave it on if you have a working onnxruntime-gpu setup.
    • warmup (default on) - runs one dummy inference after loading so the first real detection isn't a cold-start stall.

    That's the whole surface. One output, mascot_bbox_model, plugs directly into the detector.

    Install and the one real gotcha

    It's part of the one-pack install - ComfyUI Manager search "ComfyUI-ProportionChanger", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/grmchn/ComfyUI-ProportionChanger.git
    cd ComfyUI-ProportionChanger
    pip install -r requirements.txt
    

    Restart after, then give the node a first run with network access - it has to reach HuggingFace once to fetch the model (~tens of MB), and it will silently do nothing useful if it can't.

    The gotcha that actually bites people is the onnxruntime dependency. The pack's requirements.txt installs stock onnxruntime, which is CPU-only. It works, but it's slow and cuda=true will just fall back. If your ComfyUI environment manages CUDA providers itself, the README's advice is to install onnxruntime-gpu instead - otherwise the "GPU" checkbox is quietly cosmetic. Also note the model package is Apache 2.0, but the node code you just installed is GPL 3.0 because the pack combines Apache-licensed (kijai's wrapper) and GPL-licensed (toyxyz's editor) sources. Practically irrelevant for personal use, worth knowing if you ever redistribute your setup.

    CategoryProportionChanger

    Inputs (3)

    NameTypeDefaultDescription
    urlCOMBOhttps://huggingface.co/grmchn/mascot-pose-detect/resolve/main/bbox/model.onnx1 options: https://huggingface.co/grmchn/mascot-pose-detect/resolve/main/bbox/model.onnx
    cudaBOOLEANtrueUse CUDAExecutionProvider when available.
    warmupoptBOOLEANtrueRun a small dummy inference after loading.

    Outputs (1)

    NameTypeDescription
    mascot_bbox_modelMASCOT_BBOX_MODEL