Wan2.1 VACE 인페인팅
주변 콘텐츠를 보존하면서 비디오의 특정 영역을 편집합니다. 객체 제거나 교체에 탁월합니다.
정보
Wan2.1 VACE 인페인팅 워크플로는 주변 영역의 무결성을 유지하면서 비디오 콘텐츠의 특정 영역을 자연스럽게 편집하도록 설계되었습니다. 이는 비디오 시퀀스에서 오브젝트 제거 또는 교체 같은 작업에 특히 유용합니다. Wan2.1 모델을 활용하는 이 워크플로는 KSampler(샘플링), CLIPTextEncode(텍스트 인코딩), VAEDecode(비디오 프레임 디코딩) 등 노드 조합을 사용합니다. 워크플로는 모델과 비디오 파일 로드부터 마스크 생성, 최종 비디오 출력 합성까지 여러 단계로 구성됩니다.
기술적으로 이 워크플로는 WanVaceToVideo 노드를 사용해 인페인팅된 프레임을 다시 비디오 형식으로 변환하며, TrimVideoLatent 및 CreateVideo 노드가 비디오 길이와 형식을 관리합니다. ImageCompositeMasked 노드는 인페인팅 영역을 원본 비디오와 블렌딩해 자연스러운 룩을 보장하는 데 중요합니다. 코어 노드를 사용하므로 추가 커스텀 설치 없이 접근성과 구현 용이성이 높습니다. 비디오 전체 품질을 해치지 않으면서 정밀 편집이 필요한 콘텐츠 크리에이터 및 비디오 편집자에게 특히 가치가 있습니다.
제공할 항목
- 워크플로 읽는 중
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({
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"49",
2
],
"model": [
"48",
0
],
"negative": [
"49",
1
],
"positive": [
"49",
0
],
"sampler_name": "uni_pc",
"scheduler": "simple",
"seed": 584027519362099,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "A little boy and a dog are hiking in the forest. The puppy runs around the boy cheerfully.\n"
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走,过曝,"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"58",
0
],
"vae": [
"39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"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": [
"154",
0
],
"shift": 5
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"49": {
"class_type": "WanVaceToVideo",
"inputs": {
"batch_size": 1,
"control_masks": [
"130",
0
],
"control_video": [
"208",
0
],
"height": 720,
"length": 81,
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"reference_image": [
"162",
0
],
"strength": 1,
"vae": [
"39",
0
],
"width": 720
},
"_meta": {
"title": "WanVaceToVideo"
}
},
"58": {
"class_type": "TrimVideoLatent",
"inputs": {
"samples": [
"3",
0
],
"trim_amount": [
"49",
3
]
},
"_meta": {
"title": "Trim Video Latent"
}
},
"68": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"210",
2
],
"images": [
"8",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"69": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"68",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"111": {
"class_type": "MaskToImage",
"inputs": {
"mask": [
"215",
1
]
},
"_meta": {
"title": "Convert Mask to Image"
}
},
"129": {
"class_type": "RepeatImageBatch",
"inputs": {
"amount": [
"211",
2
],
"image": [
"111",
0
]
},
"_meta": {
"title": "Repeat Image Batch"
}
},
"130": {
"class_type": "ImageToMask",
"inputs": {
"channel": "red",
"image": [
"129",
0
]
},
"_meta": {
"title": "Convert Image to Mask"
}
},
"140": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.1_vace_14B_fp16.safetensors",
"weight_dtype": "fp8_e4m3fn_fast"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"154": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Wan21_CausVid_14B_T2V_lora_rank32.safetensors",
"model": [
"140",
0
],
"strength_model": 0.30000000000000004
},
"_meta": {
"title": "Load LoRA"
}
},
"162": {
"class_type": "LoadImage",
"inputs": {
"image": "api_bfl_flux_1_kontext_multiple_images_input_dog.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"208": {
"class_type": "ImageCompositeMasked",
"inputs": {
"destination": [
"213",
0
],
"mask": [
"215",
1
],
"resize_source": True,
"source": [
"216",
0
],
"x": 0,
"y": 0
},
"_meta": {
"title": "Image Composite Masked"
}
},
"209": {
"class_type": "LoadVideo",
"inputs": {
"file": "video_wan_vace_inpainting_input_video.mp4"
},
"_meta": {
"title": "Load Video"
}
},
"210": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"209",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"211": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"210",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"213": {
"class_type": "RebatchImages",
"inputs": {
"batch_size": [
"211",
2
],
"images": [
"210",
0
]
},
"_meta": {
"title": "Rebatch Images"
}
},
"214": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"208",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"215": {
"class_type": "LoadImage",
"inputs": {
"image": "video_wan_vace_inpainting_1st_frame_and_mask.png"
},
"_meta": {
"title": "Load Image"
}
},
"216": {
"class_type": "MaskToImage",
"inputs": {
"mask": [
"219",
0
]
},
"_meta": {
"title": "Convert Mask to Image"
}
},
"219": {
"class_type": "InvertMask",
"inputs": {
"mask": [
"215",
1
]
},
"_meta": {
"title": "Invert Mask"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
이 워크플로는 비디오 인페인팅 작업을 위해 Wan2.1 모델, 구체적으로 VACE-1.3B 및 VACE-14B 모델을 사용합니다.
예. VACE-1.3B 모델은 480P 해상도를 지원하고, VACE-14B 모델은 최대 720P 해상도를 지원합니다.
아니요. 이 워크플로는 코어 노드로 설계되어 있어 추가 커스텀 노드가 필요하지 않습니다.
ImageToMask 노드를 사용해 비디오에서 인페인팅하고 싶은 영역을 정의할 수 있습니다.
관련 워크플로
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B: 이미지 편집
- Wan2.1, ChronoEdit, Nvidia
ChronoEdit 14B: 이미지 편집
- Wan2.1, Wan
Wan 2.1 ControlNet
- Wan2.1, Wan
Wan 2.1 Fun 카메라 1.3B
- Wan2.1, Wan
Wan 2.1 Fun 카메라 14B
- Wan2.1, Wan
Wan 2.1 시작-끝 프레임 비디오 720p F16
- Wan2.1, Wan
Wan 2.1 이미지 기반 비디오 생성
- Wan2.1, Wan
Wan 2.1 인페인팅
- Wan2.1, Wan
Wan 2.1 텍스트 기반 비디오 생성
- Wan2.1, Wan
Wan ATI
- Wan2.1, Wan
Wan VACE 제어 비디오
- Wan, Wan2.1
Wan-Move 모션 제어 이미지 기반 비디오 생성