MiniMax H3:文字轉影片
直接以文字提示生成帶原生立體聲音訊的影片,使用 MiniMax H3 全模態模型,單次運算即可合成語音、音效與音樂。輸出最高 2K 解析度、24fps,長度約 15 秒,無需檔案輸入,只需一組提示詞即可產生影片。適合快速概念視覺化、社群內容創作與音訊同步敘事。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"92": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/MiniMax_H3",
"format": "auto",
"format.codec": "auto",
"video": [
"140:130",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"115": {
"class_type": "ResolutionSelector",
"inputs": {
"aspect_ratio": "16:9 (Widescreen)",
"megapixels": 0.4,
"multiple": 32
},
"_meta": {
"title": "Resolution Selector"
}
},
"140:119": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "minimax_h3_video_vae_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"140:120": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "minimax_h3_audio_vae_fp32.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"140:121": {
"class_type": "VAEDecodeAudio",
"inputs": {
"samples": [
"140:125",
0
],
"vae": [
"140:120",
0
]
},
"_meta": {
"title": "VAE Decode Audio"
}
},
"140:122": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"140:125",
0
],
"vae": [
"140:119",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"140:123": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "res_multistep"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"140:124": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"140:135",
0
],
"scheduler": "simple",
"steps": [
"140:136",
0
]
},
"_meta": {
"title": "BasicScheduler"
}
},
"140:125": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"140:126",
0
],
"latent_image": [
"140:131",
1
],
"noise": [
"140:129",
0
],
"sampler": [
"140:123",
0
],
"sigmas": [
"140:124",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"140:126": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"140:131",
0
],
"model": [
"140:135",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"140:127": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"140:128": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
"device": "default",
"type": "minimax"
},
"_meta": {
"title": "Load CLIP"
}
},
"140:129": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 757358688076805
},
"_meta": {
"title": "RandomNoise"
}
},
"140:130": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"140:121",
0
],
"bit_depth": 8,
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"140:122",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"140:131": {
"class_type": "MiniMaxH3ImageToVideo",
"inputs": {
"clip": [
"140:128",
0
],
"height": [
"115",
1
],
"length": [
"140:132",
1
],
"prompt": "A low-angle high-speed tracking shot surges alongside a battered matte-olive trophy truck hurtling across a rain-drenched black volcanic gravel plain beneath bruised midday storm clouds. Behind the cracked windshield, an elderly East Asian woman with a stocky build and cropped silver hair fiercely works the steering wheel, wearing a heavy charcoal insulated flight suit. Huge all-terrain tires fling sheets of black water and volcanic silt as a relentless swarm of dark, darting surveillance drones dives in close pursuit through the torrential squall. The camera suddenly whip-pans from the vehicle’s churning wheels up toward the swooping drones piercing the gloom. Cold, diffused slate-gray light illuminates the deluge, punctuated by distant white lightning strikes. Sound of a deafening, throaty V8 engine snarling against the thunderous downpour, tires ripping through gravel, and high-pitched metallic drone turbine whines.",
"vae": [
"140:119",
0
],
"width": [
"115",
0
]
},
"_meta": {
"title": "MiniMax H3 Image to Video"
}
},
"140:132": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "max(5, round(a * 24)) + (5 - (max(5, round(a * 24)) % 17)) % 17",
"values.a": [
"140:133",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"140:133": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 5
},
"_meta": {
"title": "Float (duration)"
}
},
"140:134": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors",
"model": [
"140:127",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"140:135": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"140:127",
0
],
"on_true": [
"140:134",
0
],
"switch": [
"140:139",
0
]
},
"_meta": {
"title": "If/Else Switch (Model)"
}
},
"140:136": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"140:137",
0
],
"on_true": [
"140:138",
0
],
"switch": [
"140:139",
0
]
},
"_meta": {
"title": "If/Else Switch (Steps)"
}
},
"140:137": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 20
},
"_meta": {
"title": "Int"
}
},
"140:138": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 8
},
"_meta": {
"title": "Int"
}
},
"140:139": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Boolean (Enable Lightning LoRA)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("92"):
output.to_file(output.name)試試範例
關於此工作流程
這個 ComfyUI 教學工作流程使用 MiniMax H3(全模態模型)把單一文字提示詞直接轉成成品影片,並在一次流程中合成畫面、語音、音效與音樂,輸出含原生立體聲音訊的成品。無需管理任何檔案輸入——只要描述你想要的內容,節點圖就會回傳約 15 秒、24 fps、最高 2K 的影片,並將立體聲音訊直接內嵌在成品中。
在底層,MiniMax H3 子圖(節點 79dd8a95-ce9d-4c14-b264-2162e8bec5ce)負責生成與解碼。它使用 MiniMax H3 的影片與音訊 VAE(minimax_h3_video_vae_fp16.safetensors 與 minimax_h3_audio_vae_fp32.safetensors)從模型的 latent 重建畫面與立體聲音訊。ResolutionSelector 會把常用預設映射到有效尺寸(以 32 的倍數,例如 960×544、1152×640、1216×672),而 SaveVideo 會將影格與立體聲音訊串流封裝成單一 MP4。畫布上的 MarkdownNote 提供快速提示與範例提示詞。結果是一條精簡、僅提示詞的管線,適合快速概念可視化、社群貼文,以及需要音訊同步的敘事內容。
問答
在提示詞中加入明確的音訊指示。指定旁白風格(性別/音色/口音)、音樂類型與情緒(例如「lo‑fi、柔和鋼琴、不要鼓」),以及關鍵音效(「輕柔微風、遠處車流、極少腳步聲」)。將音訊提示放在對應的畫面段落附近,通常能提升對齊度。
此節點圖目標為約 15 秒、24 fps,並支援最高約 2K 解析度。使用 ResolutionSelector 選擇有效的 16:9 尺寸(以 32 的倍數,例如 608×352、736×416、864×480、960×544、1056×608、1152×640、1216×672、1280×736)。尺寸越大,生成與解碼時間越長。
此教學工作流程為僅提示詞輸入,輸出模型的原生立體聲音訊。若要改成自己的音軌,可擴充節點圖:停用或忽略生成的音訊串流,並在 SaveVideo 前把外部 WAV/MP3 封裝進去(或在剪輯軟體中後製替換音訊)。
需要。子圖會使用 MiniMax H3 的 VAE:minimax_h3_video_vae_fp16.safetensors 與 minimax_h3_audio_vae_fp32.safetensors。若 ComfyUI 第一次執行時回報缺檔,請從提供的連結下載並放入 models 目錄,讓節點能正確解碼影片與立體聲音訊。