Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-H3-Motion-Context > H3 Motion Context

ComfyUI Node: H3 Motion Context

Class Name

MiniMaxH3MotionContext

Category
conditioning/minimax
Author
NikoDemon80 (Account age: 174days)
Extension
ComfyUI-H3-Motion-Context
Latest Updated
2026-08-13
Github Stars
0.49K

How to Install ComfyUI-H3-Motion-Context

Install this extension via the ComfyUI Manager by searching for ComfyUI-H3-Motion-Context
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-H3-Motion-Context in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

H3 Motion Context Description

Enhances video clip continuity by seamlessly transitioning motion between clips for improved visual flow and narrative coherence.

H3 Motion Context:

The MiniMaxH3MotionContext node is designed to enhance the continuity and coherence of video clips by pinning the motion from the end of a previous clip to the beginning of a new one. This node is particularly useful in scenarios where seamless transitions between video segments are crucial, such as in animation or video editing. By integrating this node between a conditioning node and a sampler, it ensures that the motion context from the previous clip is preserved and smoothly transitioned into the next. This is achieved through two main modes: encode_mode and anchor_mode. The encode_mode allows for either frame-by-frame encoding or a more compressed video encoding, which affects how the motion is represented in the latent space. The anchor_mode determines how the pinned frames are positioned in the timeline, either at the start or before the main sequence, ensuring that no frames are wasted and the transition is as natural as possible. Overall, this node provides a sophisticated method for maintaining motion continuity across video clips, enhancing the visual flow and narrative coherence.

H3 Motion Context Input Parameters:

encode_mode

The encode_mode parameter determines how the video frames are encoded into the latent space. It has two options: frames and video. In frames mode, each frame is encoded individually, allowing the model to see each snapshot at distinct instants, which can be beneficial for detailed frame-by-frame analysis. In video mode, the entire sequence is encoded in one go, compressing the run into fewer latent steps, which is more efficient and captures the motion within the latent space itself. This mode is particularly useful for longer sequences where efficiency is a priority. The choice between these modes impacts the granularity and efficiency of the motion representation.

anchor_mode

The anchor_mode parameter specifies the positioning of the pinned frames in the timeline. It offers two options: head and before. In head mode, the pinned frames occupy the initial indices of the timeline, and they are included in the output, requiring trimming before concatenation. In before mode, the pinned frames are placed at negative indices, allowing the main sequence to continue seamlessly from them without any wastage. This mode is useful for ensuring that the pinned frames do not interfere with the main sequence, especially when precise timing is crucial.

H3 Motion Context Output Parameters:

tail

The tail output represents the portion of the audio latent that is pinned from the previous clip. It is crucial for maintaining audio continuity across clips, ensuring that the transition is smooth and coherent. This output is particularly important in scenarios where audio plays a significant role in the narrative or emotional impact of the video.

rt

The rt output indicates the number of audio steps that have been pinned from the previous clip. This value is essential for understanding the extent of the audio context that has been preserved, allowing for precise control over the audio transition between clips.

overhang

The overhang output provides information about any excess audio steps that do not align perfectly with the video frames. This value is important for diagnosing potential issues with audio-video synchronization and ensuring that the transition is as seamless as possible.

H3 Motion Context Usage Tips:

  • Use encode_mode set to video for longer sequences to improve efficiency and capture motion within the latent space.
  • Opt for anchor_mode set to before when you want to ensure that the pinned frames do not interfere with the main sequence, especially in tightly timed sequences.

H3 Motion Context Common Errors and Solutions:

ValueError: h3_motion_context: expected audio latent [B,C,2,T], got shape %s

  • Explanation: This error occurs when the audio latent input does not match the expected shape, indicating a mismatch in the dimensions.
  • Solution: Ensure that the audio latent input is correctly formatted as a 4-dimensional tensor with the shape [B,C,2,T].

ValueError: h3_motion_context: audio window is empty

  • Explanation: This error indicates that the calculated audio window is empty, meaning there are no audio steps to pin.
  • Solution: Check the audio input and ensure that it contains sufficient data to cover the required audio window. Adjust the parameters if necessary to ensure a valid audio window.

H3 Motion Context Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-H3-Motion-Context
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

H3 Motion Context