InfiniteTalk:音訊驅動的全身影片配音
上傳源圖像和目標音訊。產生全身配音訊與影片,同步動作,同時保留原始身份、背景和攝像機運動。
關於
InfiniteTalk:語音驅動全身影片配音,將單張圖片和一段或多段音訊轉換為唇形同步的全身影片,同時保留原始人物、背景和鏡頭運動。流程核心為 WanInfiniteTalkToVideo,將載入的 Wan2.1 I2V 模型特徵與音訊嵌入融合,驅動身體與臉部動作。Step1 - 載入模型會準備 UNet 和 VAE(UNETLoader、VAELoader)用於圖像轉影片合成,並載入文字與音訊骨幹(CLIPLoader 搭配 CLIPTextEncode 處理鏡頭/場景提示,AudioEncoderLoader 搭配 AudioEncoderEncode 處理語音特徵)。你可透過 LoadImage 匯入起始畫格,然後在 MaskEditor 針對每位角色繪製遮罩,將動作區域限定於各說話者。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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({
"13": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "Wan2_1-I2V-14B-480p_fp8_e4m3fn_scaled_KJ.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"14": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"16",
0
],
"text": "The camera zooms in. Two characters are talking."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"16": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"17": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"14",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"24": {
"class_type": "LoadAudio",
"inputs": {
"audio": "audio_speaker1_woman.mp3"
},
"_meta": {
"title": "Load Audio"
}
},
"25": {
"class_type": "AudioEncoderEncode",
"inputs": {
"audio": [
"24",
0
],
"audio_encoder": [
"26",
0
]
},
"_meta": {
"title": "AudioEncoderEncode"
}
},
"26": {
"class_type": "AudioEncoderLoader",
"inputs": {
"audio_encoder_name": "wav2vec2-chinese-base_fp16.safetensors"
},
"_meta": {
"title": "Load Audio Encoder"
}
},
"29": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "Wan2_1_VAE_bf16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"32": {
"class_type": "LoadImage",
"inputs": {
"image": "two_character_talking.png"
},
"_meta": {
"title": "Load Image"
}
},
"33": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors",
"model": [
"13",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"90": {
"class_type": "LoadAudio",
"inputs": {
"audio": "audio_speaker2_man.mp3"
},
"_meta": {
"title": "Load Audio"
}
},
"93": {
"class_type": "AudioEncoderEncode",
"inputs": {
"audio": [
"90",
0
],
"audio_encoder": [
"26",
0
]
},
"_meta": {
"title": "AudioEncoderEncode"
}
},
"112": {
"class_type": "ModelPatchLoader",
"inputs": {
"name": "wan2.1_infiniteTalk_multi_fp16.safetensors"
},
"_meta": {
"title": "Load Model Patch"
}
},
"113": {
"class_type": "AudioConcat",
"inputs": {
"audio1": [
"24",
0
],
"audio2": [
"90",
0
],
"direction": "after"
},
"_meta": {
"title": "Concatenate Audio"
}
},
"119": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"145:120",
0
],
"vae": [
"29",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"124": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"146:171",
0
],
"vae": [
"29",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"126": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"130",
4
],
"image": [
"124",
0
],
"length": 4096
},
"_meta": {
"title": "Get Image from Batch"
}
},
"127": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"119",
0
],
"image2": [
"126",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"129": {
"class_type": "WanInfiniteTalkToVideo",
"inputs": {
"audio_encoder_output_1": [
"25",
0
],
"audio_scale": 1,
"height": [
"150",
0
],
"length": 81,
"mode": "two_speakers",
"mode.audio_encoder_output_2": [
"93",
0
],
"mode.mask_1": [
"32",
1
],
"mode.mask_2": [
"137",
1
],
"model": [
"33",
0
],
"model_patch": [
"112",
0
],
"motion_frame_count": 9,
"negative": [
"17",
0
],
"positive": [
"14",
0
],
"start_image": [
"32",
0
],
"vae": [
"29",
0
],
"width": [
"149",
0
]
},
"_meta": {
"title": "WanInfiniteTalkToVideo"
}
},
"130": {
"class_type": "WanInfiniteTalkToVideo",
"inputs": {
"audio_encoder_output_1": [
"25",
0
],
"audio_scale": 1,
"height": [
"150",
0
],
"length": 81,
"mode": "two_speakers",
"mode.audio_encoder_output_2": [
"93",
0
],
"mode.mask_1": [
"32",
1
],
"mode.mask_2": [
"137",
1
],
"model": [
"33",
0
],
"model_patch": [
"112",
0
],
"motion_frame_count": 9,
"negative": [
"17",
0
],
"positive": [
"14",
0
],
"previous_frames": [
"119",
0
],
"start_image": [
"32",
0
],
"vae": [
"29",
0
],
"width": [
"149",
0
]
},
"_meta": {
"title": "WanInfiniteTalkToVideo"
}
},
"137": {
"class_type": "LoadImage",
"inputs": {
"image": "two_character_talking.png"
},
"_meta": {
"title": "Load Image"
}
},
"138": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"113",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 25,
"images": [
"119",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"140": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"113",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 25,
"images": [
"127",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"141": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"140",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"149": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 832
},
"_meta": {
"title": "Width"
}
},
"150": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 480
},
"_meta": {
"title": "Height"
}
},
"162": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"138",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"145:106": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 264423375967408
},
"_meta": {
"title": "RandomNoise"
}
},
"145:107": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"129",
0
],
"negative": [
"129",
2
],
"positive": [
"129",
1
]
},
"_meta": {
"title": "CFG Guider"
}
},
"145:108": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"145:120": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"145:107",
0
],
"latent_image": [
"129",
3
],
"noise": [
"145:106",
0
],
"sampler": [
"145:108",
0
],
"sigmas": [
"145:19",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"145:19": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"129",
0
],
"scheduler": "normal",
"steps": 4
},
"_meta": {
"title": "BasicScheduler"
}
},
"146:167": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"146:168": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"130",
0
],
"negative": [
"130",
2
],
"positive": [
"130",
1
]
},
"_meta": {
"title": "CFG Guider"
}
},
"146:169": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"130",
0
],
"scheduler": "normal",
"steps": 4
},
"_meta": {
"title": "BasicScheduler"
}
},
"146:170": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 967091162875519
},
"_meta": {
"title": "RandomNoise"
}
},
"146:171": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"146:168",
0
],
"latent_image": [
"130",
3
],
"noise": [
"146:170",
0
],
"sampler": [
"146:167",
0
],
"sigmas": [
"146:169",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
至少需:UNETLoader 搭配 Wan2.1 I2V 14B 480p 權重、VAELoader、CLIPLoader + CLIPTextEncode(鏡頭/場景提示)、AudioEncoderLoader + AudioEncoderEncode(語音特徵)、LoadImage(起始畫格)、WanInfiniteTalkToVideo(驅動動作)、VAEDecode(取得畫格)、CreateVideo/SaveVideo(匯出影片)。如需風格或 InfiniteTalk 修補,可選用 LoraLoaderModelOnly 與 ModelPatchLoader。
使用 Video Extend 群組。每份可增加 81 格(25 fps 約 3.24 秒)。計算 ceil(audio_seconds / 3.24),複製該群組相同次數(方塊選取,Ctrl‑C,再 Ctrl‑Shift‑V)。如有多段音訊,先用 AudioConcat 組合,確定總時長。
過強的文字或風格條件會讓畫面偏離來源。請用 ConditioningZeroOut 降低 CLIP 影響,避免重度風格 LoRA(或在 LoraLoaderModelOnly 降低權重),提示詞以描述鏡頭、場景為主。遮罩也要緊貼說話角色,避免動作外溢到背景。
建議每軌使用乾淨、單一說話者音訊。常見 WAV/MP3 可用 LoadAudio 載入,若失敗請轉為標準 WAV(如 16–48 kHz、單聲道)。唇形同步效果取決於清晰發音與低背景雜音。多說話者場景請分別用不同音檔與遮罩,並用 AudioConcat 排列。