Nodes/Melite Kimodo Nodes/🎯 Anny-Fit · camera-space refine
ComfyUI Node

🎯 Anny-Fit · camera-space refine

The node that runs on a checkout you have to install yourself

By JayDataEngineer·Created 2 months ago·Updated 4 days ago· 1
🎯 Anny-Fit · camera-space refine
    • out_dir
    • anny_params_paths
    • render_paths
    ◄image_path►
    ◄datasetmulti_person►
    ◄detectorgroundingdino►
    ◄vlm_versionheadcrop►
    ◄preprocess_timeout_s3600►
    ◄optimize_timeout_s7200►
    ◄filename_prefixanny/annyfit►
    ◄multihmr_modelmultiHMR_672_L_anny►
    ◄skip_camerafalse►
    ◄skip_densekpfalse►

    The other Anny node in this pack does regression - one forward pass over a photo, out come body parameters. This one does optimization: it starts from an estimate and refines it against the image, iteratively, and the result is a much better fit to the actual person in the actual photo. It's also the slowest thing in the pack by an order of magnitude, and the only node whose dependencies the pack's own pip install deliberately does not cover.

    Worth knowing before you invest an evening in it: this pack is essentially undiscussed in the wider community. When NAVER's estimator stack shows up on r/comfyui at all, it's usually inside a paper roundup, not a settings thread. You won't find someone's tuned config to copy. You'll be reading the source.

    Two stages, both out of process

    The node shells out twice, over a separate naver/anny-fit checkout with its own virtualenv - its dependencies never touch your ComfyUI venv, which is the whole reason it's structured that way.

    Stage one is preprocess.build_test_dataset: detection, ViTPose keypoints, camera estimation, dense keypoints, VLM-based attributes, and a Multi-HMR-Anny initialization. Stage two is annyfit/optimize.py itself, run against a config that the node loads from the upstream checkout (configs/demo/multihmr.yaml) and rewrites for paths - it doesn't retype the schedule, so it can't drift from upstream's intent. The subprocess gets a PYTHONPATH spanning the checkout and its multi-hmr and CameraHMR submodules, plus PYOPENGL_PLATFORM=egl for headless rendering.

    Results land in a run directory under your ComfyUI output tree: refined per-person params at results/annyfit/version_<stem>/params.npz, and initial/versus-final renders in vis/. The renders are how you tell whether the refinement actually did anything - compare them before you wire the params anywhere.

    Your source images get copied into the run directory before anything touches them. Upstream preprocessing writes next to its inputs; staging means your originals stay untouched.

    Inputs you set

    image_path accepts a single image file, a folder of images, or a data_root-style folder containing an images/ subdirectory. This is a batch door - one queue run can refine a whole shoot. Anything that isn't .jpg, .jpeg or .png is ignored; no images found at all raises.

    dataset (multi_person / single_person) and detector (groundingdino / detectron2) are the pipeline's framing choices. vlm_version (headcrop, crop, maskedcrop) picks how the image is cropped before the VLM reads attributes off it - headcrop is the default and the most sensible one for a full body shot.

    Then the two timeouts, preprocess_timeout_s (3600) and optimize_timeout_s (7200). These are per-stage subprocess ceilings, not a total. The generous defaults are a hint about the expected runtime.

    Of the optional three, multihmr_model names the init checkpoint inside the checkout's own checkpoints/ directory (default multiHMR_672_L_anny). skip_camera and skip_densekp map to upstream's --no_camera and --no_densekp flags, and they're your escape hatches when camera estimation or dense keypoints are failing or adding hours.

    Outputs: out_dir, anny_params_paths (the refined params) and render_paths (the before/after renders).

    Installing the checkout, which is the real work

    The pack install is the easy half:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/JayDataEngineer/melite-kimodo-nodes.git
    cd melite-kimodo-nodes
    pip install -r requirements.txt
    

    Then the part that isn't covered, and the node's own error message spells out the recipe:

    git clone --recurse-submodules https://github.com/naver/anny-fit /opt/anny-fit
    cd /opt/anny-fit && bash scripts/install.sh && bash scripts/download_checkpoints.sh
    

    Plus the manual checkpoints in upstream's INSTALL.md - ViTPose, CameraHMR and SMPL. That's not optional decoration; the pipeline needs all three. Defaults expect the checkout at /opt/anny-fit with a venv at .venv/bin/python; point ANNYFIT_SRC and ANNYFIT_PYTHON elsewhere if that's not where you put it.

    When it fails

    anny-fit checkout not found at /opt/anny-fit prints the missing file list and the clone command - read it, it's the actual fix. anny-fit interpreter not found at .../.venv/bin/python means the checkout exists but install.sh never ran, or you're pointing at the wrong Python.

    Budget disk and time honestly. download_checkpoints.sh is heavy, EGL rendering wants a working headless GL stack (PYOPENGL_PLATFORM is settable from outside if egl misbehaves on your box - osmesa is the usual fallback), and a multi-image folder run can genuinely span hours. Start with one photo.

    And the licensing: anny-fit's weights are NAVER non-commercial research licensed, as are Multi-HMR 2's. If "research only" isn't acceptable for where this is going, stay in the Sam3dBodyImageToAnny lane of the same pack - it exists precisely so the commercial path never touches this stack.

    CategoryMelite/Anny

    Inputs (10)

    NameTypeDefaultDescription
    image_pathSTRINGImage file, folder of images, or a data_root folder containing images/
    datasetCOMBOmulti_person2 options: multi_person, single_person
    detectorCOMBOgroundingdino2 options: groundingdino, detectron2
    vlm_versionCOMBOheadcrop3 options: headcrop, crop, maskedcrop
    preprocess_timeout_sINT360060–86400Per-stage subprocess timeout (preprocess)
    optimize_timeout_sINT720060–86400Per-stage subprocess timeout (optimize)
    filename_prefixSTRINGanny/annyfit—
    multihmr_modeloptSTRINGmultiHMR_672_L_annyInit checkpoint name inside the checkout's checkpoints/ dir
    skip_cameraoptBOOLEANfalse--no_camera
    skip_densekpoptBOOLEANfalse--no_densekp

    Outputs (3)

    NameTypeDescription
    out_dirSTRING—
    anny_params_pathsSTRING—
    render_pathsSTRING—