HuMo 影片產生
基於音訊、圖像和文字產生影片,保持角色嘴唇同步。
下載工作流程在 Cloud 中試用 API 文件
關於
HuMo 影片生成工作流程,專為製作角色嘴型與音訊同步的高品質影片設計。流程運用 HuMo 模型,針對人像影片生成最佳化。整合多種輸入(文字、圖片、音訊),讓影片輸出更豐富且可自訂。流程核心包含 CLIPTextEncode 處理文字、LoadImage 載入參考圖、AudioEncoderEncode 處理音訊,並結合 CreateVideo 與 SaveVideo 產生最終影片。WanHuMoImageToVideo 節點是關鍵,能將靜態圖與動態影片連結,確保角色嘴型與音訊精準對齊。此流程適合需精確嘴型同步與視覺自訂的影片創作。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# 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({
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "A young boy in sci-fi style clothing is talking to the camera in an alien desert."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "humo_17B_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"48": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"61",
0
],
"shift": 8
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"49": {
"class_type": "LoadImage",
"inputs": {
"image": "video_humo_reference_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"56": {
"class_type": "AudioEncoderEncode",
"inputs": {
"audio": [
"58",
0
],
"audio_encoder": [
"57",
0
]
},
"_meta": {
"title": "AudioEncoderEncode"
}
},
"57": {
"class_type": "AudioEncoderLoader",
"inputs": {
"audio_encoder_name": "whisper_large_v3_fp16.safetensors"
},
"_meta": {
"title": "Load Audio Encoder"
}
},
"58": {
"class_type": "LoadAudio",
"inputs": {
"audio": "video_humo_input_audio.wav"
},
"_meta": {
"title": "Load Audio"
}
},
"59": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"60",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"60": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"58",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 25,
"images": [
"63",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"61": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors",
"model": [
"37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"63": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"64",
0
],
"vae": [
"39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"64": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"65",
2
],
"model": [
"48",
0
],
"negative": [
"65",
1
],
"positive": [
"65",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 1067760026265042,
"steps": 6
},
"_meta": {
"title": "KSampler"
}
},
"65": {
"class_type": "WanHuMoImageToVideo",
"inputs": {
"audio_encoder_output": [
"56",
0
],
"batch_size": 1,
"height": 640,
"length": 97,
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"ref_image": [
"49",
0
],
"vae": [
"39",
0
],
"width": 640
},
"_meta": {
"title": "WanHuMoImageToVideo"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
可以,用 LoadAudio 上傳音檔,或用 RecordAudio 直接錄製。
支援 480P(832x480)與 720P(1280x720)輸出。
流程用 WanHuMoImageToVideo 節點自動對齊嘴型與音訊,確保同步。
可用文字提示、參考圖片與音訊自訂影片內容與風格。