VOID: 비디오 인페인팅
비디오를 업로드하고 제거할 오브젝트를 마스킹하세요. 오브젝트와 물리적 상호작용이 삭제된 깨끗한 비디오를 생성합니다.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. 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({
"4": {
"class_type": "LoadVideo",
"inputs": {
"file": "UPLOADED_video_FILENAME"
},
"_meta": {
"title": "Source video (ComfyUI/input/)"
}
},
"38": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/VOID_pass2",
"format": "mp4",
"format.codec": "auto",
"video": [
"167:165",
0
]
},
"_meta": {
"title": "Save Video (Pass 12"
}
},
"48": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/VOID_pass1",
"format": "auto",
"format.codec": "auto",
"video": [
"167:46",
0
]
},
"_meta": {
"title": "Save Video (Pass 1)"
}
},
"167:10": {
"class_type": "VOIDInpaintConditioning",
"inputs": {
"batch_size": 1,
"height": [
"167:148",
0
],
"length": [
"167:43",
2
],
"negative": [
"167:7",
0
],
"positive": [
"167:6",
0
],
"quadmask": [
"167:149:75",
0
],
"vae": [
"167:3",
0
],
"video": [
"167:145",
0
],
"width": [
"167:147",
0
]
},
"_meta": {
"title": "VOIDInpaintConditioning"
}
},
"167:133": {
"class_type": "VOIDSampler",
"inputs": {},
"_meta": {
"title": "VOIDSampler"
}
},
"167:134": {
"class_type": "VOIDSampler",
"inputs": {},
"_meta": {
"title": "VOIDSampler"
}
},
"167:136": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 6,
"model": [
"167:143",
0
],
"negative": [
"167:10",
1
],
"positive": [
"167:10",
0
]
},
"_meta": {
"title": "CFGGuider (Pass 2 cfg=6)"
}
},
"167:137": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"167:143",
0
],
"scheduler": "simple",
"steps": 30
},
"_meta": {
"title": "BasicScheduler"
}
},
"167:138": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"167:144",
0
],
"scheduler": "simple",
"steps": 30
},
"_meta": {
"title": "BasicScheduler"
}
},
"167:140": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 6,
"model": [
"167:144",
0
],
"negative": [
"167:10",
1
],
"positive": [
"167:10",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"167:141": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 43
},
"_meta": {
"title": "RandomNoise"
}
},
"167:142": {
"class_type": "OpticalFlowLoader",
"inputs": {
"model_name": "raft_large_C_T_SKHT_V2-ff5fadd5.safetensors"
},
"_meta": {
"title": "Load Optical Flow Model"
}
},
"167:143": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "void_pass2.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"167:144": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "void_pass1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"167:145": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"167:169",
1
],
"image": [
"167:166",
0
],
"length": [
"167:164",
1
]
},
"_meta": {
"title": "Get Image from Batch"
}
},
"167:147": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 672
},
"_meta": {
"title": "Int (Width)"
}
},
"167:148": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 384
},
"_meta": {
"title": "Int (Height)"
}
},
"167:149:75": {
"class_type": "SAM3_Detect",
"inputs": {
"bboxes": {
"height": 512,
"width": 512,
"x": 0,
"y": 0
},
"conditioning": [
"167:149:78",
0
],
"image": [
"167:145",
0
],
"individual_masks": False,
"model": [
"167:149:77",
0
],
"refine_iterations": 2,
"threshold": 0.5
},
"_meta": {
"title": "SAM3 Detect"
}
},
"167:149:77": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sam3.1_multiplex_fp16.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"167:149:78": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"167:149:77",
1
],
"text": "dog"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"167:150": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"167:36",
0
],
"on_true": [
"167:45",
0
],
"switch": [
"167:153",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"167:153": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Boolean (Skip Pass 2?)"
}
},
"167:158": {
"class_type": "TrimAudioDuration",
"inputs": {
"audio": [
"167:166",
1
],
"duration": [
"167:164",
0
],
"start_index": [
"167:169",
0
]
},
"_meta": {
"title": "Trim Audio Duration"
}
},
"167:163": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 5
},
"_meta": {
"title": "Int (Video duration)"
}
},
"167:164": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a * b",
"values.a": [
"167:163",
0
],
"values.b": [
"167:166",
2
]
},
"_meta": {
"title": "Math Expression"
}
},
"167:165": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"167:158",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"167:166",
2
],
"images": [
"167:150",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"167:166": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"4",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"167:168": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Int (Index)"
}
},
"167:169": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a * b",
"values.a": [
"167:168",
0
],
"values.b": [
"167:166",
2
]
},
"_meta": {
"title": "Math Expression"
}
},
"167:2": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "t5xxl_fp16.safetensors",
"device": "default",
"type": "cogvideox"
},
"_meta": {
"title": "Load CLIP"
}
},
"167:3": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "cogvideox_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"167:31": {
"class_type": "VOIDWarpedNoise",
"inputs": {
"batch_size": 1,
"height": [
"167:148",
0
],
"length": [
"167:43",
2
],
"optical_flow": [
"167:142",
0
],
"video": [
"167:45",
0
],
"width": [
"167:147",
0
]
},
"_meta": {
"title": "Warped Noise (from Pass 1 output)"
}
},
"167:32": {
"class_type": "VOIDWarpedNoiseSource",
"inputs": {
"warped_noise": [
"167:31",
0
]
},
"_meta": {
"title": "Warped Noise → NOISE"
}
},
"167:35": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"167:136",
0
],
"latent_image": [
"167:10",
2
],
"noise": [
"167:32",
0
],
"sampler": [
"167:134",
0
],
"sigmas": [
"167:137",
0
]
},
"_meta": {
"title": "Pass 2 Sample"
}
},
"167:36": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"167:35",
0
],
"vae": [
"167:3",
0
]
},
"_meta": {
"title": "Pass 2 VAE Decode"
}
},
"167:43": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"167:145",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"167:45": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"167:49",
0
],
"vae": [
"167:3",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"167:46": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"167:158",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"167:166",
2
],
"images": [
"167:45",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"167:49": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"167:140",
0
],
"latent_image": [
"167:10",
2
],
"noise": [
"167:141",
0
],
"sampler": [
"167:133",
0
],
"sigmas": [
"167:138",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"167:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"167:2",
0
],
"text": "An empty black volcanic sand beach at dawn, seen from a smooth sideways tracking camera at low height. Foamy steel-grey surf rolls in and slides back over the wet sand, leaving glossy reflections of the pale silver and lavender sky. Sea fog drifts along the shoreline while the distant basalt sea stacks and the long headland pass slowly behind. The dark sand is smooth, wet and undisturbed, with only fine ripples and scattered grains, and nothing moves across it. Cold, quiet, moody natural light."
},
"_meta": {
"title": "Positive Prompt"
}
},
"167:7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"167:2",
0
],
"text": ""
},
"_meta": {
"title": "Negative Prompt"
}
}
})
workflow.set_input("4", "file", client.assets.from_url("https://comfy.org/catalog-media/d9f0dd91-f8de-4265-a705-15a3db24023b/0be332a2-d693-4583-9a5d-7e7adafe2e58"))
# 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("38"):
output.to_file(output.name)
for output in job.get_outputs("48"):
output.to_file(output.name)예시 사용해 보기
이 워크플로 정보
이 ComfyUI 튜토리얼은 VOID: Video Inpainting 워크플로를 사용해 비디오에서 오브젝트를 제거하는 방법을 보여줍니다. 그래프는 단순하고 학습이 빠릅니다: LoadVideo가 클립을 읽고, 단일 VOID 인페인팅 노드(c3157b75-484a-459e-b8de-57823bef5130)가 세그멘테이션 및 시간 기반 인페인팅을 수행하며, SaveVideo가 정리된 결과를 저장합니다. 캔버스의 MarkdownNote가 인라인 가이드를 제공합니다. 내부적으로 세그멘테이션은 SAM3(sam3.1_multiplex_fp16.safetensors 체크포인트 사용)로 구동됩니다. T5-XXL 텍스트 인코더로 인코딩한 텍스트 힌트, 손으로 그린 마스크, 또는 둘 다를 사용해 지울 대상을 정밀하게 안내할 수 있습니다.
기술적으로 핵심 VOID 노드는 Netflix/void-model 프로젝트의 2패스 시간 인지 인페인팅 모델을 실행합니다. 1패스는 프레임별로 마스크된 콘텐츠를 제거하고 그럴듯한 배경을 추정하며, 2패스는 시간 축으로 구조를 전파해 깜빡임을 줄이고 모션 패럴랙스를 보존합니다. 이 방식은 단일 프레임 패치보다 실제 오브젝트 제거에 더 적합하며, 반사/그림자/짧은 가림도 프레임 간에 더 일관되게 처리됩니다. fp16으로 동작하므로 최신 GPU에서 품질과 속도의 균형을 맞추면서 메모리 사용을 관리하기 쉽습니다.
질문과 답변
둘 다 가능합니다. VOID 노드는 T5-XXL + SAM3를 통한 텍스트 가이드 세그멘테이션(빠른 선택), 손으로 칠한 바이너리 마스크(정밀), 또는 둘을 함께(텍스트로 위치 지정, 마스크로 가장자리 정교화) 지원합니다.
VOID는 2패스 시간 인지 인페인팅을 사용합니다. 1패스가 프레임별로 대상을 제거하고, 2패스가 구조를 시간 축으로 전파해 깜빡임을 줄이며 모션 단서를 보존합니다. 여전히 흔들림이 보이면 시간적 일관성/윈도우를 높이고 마스크 가장자리를 부드럽게 하세요.
후광을 덮을 수 있도록 마스크를 약간 확장(dilation)하고, 작은 페더를 추가하세요. 텍스트만으로 선택 중이라면 힌트를 더 구체적으로(색/크기/위치) 쓰거나, 반사가 지속되는 부분에 수동 마스크를 추가하세요.
모델은 fp16으로 실행되지만 GPU 부하가 큽니다. 해상도가 높고, 클립이 길고, 시간 윈도우가 클수록 VRAM과 렌더 시간이 증가합니다. 더 빠르게 하려면 입력을 다운스케일하고, 클립을 줄이거나, 시간 윈도우를 낮추세요. 하드 컷 기준으로 샷을 나눠 각각 처리하는 것도 좋습니다.
아니오. SaveVideo는 무음으로 렌더링합니다. 오디오를 유지하려면 내보내기 후 편집기나 ffmpeg 같은 도구로 원본 트랙을 리먹스하세요.