H3Anim Turns MiniMax H3 Clips Into Game-Ready Sprite Sheets
H3Anim is a ComfyUI node that turns a MiniMax H3 character clip into transparent frames and a sprite sheet with atlas JSON for game engines.
ComfyUI/output/H3Anim/<asset>/ ready for a 2D engine.
Walk, talk and a second walk direction from the author's Mina test set.
For games the hard part is not the five-second clip, it is everything after it: cutting the background, keeping the feet on one baseline, and picking frames that loop. H3Anim does that in one node instead of a chain of matte, crop and sheet-packing plugins.
What it does
Point the Generate panel at a MiniMax H3 model, text encoder and video VAE, then feed one to three character reference images (reference-to-video) or a first frame (image-to-video). The node renders the clip, decodes it, and hands the frames to a matte step.
Transparency can come from a color key, an installed background-removal model, or your own mask. In the Studio you pick and reorder frames, nudge their offsets, mirror a direction, and let the built-in stabilization center the feet before packing. Export writes a grid sheet, an atlas JSON with fps, frame count, cell size and a pivot at the feet (y: 1.0), plus a combined <asset>_animations.json manifest that indexes every action.
Presets
51 animation presets ship in presets.json: 8-direction walk and run, 4-direction idle, combat (slash per direction, jump, dodge, flinch, block, kick), interactions (sit, wave, talk, pick up, phone, nod, shrug, clap, bow) and visual-novel portraits. Six styles control the look (match reference, retro pixel, a Daggerfall-style pixel look, photoreal, 2D anime, stylized 3D) and four flat backdrops make keying easy. All of it is editable JSON.
| Category | Presets |
|---|---|
| 8-Dir Walk + 8-Dir Run | 16 |
| 4-Dir Idle | 8 |
| 4-Dir Combat | 9 |
| Interactions | 12 |
| VN Portrait | 5 |
| Custom prompt | 1 |
Run it
https://github.com/Ercelcan/Comfyui-H3Anim into ComfyUI/custom_nodes/ and restart. No extra Python packages.
2. Use a ComfyUI build with the built-in MiniMax H3 nodes (MiniMaxH3ImageToVideo, MiniMaxH3ReferenceToVideo), and put the H3 diffusion model, text encoder and video VAE in their usual model folders.
3. Add H3Anim One-Node Studio, choose Reference to Video or Image to Video, then pick animation, style and backdrop.
4. Generate, matte, select frames in the Studio, and export.
One walk cycle: 15 frames at 12 fps, foot-baseline stabilization on.
The node outputs frames_rgba, alpha_mask, sprite_sheet, loop_video, atlas_json and the untouched raw_frames, so a sheet can be previewed inside ComfyUI before it is written to disk.
Sample output video from the repository.
Before you install
The repo is one day old (November 29, 55 stars and a 220-point r/StableDiffusion thread on day one), and its most likely churn is the prompt library and presets rather than the node itself. It ships no weights: you bring your own H3 checkpoint and text encoder. Background removal by model needs a matting model installed; color keying and external masks do not. License is Apache-2.0.
Talk loop: 19 frames at 12 fps in the same atlas format as the walk.
Comments
Sign in with GitHub to join the discussion.