모션 콜라주
비디오를 스타일 레퍼런스와 함께 스톱모션 시퀀스로 변환하세요.
정보
Motion Collages는 단일 참조 이미지로 스타일을 가이드하여 어떤 소스 비디오든 스타일라이즈된 스톱모션 시퀀스로 변환합니다. 이 워크플로는 VHS_SelectEveryNthImage로 프레임을 샘플링하고, ImageBatchRepeatInterleaving으로 선택된 프레임을 홀드한 뒤, CreateVideo와 SaveVideo로 시퀀스를 다시 조립합니다. 토글 가능한 두 가지 스타일 전송 경로가 그룹화된 노드 블록으로 제공됩니다. 이미지 기반 경로는 스타일 이미지를 OpenAIGPTImageNodeV2에 직접 입력하고, VLM 기반 경로는 먼저 AILab_QwenVL_Advanced가 스타일 이미지를 설명한 다음 그 텍스트로 OpenAIGPTImageNodeV2를 프롬프트합니다.
내부적으로 LoadVideo와 GetVideoComponents가 프레임, 해상도, FPS를 추출하며, 트리밍을 위한 Video Slice도 사용할 수 있습니다. ImageListToImageBatch와 RebatchImages는 배치 처리를 관리해 프레임이 스타일 단계로 효율적으로 흐르도록 합니다. ResizeImageMaskNode와 GetImageSize는 스타일 및 비디오의 크기를 맞추고, 스타일 참조에 알파 채널이 있으면 ImageRemoveAlpha+가 투명도를 정리합니다. StringConcatenate는 깔끔한 프롬프트 또는 파일 이름을 조합하고, PreviewImage/PreviewAny는 중간 출력을 확인하는 데 도움이 됩니다. 결과는 제어 가능한 스톱모션 룩입니다. 원하는 리듬을 위해 N번째 프레임만 선택하고, 홀드를 강조하기 위해 프레임을 반복하며, 충실한 이미지 가이드 전송(이미지 기반) 또는 텍스트 설명 기반의 유연한 전송(VLM 기반) 중 하나를 선택할 수 있습니다.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 모든 항목이 로드된 Comfy Cloud에서 열거나, 자체 ComfyUI에서 사용하려면 다운로드하세요.
Cloud에서 사용해 보기예시 사용해 보기
워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
Loading the graph
Open full-size workflow preview이 워크플로의 파일
- 작성자
- ComfyUI
사용자 지정 노드 필요
- 워크플로 읽는 중
코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
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({
"282": {
"class_type": "ImageListToImageBatch",
"inputs": {
"images": [
"347",
0
]
},
"_meta": {
"title": "Image List to Image Batch"
}
},
"287": {
"class_type": "ImageBatchRepeatInterleaving",
"inputs": {
"images": [
"282",
0
],
"repeats": [
"321",
0
]
},
"_meta": {
"title": "ImageBatchRepeatInterleaving"
}
},
"296": {
"class_type": "RebatchImages",
"inputs": {
"batch_size": 1,
"images": [
"414:415",
0
]
},
"_meta": {
"title": "Rebatch Images"
}
},
"310": {
"class_type": "LoadImage",
"inputs": {
"image": "4aec5ec351a7828d3d2a2b9e79535c3e97ab346d2f1877de80313d955e470d5f.png"
},
"_meta": {
"title": "INPUT STYLE REFERENCE"
}
},
"321": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 5
},
"_meta": {
"title": "SELECT EVERY NTH FRAME"
}
},
"331": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"401",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"337": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"410",
2
],
"images": [
"407",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"338": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/CollageImage",
"format": "mp4",
"format.codec": "h264",
"video": [
"337",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"340": {
"class_type": "VHS_SelectEveryNthImage",
"inputs": {
"images": [
"410",
0
],
"select_every_nth": [
"321",
0
],
"skip_first_images": 0
},
"_meta": {
"title": "Select Every Nth Image 🎥🅥🅗🅢"
}
},
"347": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"401",
0
],
"resize_type": "scale to multiple",
"resize_type.multiple": 2,
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"401": {
"class_type": "OpenAIGPTImageNodeV2",
"inputs": {
"model": "gpt-image-2",
"model.background": "auto",
"model.custom_height": [
"405",
1
],
"model.custom_width": [
"405",
0
],
"model.images.image_1": [
"296",
0
],
"model.images.image_2": [
"310",
0
],
"model.quality": "low",
"model.size": "Custom",
"n": 1,
"prompt": "Stylize the first image in the style of the second image.",
"seed": 79065436
},
"_meta": {
"title": "OpenAI GPT Image 2.5"
}
},
"405": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"423",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"407": {
"class_type": "ImageRemoveAlpha+",
"inputs": {
"image": [
"287",
0
]
},
"_meta": {
"title": "🔧 Image Remove Alpha"
}
},
"409": {
"class_type": "LoadVideo",
"inputs": {
"file": "97528b37a516964dc2c1b9843ce2e0e049bcbddfdeefe985dfe8b2c197b18679.mp4"
},
"_meta": {
"title": "INPUT VIDEO"
}
},
"410": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"413",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"413": {
"class_type": "Video Slice",
"inputs": {
"duration": 0.5,
"start_time": 0.5,
"strict_duration": False,
"video": [
"409",
0
]
},
"_meta": {
"title": "TRIM VIDEO"
}
},
"423": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"340",
0
],
"resize_type": "scale to multiple",
"resize_type.multiple": 16,
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"414:13": {
"class_type": "RemoveBackground",
"inputs": {
"bg_removal_model": [
"414:14",
0
],
"image": [
"423",
0
]
},
"_meta": {
"title": "Remove Background"
}
},
"414:14": {
"class_type": "LoadBackgroundRemovalModel",
"inputs": {
"bg_removal_name": "birefnet.safetensors"
},
"_meta": {
"title": "Load Background Removal Model"
}
},
"414:15": {
"class_type": "InvertMask",
"inputs": {
"mask": [
"414:13",
0
]
},
"_meta": {
"title": "Invert Mask"
}
},
"414:415": {
"class_type": "ImageCompositeMasked",
"inputs": {
"destination": [
"423",
0
],
"mask": [
"414:15",
0
],
"resize_source": True,
"source": [
"414:418",
0
],
"x": 0,
"y": 0
},
"_meta": {
"title": "Image Composite Masked"
}
},
"414:418": {
"class_type": "ImageConstant",
"inputs": {
"batch_size": 1,
"blue": 0,
"green": 0,
"height": 512,
"red": 0,
"width": 512
},
"_meta": {
"title": "Image Constant Color (RGB)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
이미지 기반은 스타일 이미지를 OpenAIGPTImageNodeV2에 직접 입력해, 보통 더 충실한 스타일 전이를 제공합니다. VLM 기반은 AILab_QwenVL_Advanced로 먼저 스타일을 설명한 다음 이미지 노드를 프롬프트로 유도합니다. 변형에는 더 유연하지만 참조에 대한 엄격한 충실도는 떨어질 수 있습니다.
VHS_SelectEveryNthImage가 비디오에서 매 N번째 프레임만 샘플링하고, ImageBatchRepeatInterleaving이 선택된 각 프레임을 여러 steps 동안 유지합니다. 이 두 노드가 함께 모션의 유동성을 줄여 스톱모션 특유의 끊기는 리듬을 만듭니다.
GetImageSize와 ResizeImageMaskNode로 스타일/이미지 처리 경로가 비디오 해상도와 일치하도록 확인하세요. 스타일 이미지에 투명도가 있다면 ImageRemoveAlpha+를 켜서 에지 아티팩트를 방지하세요. 렌더 전에 중간 프레임을 미리보기로 확인해 문제를 조기에 잡는 것이 좋습니다.
아니요. 이 워크플로의 CreateVideo/SaveVideo는 무음 비디오를 출력합니다. 오디오가 필요하면 비디오 편집기에서 추가하거나 별도의 오디오 멀싱 단계로 처리하세요.
VHS_SelectEveryNthImage의 N을 키워 처리 프레임 수를 줄이고, repeat count를 올려 재생 시간을 유지하세요. Video Slice로 트림하고 ResizeImageMaskNode로 출력 해상도를 낮추는 것도 도움이 됩니다.