[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110856":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},110856,"ComfyUI-InstantHMR","jtydhr88\u002FComfyUI-InstantHMR","jtydhr88","InstantHMR for ComfyUI: fast 3D human bodies from photos, video and a live camera, on the native SAM 3D Body \u002F MHR nodes",null,"JavaScript",59,10,51,0,3,7,45.32,"Apache License 2.0",false,"main",[],"2026-11-08 16:11:38","2026-11-20 14:34:03","English | [中文](README.zh-CN.md)\n\n# ComfyUI-InstantHMR\n\n[InstantHMR](https:\u002F\u002Fgithub.com\u002FNaturalpad-studio\u002FInstantHMR) recovers the 3D body of every person in an image or video: pose, body shape, 70 keypoints in 2D and 3D, and the full [MHR](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FMHR) body mesh. It is a small, fast model (20-32 M parameters) that outputs the same MHR body as ComfyUI's SAM 3D Body, so its result plugs into the native SAM 3D Body nodes for smoothing, rendering and 3D export.\n\n![InstantHMR on four dancers](docs\u002Frender_friends.jpg)\n\n## Nodes\n\n| Node | What it does |\n| --- | --- |\n| `Load InstantHMR Model` | loads an InstantHMR checkpoint from `models\u002Fdetection` |\n| `Run InstantHMR Prediction` | predicts one MHR body per person box and outputs `MHR_POSE_DATA` |\n| `InstantHMR Live Capture` | live 2D and 3D preview from a camera that can drive a rigged character or a VMC app, with recording; outputs the recorded clip as `VIDEO` |\n\n`Run InstantHMR Prediction` takes person boxes from `RT-DETR Detect` (class `person`) or tracks from `SAM3 Video Track`; with neither, the whole frame is one person. `fov` is the vertical field of view in degrees; connect `MoGe` through `MoGe Geometry To FOV` for the camera of a video, or leave it at 0 for a focal of 1.05x the image diagonal.\n\nThe output works with the native nodes:\n\n- `Smooth SAM3D Body Pose Data` for video jitter\n- `Render 3D Body Pose`: mesh, silhouette, OpenPose 2D\u002F3D, SCAIL\n- `Create 3D Animation File`: animated GLB in the `openpose` and `scail` styles. The `body_mesh` and `bones_only` styles and BVH read the MHR rig from a `sam3d_body_model` input, so connect a SAM 3D Body loader for those.\n\n![Example workflow](docs\u002Fworkflow_image.jpg)\n\n## Live capture\n\n![Live capture](docs\u002Flive_capture.jpg)\n\n`InstantHMR Live Capture` runs RT-DETR and InstantHMR on a camera feed while you watch: the camera image with the 2D skeletons on the left, the 3D bodies on the right (drag to orbit). Pick the InstantHMR `model`, the RT-DETR `detector` and the `camera` in the node, then press `Start`. These settings are saved with the workflow.\n\n- `camera` **This device** uses the webcam of the browser showing ComfyUI; both views show it mirrored, like a video call. Recordings and VMC keep the real left and right.\n- `camera` **Phone \u002F other device** shows a QR code. Scan it with a phone on the same network; the phone page streams its camera and shows the skeletons, while the node shows the 3D view.\n- `● Record` records the incoming frames to `input\u002Finstanthmr_live\u002F`. The new clip is selected in the `recording` list, and running the workflow outputs it as `VIDEO`, ready for `Get Video Components` → `Run InstantHMR Prediction` and the rest of the pipeline (`example_workflows\u002Finstanthmr_live.json`).\n- `smoothing` steadies the body between frames: while you hold still it stays put, fast moves still come through. Higher is steadier and lags a little more on slow moves; 0 shows the raw per-frame result. The 3D view, the character and VMC all use the smoothed pose.\n- `detect_every` (advanced input) runs the detector every N frames and reuses its boxes in between; the detector is the slowest step, so 2-3 keeps the preview smooth. `fov` (advanced input) works like the prediction node's `fov`.\n- `character` lists rigged characters (`.fbx`, `.glb`, `.gltf`, `.vrm`) found in the `input` folder, for example `input\u002F3d\u002F`. Pick one and the 3D view drives it instead of the MHR body, one copy per person. Bones are matched by name for Mixamo, Unreal and similar rigs, and from the humanoid table for VRM. T-pose and A-pose characters both work; the character is scaled to the performer's leg length.\n- `vmc`: type `host:port` of an app that receives the [VMC protocol](https:\u002F\u002Fprotocol.vmc.info\u002F) (VSeeFace, Warudo, VNyan, [VMC Link](https:\u002F\u002Fextensions.blender.org\u002Fadd-ons\u002Fvmc-link\u002F) for Blender, VMC4U for Unity) to stream the first person as a humanoid avatar pose, for example `127.0.0.1:39539`. ComfyUI sends it, so the address is seen from the computer running ComfyUI. Clear the field to stop.\n  - In Blender: install VMC Link, import a T-pose character (for example a Mixamo FBX), apply its rotation and scale (Object > Apply > All Transforms), pick the armature in the VMC Link panel and press Start Receiver. Start Recording there keys the motion onto the armature. For Mixamo rigs, set these in VMC Link's manual bone mapping (Advanced): UpperLeg → UpLeg, LowerLeg → Leg, Toes → ToeBase, Chest → Spine1, UpperChest → Spine2, and the fingers → HandThumb1–3, HandIndex1–3 and so on (Little → HandPinky).\n\nBrowsers open a camera only on `localhost` or over HTTPS. For a phone, start ComfyUI with a certificate, for example a self-signed one:\n\n```\nopenssl req -x509 -newkey rsa:2048 -nodes -days 825 -keyout key.pem -out cert.pem -subj \"\u002FCN=ComfyUI\" -addext \"subjectAltName=IP:192.168.0.10\"\npython main.py --listen 0.0.0.0 --tls-keyfile key.pem --tls-certfile cert.pem\n```\n\nPut your computer's LAN address in `subjectAltName`, open ComfyUI at `https:\u002F\u002F\u003Caddress>:8188`, and accept the certificate warning once on the computer and once on the phone.\n\n## Models\n\n| File | Backbone | 3DPW PA-MPJPE (mm) | Licence |\n| --- | --- | --- | --- |\n| `instanthmr_nano.safetensors` | HGNetV2-B0 | 46.6 | SAM License, non-commercial |\n| `instanthmr_tiny.safetensors` | HGNetV2-B1 | 44.0 | SAM License, non-commercial |\n| `instanthmr_small.safetensors` | HGNetV2-B2 | 41.7 | SAM License, non-commercial |\n| `instanthmr_medium.safetensors` | HGNetV2-B4 | 40.0 | SAM License, non-commercial |\n| `instanthmr_medium_commercial.safetensors` | HGNetV2-B4 | 50.7 | SAM License |\n\nDownload them from [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fjtydhr88\u002FComfyUI-InstantHMR) and put them in `models\u002Fdetection`. Each file holds the network and the MHR body rig it is trained on, so no other model is needed. All weights are under the [SAM License](https:\u002F\u002Fhuggingface.co\u002Fjtydhr88\u002FComfyUI-InstantHMR\u002Fblob\u002Fmain\u002FLICENSE), since they are trained on SAM 3D Body annotations and contain parts of its checkpoint. `nano`, `tiny`, `small` and `medium` are also for non-commercial use only; `medium_commercial` is trained on commercially usable images and allows commercial use under the SAM License terms.\n\n### Converting the released ONNX files\n\nThe upstream release ships ONNX graphs on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fmomolesang\u002FInstantHMR). `scripts\u002Fconvert_onnx.py` turns one into a checkpoint for this pack, taking the MHR rig from ComfyUI's SAM 3D Body checkpoint ([`sam_3d_body_dinov3_bf16.safetensors`](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002Fsam-3d-body)). It needs `onnx`, and checks the result against the ONNX graph when `onnxruntime` is installed. From the ComfyUI folder:\n\n```\npip install onnx onnxruntime\npython custom_nodes\u002FComfyUI-InstantHMR\u002Fscripts\u002Fconvert_onnx.py instanthmr-medium.onnx \\\n    models\u002Fdetection\u002Fsam_3d_body_dinov3_bf16.safetensors models\u002Fdetection\u002Finstanthmr_medium.safetensors \\\n    --body mhr-body.onnx\n```\n\n## Example workflows\n\n- `example_workflows\u002Finstanthmr_image.json`: RT-DETR boxes on a photo, rendered as meshes over the image.\n- `example_workflows\u002Finstanthmr_video.json`: the SAM 3D Body video template with InstantHMR: SAM3 tracks, MoGe FoV, smoothing, a rendered video and a SCAIL GLB.\n- `example_workflows\u002Finstanthmr_live.json`: the same pipeline on a clip recorded with `InstantHMR Live Capture`.\n\n## Tips\n\n- InstantHMR is trained on whole people. On close-ups that cut the body at the chest the pose stays good, while the mesh can sit a few percent off the person in the image; full-body shots line up closely.\n- For several people in a video, use SAM3 tracks so each person keeps the same index across frames, which the smoothing node relies on. Tracks whose predicted body mostly falls outside their own SAM3 mask, such as a raised arm detected on its own, are dropped. When you know how many people are in the clip, set `max_objects` in `Run SAM3 Video Track` to that number.\n- Smaller models (`nano`, `tiny`) are faster and less accurate; the network takes about 1 ms per person on a desktop GPU, so the detector and tracker set the speed of a workflow.\n- For facial expressions, add `Face Expression to SAM3D Body` after `Run InstantHMR Prediction`, with a model from `Load SAM3D Body Model`. It reads the faces with MediaPipe and drives MHR's expression blendshapes, so the rendered mesh and GLB \u002F BVH export carry the expression. InstantHMR itself predicts body, hands and shape.\n\n## Credits\n\nInstantHMR by Mohamed Adjel, Kahina Chalabi and Vincent Bonnet ([paper](https:\u002F\u002Fhal.science\u002Fhal-05854387)); code under Apache-2.0, weights under the SAM License. The body model is Meta's [MHR](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FMHR) (Apache-2.0). Demo footage from [Mixkit](https:\u002F\u002Fmixkit.co\u002F).\n","ComfyUI-InstantHMR 是一个面向 ComfyUI 的插件，用于从单张图像、视频或实时摄像头输入中快速生成高精度 3D 人体模型（MHR 格式）。它基于 InstantHMR 模型，支持每帧多人检测与重建，输出包含 70+ 关键点的 2D\u002F3D 姿态、身体形状及完整网格，并原生兼容 ComfyUI 内置的 SAM 3D Body 节点，可直接用于姿态平滑、3D 渲染与动画导出（GLB\u002FBVH）。适用于动作捕捉、虚拟人驱动、实时 VMC（Virtual Motion Capture）及短视频 3D 动画制作等需要低延迟、轻量级 3D 人体重建的场景。",2,"2026-11-24 04:39:48","CREATED_QUERY"]