Nodes/ComfyUI-MiniMaxH3-Myang/沐阳 H3 · 分段素材替换
ComfyUI Node

沐阳 H3 · 分段素材替换

Swap the reference video per segment without breaking your mentions

By civilcoco·Created 3 days ago·Updated 3 days ago· 1
沐阳 H3 · 分段素材替换
  • media
  • clip
  • media
video_ordinal1

Here's the problem this node solves, stated plainly: in a multi-segment motion-transfer job, each segment needs its own slice of the reference video - segment 3 should follow the part of the action that corresponds to segment 3 - but your prompt says @视频1, and your Media Agent bundle has exactly one video. If you naively swapped the video each iteration, @视频1 would stop meaning "the video" and start meaning "the video, except every segment it's a different chunk."

沐阳 H3 · 分段素材替换 (H3MediaSwapClip) is the fix. It takes the Agent's media bundle and one segment's clip slice, and replaces the Nth video in place - keeping every other asset and, crucially, keeping the numbering. @视频1 still points at the same slot, it just now holds this segment's piece of the action. Your prompt stays valid across the whole chain, which is exactly what you want when prompts are being assembled per-segment by a splitter.

Inputs

  • media - the MINIMAX_H3_MEDIA bundle from the Media Agent. It checks the type, so if you've wired something else in it'll tell you rather than silently misbehaving.
  • clip - this segment's reference-video slice (in practice, from a slicing node like H3ReferenceClip).
  • video_ordinal - which video slot to replace; 1 is the default, i.e. @视频1.

Output: the updated media bundle, same type, same numbering.

There's a thoughtful edge case in the implementation: if your bundle has no videos at all (you wired only stills to the Agent), the node appends the clip as the highest-numbered video instead of failing. That way the loop still works - the prompt's @视频1 refers to it, and the long-video chain doesn't quietly break on the first segment.

Install and context

Standard pack install: ComfyUI Manager search "ComfyUI-MiniMaxH3-Myang", or git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang into custom_nodes, restart. No extra Python dependencies.

You'll rarely place this node by hand in a fresh graph - it's the kind of thing the Director and the long-video expander do internally when they slice references per segment. Where you will meet it is debugging: if you're building a custom loop and the prompt references start pointing at the wrong media, this is the node that makes the numbering contract explicit. Keep the ordinal matched to the mention in your prompt, and remember the pack's broader reminder - H3's local weights sit under a territory-restricted community license (US/EU/UK/South Korea excluded), so check the terms before you build a long project on them.

Category沐阳 H3

Inputs (3)

NameTypeDefaultDescription
mediaMINIMAX_H3_MEDIA
clipIMAGE本段的参考视频切片
video_ordinalINT11–3换掉第几个视频素材(@视频N 的 N)

Outputs (1)

NameTypeDescription
mediaMINIMAX_H3_MEDIA