Nodes/ComfyUI-MiniMaxH3-Myang/沐阳 H3 条件(提示词 + 素材)
ComfyUI Node

沐阳 H3 条件(提示词 + 素材)

Prompt + media in, real H3 conditioning and a latent out

By civilcoco·Created 3 days ago·Updated 3 days ago· 1
沐阳 H3 条件(提示词 + 素材)
  • h3
  • media
  • ref_video
  • ref_audio
  • first_frame
  • last_frame
  • positive
  • latent
  • frames
  • fps
prompt
resolution480P
aspect_ratio16:9
width864
height480
seconds5.0
ref_image_size匹配生成分辨率
reference_mention_mode按编号(@图片1)

If 沐阳 H3 加载器 is the entry point, 沐阳 H3 条件(提示词 + 素材) (H3Condition) is the engine. This is the node that turns "a prompt, some reference images, maybe a reference video" into the two things your sampler actually needs: the official H3 conditioning and an empty latent to denoise. It's also the node every more-automated Myang node builds on - the Director and the long-video expander both delegate their per-segment conditioning to this same code path, so learning it here teaches you what they're doing under the hood.

Mechanically it calls ComfyUI's own MiniMaxH3ReferenceToVideo (or MiniMaxH3ImageToVideo when you feed first/last frames), which is why the pack needs no third-party H3 node pack. What Myang adds is the bookkeeping around it: resolution presets, seconds-to-frames math on H3's 17k+5 frame grid, an area-based budget for reference images, and the translation of editor-style mentions like @图片1 into H3's official <Picture 1> tags.

The inputs that actually matter

  • prompt - your prompt, and where the @图片1 / @视频1 / @音频1 mentions go.
  • resolution / aspect_ratio / width / height - the generation canvas. 480P and 16:9 are the defaults; there are presets from 360P up, and you can drop to custom width/height.
  • seconds - duration. The node snaps it to the H3 frame grid and reports the real frame count on the frames output.
  • ref_image_size - the reference-image area budget. This is the one people underestimate. It's area-based, not short-edge-based: a 21:9 still at the same short edge as a 1:1 costs more than double, and reference tokens get paid every single step. "匹配生成分辨率" is the memory-cheap default.
  • reference_mention_mode - @图片1 by index, or by filename.
  • media - the MINIMAX_H3_MEDIA bundle from the Media Agent. Images, videos and audio are numbered in bundle order, which is what the @图片1 mentions map to.
  • ref_video / ref_audio - a per-segment reference slice (this is how the long-video loop feeds each segment's own clip of the action video). A connected ref_video always lands as @视频1, ahead of the media bundle.
  • first_frame / last_frame - connect either and you switch to the official fl2va first/last-frame path, which takes the keyframes and the prompt and no references at all.

Outputs: positive (CONDITIONING) and latent (LATENT) go to the sampler; frames (INT) and fps (FLOAT, always 24) tell you what you actually got, which is handy when you're verifying a duration snap.

Install and gotchas

Install the pack via 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 need the H3 diffusion model, Qwen text encoder, and video + audio VAEs in their usual model folders.

The classic mistakes: mentioning @视频2 when your bundle only has one video (the node validates that), feeding a reference still way above the generation resolution and watching VRAM climb (that's the ref_image_size lever), and expecting first/last-frame mode to also take references - it doesn't, by design. And the standing H3 caveat: the weights' community license excludes the US, EU, UK and South Korea, so check terms before you download or publish.

Category沐阳 H3

Inputs (14)

NameTypeDefaultDescription
h3MYANG_H3
promptSTRING
resolutionCOMBO480P12 options: 360P, 416P, 480P, 540P, 640P, 720P, +6
aspect_ratioCOMBO16:98 options: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, +2
widthINT86432–16384
heightINT48032–16384
secondsFLOAT5.00.2–30
ref_image_sizeCOMBO匹配生成分辨率参考图的面积预算。按面积而不是短边:同样短边下 21:9 的图比 1:1 贵一倍多,而参考 token 每一步都要算
reference_mention_modeCOMBO按编号(@图片1)2 options: 按编号(@图片1), 按文件名(@角色.png)
mediaoptMINIMAX_H3_MEDIA素材包。图片、视频、音频按包里的顺序编号,和提示词里的 @图片1 / @视频1 对应
ref_videooptIMAGE循环内部切出的分段参考视频。它排在素材包前面,所以永远是 @视频1
ref_audiooptAUDIO与分段参考视频同步切出的音频;它排在素材包音频前面
first_frameoptIMAGE接上就走首尾帧模式(官方 fl2va 通路)
last_frameoptIMAGE

Outputs (4)

NameTypeDescription
positiveCONDITIONING
latentLATENT
framesINT
fpsFLOAT