ComfyUI Extension
ComfyUI-H3-Refiner
All-in-one face and dual-hand video refinement custom node for MiniMax-H3 in ComfyUI.
javawock7618/ComfyUI-H3-Refiner
Nodes—
On cloudLocal install
Stars3
Updateda day ago
Readme
ComfyUI-H3-Refiner
An all-in-one ComfyUI custom node for refining faces and dual hands in MiniMax-H3 videos.
Note: This custom node was created with Gemini.
Key Features
- Single-Node All-in-One Pipeline: Built-in video loader (drag-and-drop / Browse), range trimming with optional
17k+5snapping, face refinement, independent dual-hand refinement, and seamless range merge in one node (ComfyUIH3Refiner). - Full-Video Face Scanner & Target Picker: Scans all frames regardless of the selected trim range, clusters distinct faces, and lets you select a specific person (
#1,#2, ...). - Target-Linked Hand Filtering: When a specific target face is selected, hand refinement automatically links to that subject—skipping other people across shot cuts and prioritizing hands belonging to the chosen person in multi-person frames.
- Built-in SAM Support: Supports Ultralytics SAM presets (
sam2.1_b.pt,sam2.1_s.pt,mobile_sam.pt, auto-downloaded intoComfyUI/models/sams/on first use) as well as checkpoints placed inComfyUI/models/sams/(e.g.sam_vit_b_01ec64.pth). Models are offloaded to CPU after masking to preserve VRAM. - Clean, Motion-Aware Stitching: Uses Savitzky-Golay trajectory smoothing, per-frame denoise scaling, short motion-blur dropout bridging for hands, and source-pixel feathering with colour matching.
- Compact Cropped Compare Output (
compare_images): Outputs a compact side-by-sideINPUT | RESULTcomparison video of refined face and hand crops. - Collapsible I/O & 2-Tab UI: Supports collapsible I/O slots (Nodes 1.0 & Nodes 2.0) and a streamlined 2-tab layout (
Models & Refine,Prompts & Sampler).
Installation
- Clone or place
ComfyUI-H3-RefinerintoComfyUI/custom_nodes/:cd ComfyUI/custom_nodes git clone https://github.com/javawock7618/ComfyUI-H3-Refiner.git - Install dependencies:
pip install -r ComfyUI-H3-Refiner/requirements.txt - Place YOLO face and hand detectors in
ComfyUI/models/ultralytics/bbox/(e.g.,face_yolov8m.pt,hand_yolov8s.pt). - (Optional) Place a SAM checkpoint in
ComfyUI/models/sams/, or leaveSAM Modelonsam2.1_b.ptto auto-download on first run. - Restart ComfyUI and hard-reload the browser (
Ctrl + F5).
Quick Usage Guide
- Add
ComfyUI-H3-Refiner(MiniMax H3/Refiner) and connectmodel,clip,vae_video,vae_audio, and optionallyface_ref_image. - Drop a video onto the preview stage or click Browse.
- (Optional) Drag the blue trim handles (or
Shift + Clickon the trim bar) to refine only a specific segment. Enable17k+5to snap the range to MiniMax-H3's frame grid. - (Multi-person videos) Click Scan Faces in the Models & Refine tab and pick the target face (
#1,#2, ...). Both face and hand passes will track that subject. - Adjust Face Denoise (default
0.20), Hand Denoise (default0.22), Mask Feather (default6), and Steps (default4for turbo setups), then queue the workflow. - Connect
images,audio, andfpsto your video save/preview nodes, and optionally inspectcompare_imagesandpreview.
Included Workflow
workflows/ComfyUI-H3-Refiner.json: Example workflow wired with MiniMax-H3 loaders, optionalFace Ref Image,ComfyUI-H3-Refiner, comparison preview, andCreateVideo/SaveVideo.
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE and README.ja.md for the Japanese documentation.