[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111740":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":15,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},111740,"ComfyUI-MiniMaxH3-Loop","pxl-pshr\u002FComfyUI-MiniMaxH3-Loop","pxl-pshr","Seamless looping video with MiniMax H3 in ComfyUI: circular padding, loop decode, ControlNet restyling and loop-safe interpolation.","",null,"Python",63,5,58,1,0,3,4,44,"GNU General Public License v3.0",false,"main",true,[],"2026-11-11 03:44:18","2026-11-23 02:12:41","# ComfyUI-MiniMaxH3-Loop\n\nSeamless looping video with MiniMax H3 in ComfyUI. No first frame \u002F last frame, no second pass, no crossfade.\n\n| Jellyfish | Sleeping cat |\n| --- | --- |\n| ![Jellyfish, seamless loop](docs\u002Floop.gif) | ![Sleeping cat, seamless loop](docs\u002Fcat_sleeping.gif) |\n| **Rocking chair** | **Koi pond** |\n| ![Grandpa in a rocking chair, seamless loop](docs\u002Frocking_chair_grandpa.gif) | ![Koi pond, seamless loop](docs\u002Fkoi_pond.gif) |\n\n## Install\n\nClone into `ComfyUI\u002Fcustom_nodes` and restart ComfyUI:\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fpxl-pshr\u002FComfyUI-MiniMaxH3-Loop\n```\n\nRequires ComfyUI v0.42.0 or newer. The example workflows show up in ComfyUI's template browser. They also use [ComfyUI-Frame-Interpolation](https:\u002F\u002Fgithub.com\u002FFannovel16\u002FComfyUI-Frame-Interpolation) (Loop Interpolate), and the Control workflow uses [ComfyUI-VideoHelperSuite](https:\u002F\u002Fgithub.com\u002FKosinkadink\u002FComfyUI-VideoHelperSuite) (Load Video Path).\n\n## Getting a clean loop\n\nThe node makes the model join the end of the clip to its start. Whether that join is invisible depends mostly on the prompt. Describe a **state that keeps going**, not a sequence of events, and ask of every prompt: *if this clip played twice in a row, would the joint show?*\n\n- **Locked-off camera:** `Locked-off static camera, no pan, no zoom.`\n- **One large, clear subject doing one continuous or cyclic thing:** pulsing, rotating, swaying, drifting, orbiting, breathing.\n- **Steady light, environment and sound:** a fixed setting and a steady ambient `overall_soundscape:`.\n- **Nothing that piles up.** Spilled liquid, crumbs, footprints and growing puddles reset at the loop point. Describe the end state as already there from the first frame (`the tabletop is already glossy and wet from the very first frame`) instead of letting it build.\n- **No timelines or one-way changes:** no `[0s-2s]`, no \"then\" or \"finally\", no single events like a bite or a blink.\n- **Fine turbulent texture** (blowing sand, rain streaks, smoke, spray) can change pattern at the loop point. Keep it subtle or secondary to the main subject.\n\nSettings matter as much as the words:\n\n- **25 steps without the turbo LoRA** is the smoothest on fast motion. Turbo v2 comes close at about a third of the time. The v1.0 turbo LoRA and FastH3 are fine for drafts and slow subjects but can judder on fast ones.\n- **A reference image** (`\u003CPicture 1>`) holds the subject and look. Avoid first\u002Flast-frame anchors: H3 reads a pinned frame as a shot start and the loop point can jump.\n- **Try several seeds.** On the same prompt the seed decides more than you would expect; pops that look like seam problems are usually the model and show up in a plain render with that seed too.\n- **ControlNet** for camera travel or exact repeating geometry: your own loop fixes the geometry and H3 restyles it. See [Restyling a loop with ControlNet](#restyling-a-loop-with-controlnet).\n\n**[PROMPTING.md](PROMPTING.md)** is the full guide: format, structure, camera travel through repeating spaces, sound, reference images, a checklist, a before\u002Fafter rewrite, and example prompts. It is also written to work as instructions for an LLM: give it the file and your rough idea (\"jellyfish loop, moody\") and it will write a prompt that follows these rules. With a reference image, give the LLM the image too.\n\n## Nodes\n\n- **MiniMax H3 Loop** (model patch): samples the latent with its end wrapped around to its start, so the model joins the end to the start like any other part of the video. `views` 2 (default) also samples a half-rotated view and takes the audio around the loop point from it, which keeps the sound clean there; costs about 1.8× sampling time. Use `views` 1 with the Fun ControlNet. `rotate` (on by default, `views` 1 only) moves the wrap point on by one clip with every sampling step, which removes most of the jump in motion at the loop point.\n- **MiniMax H3 Loop Decode**: decodes the loop with wrapped context on both sides and outputs exactly one loop of frames and audio.\n- **MiniMax H3 Loop Control Video**: fits an existing seamless loop (for example a 3D depth pass) to the H3 loop as the control video for Apply MiniMax H3 Fun ControlNet. See [Restyling a loop with ControlNet](#restyling-a-loop-with-controlnet).\n- **Loop Interpolate**: FILM or RIFE frame interpolation across the whole loop, including the frames between the last frame and the first. Outputs the new fps for Create Video. Needs [ComfyUI-Frame-Interpolation](https:\u002F\u002Fgithub.com\u002FFannovel16\u002FComfyUI-Frame-Interpolation).\n\n## Example workflows\n\nAll in `example_workflows\u002F`. Each has a note with lengths, prompting tips and settings. For a reference image, un-bypass Load Image and put `\u003CPicture 1>` in the prompt.\n\n| Workflow | Model | Steps | Time* |\n| --- | --- | --- | --- |\n| `MiniMax-H3-Loop.json` | ref2va | 25 | ~21 min |\n| `MiniMax-H3-Loop-Turbo.json` | ref2va + turbo LoRA v1.0 | 8 | ~7 min |\n| `MiniMax-H3-Loop-Turbo-v2.json` | ref2va + turbo LoRA v1.1 | 8 | ~7 min |\n| `MiniMax-H3-Loop-FastH3.json` | FastH3-Omni | 8 | ~7 min |\n| `MiniMax-H3-Loop-Control.json` | ref2va + turbo LoRA v1.0 + Fun ControlNet | 8 | ~4 min |\n\n\\*Per loop on an RTX 4090, 1280×704, length 107, `views` 2 (Control uses `views` 1). The workflows default to 1344×768 and length 158 (a 6.4 s loop), which takes a bit longer; the Control workflow defaults to length 107. The first three end in Loop Interpolate (FILM ×2, 48 fps).\n\n- **MiniMax-H3-Loop** (no LoRA): natural, photographic, the reference look. Smoothest on fast motion.\n- **Turbo** (ref2v turbo 8-step LoRA v1.0): the LoRA shifts the look, so the same seed gives a different shot. Fast motion can judder (every other frame nearly still), depending on seed.\n- **Turbo v2** (ref2v turbo 8-step LoRA v1.1): same speed and similar look. In our tests it removed the v1.0 judder; the loop point can move a little faster than the rest of the clip.\n- **FastH3** ([FastH3-Omni](https:\u002F\u002Fhuggingface.co\u002FFastVideo\u002FFastH3-Omni-Comfy), `fasth3_omniref_8step_pruned_int8_convrot.safetensors`): close to the 25-step look with a reference image, a bit punchier; text-only prompts give a different shot. Slight judder on fast motion; slow flows stay smooth.\n- **Control** (Fun ControlNet): restyles an existing loop; geometry and timing come from your control video.\n\nFastH3-Omni stores per-step output heads and needs ComfyUI v0.42.0 or newer. Older versions fail with \"size of tensor a (24) must match the size of tensor b (768)\".\n\nA good split: Turbo v2 or FastH3 for drafts, 25 steps for finals with fast motion.\n\n### Models\n\nThe workflows carry these download links, so ComfyUI offers to download any that are missing.\n\n| File | Folder | Used by |\n| --- | --- | --- |\n| [minimax_h3_ref2va_pruned_int8_convrot.safetensors](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Fdiffusion_models\u002Fminimax_h3_ref2va_pruned_int8_convrot.safetensors) | `diffusion_models` | Loop, Turbo, Turbo v2, Control |\n| [fasth3_omniref_8step_pruned_int8_convrot.safetensors](https:\u002F\u002Fhuggingface.co\u002FFastVideo\u002FFastH3-Omni-Comfy\u002Fresolve\u002Fmain\u002Fdiffusion_models\u002Ffasth3_omniref_8step_pruned_int8_convrot.safetensors) | `diffusion_models` | FastH3 |\n| [minimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors](https:\u002F\u002Fhuggingface.co\u002Flightx2v\u002FMinimax-h3-Turbo\u002Fresolve\u002Fmain\u002Fminimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors) | `loras` | Turbo, Control |\n| [minimax_h3_ref2v_turbo_8step_v1.1_768p_comfyui_bf16.safetensors](https:\u002F\u002Fhuggingface.co\u002Flightx2v\u002FMinimax-h3-Turbo\u002Fresolve\u002Fmain\u002Fminimax_h3_ref2v_turbo_8step_v1.1_768p_comfyui_bf16.safetensors) | `loras` | Turbo v2 |\n| [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Ftext_encoders\u002Fqwen3vl_32b_minimax_h3_nvfp4_awq.safetensors) | `text_encoders` | all |\n| [minimax_h3_video_vae_fp16.safetensors](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Fvae\u002Fminimax_h3_video_vae_fp16.safetensors) | `vae` | all |\n| [minimax_h3_audio_vae_fp32.safetensors](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Fvae\u002Fminimax_h3_audio_vae_fp32.safetensors) | `vae` | all |\n| [minimax_h3_fun_controlnet_union_pruned_int8_convrot.safetensors](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Fmodel_patches\u002Fminimax_h3_fun_controlnet_union_pruned_int8_convrot.safetensors) | `model_patches` | Control |\n\nOther precisions (bf16, fp8) are in [Comfy-Org\u002FMiniMax-H3](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3), [FastVideo\u002FFastH3-Omni-Comfy](https:\u002F\u002Fhuggingface.co\u002FFastVideo\u002FFastH3-Omni-Comfy) and [lightx2v\u002FMinimax-h3-Turbo](https:\u002F\u002Fhuggingface.co\u002Flightx2v\u002FMinimax-h3-Turbo). Loop Interpolate's FILM and RIFE checkpoints download automatically through ComfyUI-Frame-Interpolation.\n\n## Usage\n\nMiniMax H3 Loop → BasicGuider \u002F BasicScheduler → SamplerCustomAdvanced → MiniMax H3 Loop Decode → Loop Interpolate → Create Video.\n\n**Length** must be 17k+5 frames. The loop is 17k frames. These lengths keep the audio loop exact:\n\n| length | loop frames | seconds at 24 fps |\n|---|---|---|\n| 107 | 102 | 4.25 |\n| 158 | 153 | 6.4 |\n| 209 | 204 | 8.5 |\n| 260 | 255 | 10.6 |\n| 311 | 306 | 12.75 |\n| 362 | 357 | 14.9 |\n\n**Prompt:** see [Getting a clean loop](#getting-a-clean-loop).\n\n**Reference image:** connect it to MiniMax H3 Reference to Video and refer to it as `\u003CPicture 1>`. In our tests this kept the subject and look, and loop points were about as clean as text-to-video.\n\n**First frame \u002F Add Guide anchors** (MiniMax H3 Image to Video with the fl2va model) work with the loop: each anchor lands on its loop frame, and a last-frame anchor wraps onto the start. But H3 treats a pinned frame as a shot start: the end of the loop may not lead into it, so the loop point can jump, and away from the pinned frame the exposure drifts (in a test, 35 → 50 mean brightness; plain image-to-video without the loop drifted too, 35 → 39). In our tests the reference image route above kept the same subject and look with steady exposure and a cleaner loop point, so prefer it for loops from an image.\n\n**Frame rate:** H3 always generates at 24 fps. Raising the fps in Create Video only plays it faster; use Loop Interpolate to make it smoother.\n\n## Restyling a loop with ControlNet\n\nIf you already have a seamless loop (a Blender render, a depth or edge pass), H3 can restyle it while your loop fixes the geometry and timing. In our tests this gave the cleanest loop points, and it handles camera travel (tunnels, corridors) that text prompts struggle with.\n\nNeeds the Fun ControlNet model patch [`minimax_h3_fun_controlnet_union_pruned_int8_convrot.safetensors`](https:\u002F\u002Fhuggingface.co\u002FComfy-Org\u002FMiniMax-H3\u002Fresolve\u002Fmain\u002Fmodel_patches\u002Fminimax_h3_fun_controlnet_union_pruned_int8_convrot.safetensors) in `models\u002Fmodel_patches`.\n\nmodel → MiniMax H3 Loop → Apply MiniMax H3 Fun ControlNet → guider\u002Fscheduler. **The order matters**: MiniMax H3 Loop must come first (the other order raises an error).\n\nControl loop (Load Video) → MiniMax H3 Loop Control Video → Apply MiniMax H3 Fun ControlNet's `control_video`.\n\n- Give MiniMax H3 Loop Control Video the same `length` and `pad_clips` as the rest of the workflow, and the control clip's `fps`.\n- `cycles` 0 repeats the control loop as many times as keeps it closest to its own speed. The control is resampled to fit, which blends neighbouring control frames. For an exact fit with no blending, render the control at 24 fps with a cycle that divides the loop (length − 5) exactly: cycles × cycle frames = loop frames. A 34-frame cycle fits length 107 (3 cycles) or 209 (6); a 68-frame cycle fits 209 (3). `cycles` 0 picks that count automatically.\n- Prompt the geometry the control shows, then the look.\n\n`example_workflows\u002FMiniMax-H3-Loop-Control.json` has it wired up. Point its Load Video node at your own loop.\n\n## How it works\n\nH3 latents come in 17-frame clips of 5 latent frames. Each model call sees the loop with `pad_clips` wrapped clips on each side (default 1, the end of the loop before it and the start after it) and keeps the middle. The end-to-start join is denoised with real context on both sides, and the sequence edges fall in context that is thrown away. Loop Decode does the same around the VAE decode.\n\nPadding adds sampling time: about 34% at 209 frames with `pad_clips` 1. It also extends what the model sees by 17 frames per padding clip on each side: with `pad_clips` 1, length 311 becomes 345 frames, within H3's 362-frame maximum, while 362 becomes 396 and runs past it.\n\nWith one view, the loop's first and last ~0.7 s are duplicated as wrap context at the same place on every step, and H3's audio stream turns loud and garbled there (3–10× the clip's normal level). `views` 2 also samples the loop rotated by half, with its wrap point mid-loop, and blends the two audio predictions by distance from each view's wrap point. Both views run on every step, so nothing changes from step to step. The picture comes from the first view only: when both views were blended, they could settle on opposite directions of motion (particles streaming right in one, left in the other), which reversed the motion mid-loop.\n\nWith `views` 1 and a wrap point that stays at the loop's start, the motion could jump there: the loop point changed 2–5× as much as a typical frame step, while H3's other clip boundaries stayed near 1×. Moving the wrap point half a loop in moved the jump with it, so it comes from the sampling, not from the prompt or the decode. `rotate` therefore moves the wrap point on by one clip with every sampling step, so no frame is the join on every step. In our tests, loops with a clear jump dropped from a median of 4.3× to 1.5×, and loops that were already clean stayed about the same. It isn't applied with `views` 2 or the Fun ControlNet, and we haven't tested what it does to the audio of a `views` 1 loop.\n\nThe padding repeats the loop's own latent, so it gets fresh noise in place of the copied noise: seeing the same noise twice made distilled models such as FastH3 draw white specks, densest near the loop point.\n\nAn earlier version rotated the latent by a different amount each step (Mobius-style latent shift) instead. That kept the audio clean but caused one-frame hitches in the picture, and was removed.\n\n## License\n\nGPL-3.0\n","这是一个为ComfyUI设计的插件，用于生成无缝循环视频（即首尾自然衔接、无跳变或淡入淡出的闭合视频），基于MiniMax H3视频生成模型。核心功能包括环形填充（circular padding）、循环解码（loop decode）、ControlNet驱动的循环安全重风格化，以及支持帧插值的循环平滑处理。技术特点在于单次推理完成闭环，无需二次渲染、跨帧融合或后处理缝合。适用于AI视频创作中对循环性有硬性要求的场景，如动态壁纸、数字标牌、交互式装置艺术、短视频素材库等。",2,"2026-11-24 04:41:37","CREATED_QUERY"]