Wan2.2-S2V 오디오 구동 비디오 생성
정적인 이미지와 오디오를 완벽한 동기화와 분 단위 생성으로 동적 비디오로 변환합니다.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
코드에서 이 모델 호출하기
아래 요청은 Playground와 동일하게 준비된 그래프와 설정을 사용합니다. 제출할 때마다 유료 실행이 시작될 수 있으므로 결과를 알 수 없는 제출을 자동으로 재시도하지 마세요.
What you need
- Runs on
- Comfy Cloud
- 키
- COMFY_API_KEY
- 내 파일
- 코드가 해당 URL에서 업로드
유료 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({
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"105",
0
],
"denoise": 1,
"latent_image": [
"93",
2
],
"model": [
"54",
0
],
"negative": [
"93",
1
],
"positive": [
"93",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 20,
"steps": [
"103",
0
]
},
"_meta": {
"title": "KSampler"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "A woman in a dark charcoal high-collar jacket sits in a softly lit broadcast studio and speaks warmly into the black condenser microphone in front of her, like a late-night radio host greeting her listeners. She talks naturally and calmly, her lips moving clearly with every word, with small nods, gentle eyebrow raises and a faint smile on the friendly lines. Her head tilts slightly as she leans a little closer to the microphone, then settles back. Her eyes stay on the camera, blinking naturally. Her hands rest out of frame below the microphone, and nothing passes in front of her face. The camera is locked off at chest height in a single continuous shot. Behind her, cyan and amber edge lights glow on the concrete and the hexagonal acoustic panels, and small indicator lights blink on the equipment racks."
},
"_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": "wan2.2_s2v_14B_fp8_scaled.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"
}
},
"52": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"54": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"107",
0
],
"shift": 8
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"56": {
"class_type": "AudioEncoderEncode",
"inputs": {
"audio": [
"58",
0
],
"audio_encoder": [
"57",
0
]
},
"_meta": {
"title": "AudioEncoderEncode"
}
},
"57": {
"class_type": "AudioEncoderLoader",
"inputs": {
"audio_encoder_name": "wav2vec2_large_english_fp16.safetensors"
},
"_meta": {
"title": "Load Audio Encoder"
}
},
"58": {
"class_type": "LoadAudio",
"inputs": {
"audio": "UPLOADED_audio_FILENAME"
},
"_meta": {
"title": "Load Audio"
}
},
"80": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"95",
0
],
"vae": [
"39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"82": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"58",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 16,
"images": [
"96",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"93": {
"class_type": "WanSoundImageToVideo",
"inputs": {
"audio_encoder_output": [
"56",
0
],
"batch_size": 1,
"height": 480,
"length": [
"104",
0
],
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"ref_image": [
"52",
0
],
"vae": [
"39",
0
],
"width": 832
},
"_meta": {
"title": "WanSoundImageToVideo"
}
},
"94": {
"class_type": "LatentCut",
"inputs": {
"amount": 1,
"dim": "t",
"index": 0,
"samples": [
"85:78",
0
]
},
"_meta": {
"title": "LatentCut"
}
},
"95": {
"class_type": "LatentConcat",
"inputs": {
"dim": "t",
"samples1": [
"94",
0
],
"samples2": [
"85:78",
0
]
},
"_meta": {
"title": "LatentConcat"
}
},
"96": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"100",
0
],
"image": [
"80",
0
],
"length": 4096
},
"_meta": {
"title": "Get Image from Batch"
}
},
"100": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 3
},
"_meta": {
"title": "Batch sizes"
}
},
"103": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 4
},
"_meta": {
"title": "Steps"
}
},
"104": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 77
},
"_meta": {
"title": "Chunk Length"
}
},
"105": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 1
},
"_meta": {
"title": "CFG"
}
},
"107": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors",
"model": [
"37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"113": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"82",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"79:76": {
"class_type": "WanSoundImageToVideoExtend",
"inputs": {
"audio_encoder_output": [
"56",
0
],
"length": [
"104",
0
],
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"ref_image": [
"52",
0
],
"vae": [
"39",
0
],
"video_latent": [
"3",
0
]
},
"_meta": {
"title": "WanSoundImageToVideoExtend"
}
},
"79:77": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"105",
0
],
"denoise": 1,
"latent_image": [
"79:76",
2
],
"model": [
"54",
0
],
"negative": [
"79:76",
1
],
"positive": [
"79:76",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 1,
"steps": [
"103",
0
]
},
"_meta": {
"title": "KSampler"
}
},
"79:78": {
"class_type": "LatentConcat",
"inputs": {
"dim": "t",
"samples1": [
"3",
0
],
"samples2": [
"79:77",
0
]
},
"_meta": {
"title": "LatentConcat"
}
},
"85:76": {
"class_type": "WanSoundImageToVideoExtend",
"inputs": {
"audio_encoder_output": [
"56",
0
],
"length": [
"104",
0
],
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"ref_image": [
"52",
0
],
"vae": [
"39",
0
],
"video_latent": [
"79:78",
0
]
},
"_meta": {
"title": "WanSoundImageToVideoExtend"
}
},
"85:77": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"105",
0
],
"denoise": 1,
"latent_image": [
"85:76",
2
],
"model": [
"54",
0
],
"negative": [
"85:76",
1
],
"positive": [
"85:76",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 250,
"steps": [
"103",
0
]
},
"_meta": {
"title": "KSampler"
}
},
"85:78": {
"class_type": "LatentConcat",
"inputs": {
"dim": "t",
"samples1": [
"79:78",
0
],
"samples2": [
"85:77",
0
]
},
"_meta": {
"title": "LatentConcat"
}
}
})
workflow.set_input("58", "audio", client.assets.from_url("https://comfy.org/catalog-media/3bb9ee36-53c7-459b-8344-8c127597fd3c/1b849bac-2e14-43ef-8edd-ea2859d20a09"))
workflow.set_input("52", "image", client.assets.from_url("https://comfy.org/catalog-media/6e2796d5-1dfd-42f2-b918-b7157f9c5067/2d1cb5de-3ee8-4dfc-97c5-bc7d189528cd"))
# 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("113"):
output.to_file(output.name)예시 사용해 보기
이 워크플로 정보
이 ComfyUI 워크플로는 단일 레퍼런스 이미지와 오디오 트랙을 Wan 2.2 S2V(sound-to-video) 모델로 동기화된 비디오로 변환합니다. UNETLoader, CLIPLoader, VAELoader로 Wan 백본을 로드하고 ModelSamplingSD3로 올바른 스케줄을 설정합니다. 텍스트 프롬프트는 CLIPTextEncode로 인코딩되고, 오디오는 AudioEncoderLoader 및 AudioEncoderEncode로 처리됩니다. 이 신호들과 LoadImage의 이미지가 함께 WanSoundImageToVideo를 구동하여 오디오의 리듬과 프레이징을 따르는 모션을 합성합니다. KSampler는 스텝, CFG, 시드를 제어하며, VAEDecode는 잠재 데이터를 프레임으로 변환하고 CreateVideo가 최종 클립을 조립합니다.
프로덕션에서 실용적인 두 가지 엔지니어링 요소가 포함되어 있습니다. 첫째는 첫 프레임 안정화, 둘째는 길이 확장입니다. Fix overbaked first frame 그룹은 LatentCut과 LatentConcat으로 초기 잠재 프레임을 디코딩 전에 복제한 다음, 디코딩된 첫 프레임을 버려 0프레임에서 흔히 나타나는 VAE의 "오버베이크" 현상을 피합니다. 긴 클립의 경우 Video S2V Extend 서브그래프를 사용해 LatentCut/LatentConcat으로 세그먼트를 기본 77프레임 단위로 체인 연결할 수 있어 VRAM을 과도하게 사용하지 않고 분 단위 비디오를 만들 수 있습니다. 또한 라이트닝 경로도 지원합니다. Wan 2.2 lightning LoRA를 사용하면 4 스텝(권장 CFG ~1.0)으로 샘플링할 수 있습니다. 품질과 안정성을 우선한다면 표준 경로에서 ~20 스텝(CFG ~6.0)을 사용하세요.
질문과 답변
Video S2V Extend 서브그래프를 사용하세요. 각 서브그래프는 LatentCut과 LatentConcat으로 잠재 데이터를 슬라이스/추가하여 새 청크(기본 77프레임)를 더합니다. 필요한 추가 세그먼트 수만큼 서브그래프를 복제하세요. 청크 간 전환을 부드럽게 하려면 시드, 해상도, FPS, 샘플러 설정을 일관되게 유지하세요.
일부 VAE는 디코딩된 첫 프레임을 과하게 구워(overbake) 보이게 만들 수 있습니다. Fix overbaked first frame 그룹은 디코딩 전에 첫 잠재를 복제하고, 디코딩 후 첫 프레임을 버립니다. 이 문제를 피하려면 활성화 상태로 두고, VAE에서 아티팩트가 나타나지 않을 때만 비활성화하세요.
lightning LoRA는 훨씬 빠르며(약 4 스텝, CFG ≈ 1.0) 디테일이나 안정성이 감소할 수 있습니다. 표준 경로(≈20 스텝, CFG ≈ 6.0)는 더 느리지만 보통 더 깔끔합니다. 품질 저하나 LoRA 키 불일치가 보이면 20-스텝 워크플로로 전환하세요. 확정 전에 짧은 클립으로 두 경로를 A/B 테스트할 수도 있습니다.
일반적으로 CreateVideo는 무음 MP4를 출력하며 오디오를 mux 하지 않습니다. 오디오는 AudioEncoderEncode를 통해 모션 조건화에 사용되지만 내장되지는 않습니다. 결합하려면 후처리에서 오디오를 mux 하세요(예: ffmpeg: ffmpeg -i video.mp4 -i audio.wav -c copy -shortest out.mp4).
관련 워크플로
- Wan2.2
1.2 스타터 – 이미지에서 비디오로
- Qwen-Image-Edit, Wan2.2
1개 이미지 입력 분할 스택 - Qwen 멀티앵글 + Wan 2.2
- Wan2.2, Z-Image-Turbo
AIrt MAchIne
- Wan2.2, Wan
Wan 2.2 14B Fun 인페인팅
- Wan2.2, Wan
Wan 2.2 14B Fun 제어
- Wan2.2, Wan
Wan 2.2 14B Fun 카메라 제어
- Wan, Wan2.2
Wan 2.2 14B 이미지 기반 비디오 생성
- Wan2.2, Wan
Wan 2.2 14B 첫 번째-마지막 프레임 비디오
- Wan2.2, Wan
Wan 2.2 14B 텍스트 기반 비디오 생성
- Wan2.2, Wan
Wan 2.2 5B Fun 인페인트
- Wan2.2, Wan
Wan 2.2 5B Fun 제어
- Wan2.2, Wan
Wan 2.2 5B 비디오 생성