ComfyUI-MiniMaxH3-Loop Introduction
ComfyUI-MiniMaxH3-Loop creates seamless looping video and audio with MiniMax H3 inside ComfyUI. It helps the model generate the transition from the end of a clip back to its beginning as part of the video itself.
You do not need to supply matching first and last frames, run a second generation pass, or hide the join with a crossfade. Instead, the extension gives the model context from both sides of the loop boundary while it generates the clip.
This is useful for artwork built around continuous or repeating motion, such as:
- A jellyfish gently pulsing in water.
- A sleeping cat breathing.
- A rocking chair moving back and forth.
- Fish swimming through a calm pond.
- Ambient scenes with subtle movement and steady sound.
- Existing animation loops that you want to restyle with AI. A seamless result still depends on your prompt, model settings, and seed. The extension helps the model connect the beginning and end, but it cannot make every action naturally repeat. A subject breathing is easier to loop than a subject entering a room, picking something up, and leaving.
| Jellyfish | Sleeping cat | | --- | --- | | Jellyfish, seamless loop | Sleeping cat, seamless loop | | Rocking chair | Koi pond | | Grandpa in a rocking chair, seamless loop | Koi pond, seamless loop |
How ComfyUI-MiniMaxH3-Loop Works
Think of the video as a ring, not a strip
A normal video has two separate edges: its beginning and its end. When you repeat it, those edges may not match.
This extension treats the video more like a ring. During generation, it places a small amount of the ending before the beginning, and a small amount of the beginning after the ending. The model can then work on the join with information from both sides, just as it would work on motion in the middle of a clip.
The extra context is temporary. Only one complete loop is kept in the output.
Generation and decoding both respect the loop
The extension handles the loop at two stages:
- During generation: the MiniMax H3 Loop node modifies how the model processes the video’s compressed working representation, called a latent.
- During decoding: MiniMax H3 Loop Decode uses wrapped context again when turning that representation into visible frames and audio. Using both stages helps prevent the beginning and end from being treated as unrelated edges.
Audio receives additional treatment
With views set to 2, the extension processes a second view of the same loop, shifted by half its duration. This lets it use audio predictions from a view where the original loop boundary is away from the processing edge.
The two audio predictions are blended according to their distance from each view’s boundary. The picture comes from the first view only, avoiding conflicting directions of motion between views.
This is not a second generation pass. Both views are processed during each sampling step.
What the main settings mean
| Setting | Plain-language explanation | Practical effect |
| --- | --- | --- |
| views | How many differently positioned views of the loop are sampled. | 2 is the default and helps keep audio clean at the join. It costs about 1.8× the sampling time. Use 1 with Fun ControlNet. |
| pad_clips | How much neighboring loop context is added on each side. | The default is 1. More context also increases processing time and the total duration seen by the model. |
| length | The workflow’s frame-length setting, including five frames that are not part of the final loop. | The final loop contains length − 5 frames. Use the supported values described below. |
| Seed | The starting randomness used for generation. | Different seeds can produce noticeably different motion and loop quality, even with the same prompt. |
For a more technical reference, H3 groups video into 17-frame clips represented by five latent frames. With pad_clips: 1, the model receives 17 extra video frames on each side of the loop.
ComfyUI-MiniMaxH3-Loop Features
Loop-aware generation
MiniMax H3 Loop is a model-patch node: it changes how the model is sampled rather than editing the finished video afterward.
It helps the end lead into the beginning without relying on:
- Matching first-frame and last-frame images.
- A separate repair pass.
- A crossfade.
- Reversing the video into a back-and-forth “ping-pong” animation.
Loop-aware video and audio decoding
MiniMax H3 Loop Decode converts the generated result into exactly one loop of frames and audio, using wrapped context on both sides.
Use this node as part of the supplied loop workflow rather than replacing it with an ordinary decode stage.
Reference-image guidance
You can guide the subject and visual style with a reference image:
- Enable the Load Image node in an example workflow by removing its bypass.
- Connect the image to MiniMax H3 Reference to Video.
- Refer to the image in your prompt as
<Picture 1>. In the author’s tests, this approach preserved the subject and appearance while producing loop points about as clean as text-to-video generation.
A reference image is different from a pinned first frame. It guides the overall result without requiring the video to begin at that exact image.
Loop-aware frame interpolation
Loop Interpolate adds intermediate frames across the entire loop, including the transition from the last frame back to the first.
It supports FILM or RIFE through ComfyUI-Frame-Interpolation.
MiniMax H3 generates at 24 fps. Interpolation can make playback smoother without shortening the clip. For example, ×2 interpolation produces 48 fps output; the node provides the updated frame rate for Create Video.
Simply changing Create Video from 24 fps to 48 fps does not add motion detail—it plays the existing frames twice as fast.
Restyling an existing seamless loop
MiniMax H3 Loop Control Video prepares an existing loop for Apply MiniMax H3 Fun ControlNet.
This is useful when you already have a repeating animation, such as a Blender render, depth pass, or edge pass. Your input supplies the geometry and timing, while H3 changes its appearance.
In the author’s tests, this approach produced the cleanest loop points and handled camera travel through tunnels or corridors more reliably than text prompts alone.
See Restyling an Existing Loop for details.
ComfyUI-MiniMaxH3-Loop Workflow and Settings
Basic workflow
The main processing path is:
text MiniMax H3 Loop → BasicGuider / BasicScheduler → SamplerCustomAdvanced → MiniMax H3 Loop Decode → Loop Interpolate → Create Video
The supplied workflows are available in ComfyUI’s template browser and in example_workflows/. Each includes notes about lengths, prompting, and settings.
Compatibility: ComfyUI v0.42.0 or newer is required. The examples use ComfyUI-Frame-Interpolation for Loop Interpolate, and the Control example also uses ComfyUI-VideoHelperSuite for loading a video by path.
Choosing a loop length
The workflow’s length must follow:
text length = 17 × k + 5
The finished loop contains 17 × k frames. The following listed values keep the audio loop exact:
| Workflow length | Final loop frames | Duration at 24 fps |
| --- | --- | --- |
| 107 | 102 | 4.25 seconds |
| 158 | 153 | About 6.4 seconds |
| 209 | 204 | 8.5 seconds |
| 260 | 255 | About 10.6 seconds |
| 311 | 306 | 12.75 seconds |
| 362 | 357 | About 14.9 seconds |
Important: padding also counts toward the model’s maximum length. With pad_clips: 1, 34 frames of context are added in total:
length: 311becomes 345 frames of model context, within H3’s 362-frame maximum.length: 362becomes 396 frames, exceeding that maximum. Do not treat every value in the table as compatible with the default padding.
Example workflows and speed
| Workflow | Model configuration | Steps | Reported time per loop* |
| --- | --- | --- | --- |
| MiniMax-H3-Loop.json | ref2va, without turbo LoRA | 25 | About 21 minutes |
| MiniMax-H3-Loop-Turbo.json | ref2va + turbo LoRA v1.0 | 8 | About 7 minutes |
| MiniMax-H3-Loop-Turbo-v2.json | ref2va + turbo LoRA v1.1 | 8 | About 7 minutes |
| MiniMax-H3-Loop-FastH3.json | FastH3-Omni | 8 | About 7 minutes |
| MiniMax-H3-Loop-Control.json | ref2va + turbo LoRA v1.0 + Fun ControlNet | 8 | About 4 minutes |
*The author’s timings used an RTX 4090, 1280×704 resolution, length: 107, and views: 2; Control used views: 1.
Most examples default to 1344×768 and length: 158, giving an approximately 6.4-second loop and taking somewhat longer. Control defaults to length: 107. The first three workflows finish with FILM ×2 interpolation at 48 fps.
These are reference measurements, not guaranteed render times.
ComfyUI-MiniMaxH3-Loop Prompting Guide
Describe something that continues
The most useful question to ask is:
If this clip played twice in a row, would the join be noticeable?
Describe a continuing state rather than a sequence with a beginning and an ending.
Good subjects include pulsing, rotating, swaying, drifting, orbiting, or breathing. Start with one large, clear subject performing one continuous or cyclic action.
Keep the camera and surroundings stable
A helpful camera instruction is:
text Locked-off static camera, no pan, no zoom.
Keep the lighting, environment, and sound consistent. For audio, describe a steady ambient overall_soundscape: rather than a sequence of changing sound events.
Camera travel is more demanding. For exact movement through repeating spaces, consider a control video.
Avoid changes that accumulate
Some actions leave evidence behind:
- Liquid creates a growing puddle.
- Eating produces crumbs.
- Walking leaves footprints.
- Objects pile up. Those changes may suddenly reset when the video repeats. If the changed state is important, describe it as already present from the beginning—for example:
text The tabletop is already glossy and wet from the very first frame.
Avoid one-way timelines
For a straightforward loop, avoid:
- Time segments such as
[0s-2s]. - Instructions using “then” or “finally.”
- One-off actions such as a single bite or blink.
- Scenes that require a clear arrival, departure, or conclusion. Fine turbulent detail—such as rain streaks, blowing sand, smoke, or spray—can change pattern at the join. Keep it subtle or secondary to the main subject.
Choose settings to match the motion
- Fast motion: start with the 25-step workflow without turbo LoRA for the smoothest result.
- Drafts: Turbo v2 or FastH3 provides faster iteration.
- Unexplained pops: try multiple seeds before assuming the loop mechanism is at fault.
- Image-guided work: prefer reference-image guidance over first/last-frame anchors. The full PROMPTING.md guide includes prompt structure, camera travel, sound, reference images, a checklist, a before-and-after rewrite, and examples. You can also give that file to an LLM along with your rough idea to help develop a loop-friendly prompt. If you are using a reference image, provide the image too.
ComfyUI-MiniMaxH3-Loop Models
The extension provides workflows for several model configurations. Turbo v1.0 and v1.1 are LoRAs—add-on model weights used with the base ref2va model—rather than separate complete base models.
Which configuration should you choose?
| Configuration | When to use it | Expected behavior and limitations |
| --- | --- | --- |
| ref2va, 25 steps, no LoRA | Final renders, especially with fast motion. | Natural, photographic appearance and the smoothest fast motion in the author’s comparisons. |
| ref2va + turbo LoRA v1.0 | Fast drafts and slower subjects. Also used in the Control example. | Faster generation, but the LoRA changes the look. Some seeds produce judder on fast movement, with every other frame nearly still. |
| ref2va + turbo LoRA v1.1 — “Turbo v2” workflow | Fast iteration with improved motion compared with v1.0. | Similar speed and appearance to v1.0. In the author’s tests it removed v1.0 judder, although motion at the loop point could be slightly faster. |
| FastH3-Omni | Fast drafts, particularly with reference images or slow flowing movement. | Close to the 25-step appearance with a reference image, but somewhat punchier. Text-only prompts can produce a different shot. Fast movement may show slight judder. |
| ref2va + Fun ControlNet | Restyling existing loops and preserving planned geometry or camera motion. | Geometry and timing come from your control video. Use views: 1. |
A practical starting point: use Turbo v2 or FastH3 for drafts, then the 25-step workflow for finals involving fast motion.
Model files used by the examples
The example workflows include download links so ComfyUI can offer to download missing models. Folder names below identify the corresponding locations under ComfyUI’s models directory.
| Model file | Model folder | Purpose |
| --- | --- | --- |
| minimax_h3_ref2va_pruned_int8_convrot.safetensors | diffusion_models | Base model for Loop, Turbo, Turbo v2, and Control. |
| fasth3_omniref_8step_pruned_int8_convrot.safetensors | diffusion_models | FastH3’s 8-step model. |
| minimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors | loras | Turbo v1.0 and Control acceleration. |
| minimax_h3_ref2v_turbo_8step_v1.1_768p_comfyui_bf16.safetensors | loras | Turbo v2 workflow acceleration. |
| qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors | text_encoders | Text encoder used by all examples. |
| minimax_h3_video_vae_fp16.safetensors | vae | Converts generated video latents into frames. |
| minimax_h3_audio_vae_fp32.safetensors | vae | Converts generated audio latents into audio. |
| minimax_h3_fun_controlnet_union_pruned_int8_convrot.safetensors | model_patches | Adds control-video guidance. |
Other precision variants, including bf16 and fp8, are available in the linked MiniMax H3, FastH3-Omni, and MiniMax H3 Turbo repositories.
FILM and RIFE interpolation checkpoints download automatically through ComfyUI-Frame-Interpolation.
ComfyUI-MiniMaxH3-Loop Restyling an Existing Loop
Use the Control example workflow when your motion is already designed and you want H3 to reinterpret its appearance.
1. Load your seamless source
Point the workflow’s Load Video node at your own loop. The example uses the path-loading functionality from ComfyUI-VideoHelperSuite.
The source should already loop cleanly. ControlNet uses its geometry and timing as guidance.
2. Keep the model nodes in the correct order
text Model → MiniMax H3 Loop → Apply MiniMax H3 Fun ControlNet → Guider / Scheduler
MiniMax H3 Loop must come before Fun ControlNet. Reversing that order raises an error.
Set the Loop node to views: 1.
3. Prepare the control video
text Load Video → MiniMax H3 Loop Control Video → Apply MiniMax H3 Fun ControlNet: control_video
In MiniMax H3 Loop Control Video:
- Match
lengthto the rest of the workflow. - Match
pad_clipsto the rest of the workflow. - Enter the control clip’s frame rate as
fps.
4. Choose how the source repeats
cycles: 0 automatically chooses a repeat count that keeps the control loop close to its original speed. The video is resampled to fit, which can blend neighboring frames.
For an exact fit without that blending, prepare a 24 fps control loop satisfying:
text cycles × frames per source cycle = final loop frames
Examples:
| Source cycle | Workflow length | Final loop frames | Repetitions |
| --- | --- | --- | --- |
| 34 frames | 107 | 102 | 3 |
| 34 frames | 209 | 204 | 6 |
| 68 frames | 209 | 204 | 3 |
For these exact fits, cycles: 0 selects the matching count automatically.
5. Describe structure before style
Prompt the geometry and movement visible in the control first, then describe the desired appearance. This keeps your text guidance aligned with the motion you are supplying.
What's New with ComfyUI-MiniMaxH3-Loop
The provided documentation describes the following changes and comparisons, but does not provide a dated, version-by-version extension changelog.
- Two-view audio handling: the documented default uses a second, half-rotated view to keep audio cleaner around the loop boundary. Visual frames remain sourced from the first view to avoid conflicting motion.
- Earlier per-step latent rotation removed: an earlier approach shifted the loop differently on every step. It kept audio clean but caused one-frame visual hitches, so it was removed.
- Fresh noise for wrapped context: padding uses fresh noise instead of duplicating the loop’s noise. Repeated noise caused distilled models such as FastH3 to produce white specks, especially near the join.
- Turbo v2 workflow: uses turbo LoRA v1.1, compared with v1.0 in the original Turbo workflow. The author reported similar speed with improved fast-motion behavior, though the join can still move slightly faster.
- FastH3-Omni workflow: offers an 8-step alternative for faster iteration. It requires ComfyUI v0.42.0 or newer because of how its per-step output heads are stored.
Troubleshooting ComfyUI-MiniMaxH3-Loop
The video visibly jumps when it repeats
- Check whether the action can naturally continue forever.
- Remove timelines, one-off events, and accumulating changes.
- Use a locked-off camera and steady lighting.
- If you pinned a first or last frame, try reference-image guidance instead.
- Test several seeds.
- For precise geometry or camera travel, use a seamless control video. A pop near the boundary is not always caused by the loop mechanism. The author found that many apparent seam problems also appeared in ordinary renders using the same seed.
Fast motion looks jerky
- Check whether you are using turbo LoRA v1.0 or FastH3.
- Try the Turbo v2 workflow.
- For the smoothest fast-motion result, try 25 steps without a turbo LoRA.
- Use Loop Interpolate for additional frames rather than merely increasing the export frame rate.
Audio becomes loud or garbled at the join
- Check the Loop node’s
viewssetting. - For non-ControlNet workflows, use the default
views: 2. - Confirm that the workflow uses MiniMax H3 Loop Decode.
- Choose one of the listed lengths that keeps the audio loop exact.
With one view, the author observed loud, garbled audio around the boundary. Two-view sampling addresses this. Fun ControlNet workflows require
views: 1, so do not apply the two-view recommendation to them.
FastH3 reports a tensor-size error
The documented error is:
text size of tensor a (24) must match the size of tensor b (768)
Check your ComfyUI version. FastH3-Omni requires v0.42.0 or newer.
The Control workflow raises an error
- Confirm that MiniMax H3 Loop comes before Apply MiniMax H3 Fun ControlNet.
- Set
viewsto1. - Match
lengthandpad_clipsacross the loop and control-video preparation nodes. - Confirm that the control-video
fpsmatches the clip being supplied.
The control video blends frames or changes speed
- Check the source frame rate.
- Remember that
cycles: 0chooses a near-original-speed fit, not necessarily a frame-exact one. - For no blending, use a 24 fps source whose cycle length divides
length − 5exactly. - Use the 34-frame or 68-frame examples above as a guide.
The video plays faster after increasing fps
- Restore 24 fps for non-interpolated H3 output.
- Add Loop Interpolate if you want smoother motion.
- Send its output frame rate to Create Video.
Long clips exceed the model’s supported length
- Check both
lengthandpad_clips. - With
pad_clips: 1, account for 34 added context frames. - Keep the padded context within H3’s 362-frame maximum. For example,
length: 311fits with this padding;362does not. Padding also takes time: the author measured about 34% additional sampling time atlength: 209withpad_clips: 1.
Interpolation runs out of memory
If the interpolation node exposes clear_cache_after_n_frames, reduce it. ComfyUI-Frame-Interpolation documents this as a way to reduce out-of-memory failures, at the cost of additional processing time.
Frequently asked questions
Do I need first and last images? No. They are not required for this loop method.
Can first-frame or Add Guide anchors work? Yes. With MiniMax H3 Image to Video and the fl2va model, anchors land on their loop frames, and a last-frame anchor wraps to the start. However, H3 may treat a pinned frame as the beginning of a shot, causing a jump into it or exposure drift. Reference-image guidance is the recommended image-based approach.
Will every prompt loop perfectly? No. Prompt structure, motion, fine texture, model choice, and seed all affect the result.
Why does the same seed look different with Turbo? The turbo LoRA changes the model’s behavior and appearance, so the same seed does not guarantee the same shot across configurations.
Should I use ping-pong playback instead? That is a different effect: it plays a clip forward and then backward. This extension is designed to generate motion that continues directly from the end into the start.
Learn More about ComfyUI-MiniMaxH3-Loop
- Full prompting guide — Start here for prompt structure, reference-image guidance, sound, repeating spaces, and practical examples.
- Example workflows — Ready-made starting points for standard generation, Turbo, Turbo v2, FastH3, and ControlNet restyling.
- ComfyUI-MiniMaxH3-Loop repository — Project files and documentation.
- ComfyUI-Frame-Interpolation — Documentation for FILM, RIFE, and interpolation-related settings.
- ComfyUI-VideoHelperSuite — Video loading, frame-selection controls, and animated previews. Advanced Previews can reflect load settings; use Open preview to inspect the original when the in-interface preview is lower quality.
- Comfy-Org/MiniMax-H3 — Base models and shared components.
- FastVideo/FastH3-Omni-Comfy — FastH3-Omni model files.
- lightx2v/Minimax-h3-Turbo — Turbo LoRA files and variants.
ComfyUI-MiniMaxH3-Loop License
ComfyUI-MiniMaxH3-Loop is licensed under GPL-3.0.
