3x3 광고 이미지 생성
제품을 업로드하고 3x3 그리드의 각 위치에 간단한 프롬프트를 입력합니다. 9개의 고유한 이미지를 생성합니다. 마음에 드는 이미지를 선택하고 제품을 참조로 사용하여 4k로 업스케일합니다.
정보
'3x3 Grid For Product Ads' 워크플로는 광고용 제품 이미지 생성을 더 빠르게 진행하도록 설계되었습니다. 3x3 그리드 레이아웃을 활용해 사용자가 제품 이미지를 업로드하고 각 그리드 위치마다 서로 다른 프롬프트를 제공할 수 있습니다. 그 결과 제품의 다양한 요소나 특징을 강조한 9개의 고유 이미지가 생성됩니다. 이 워크플로는 제품의 형태를 유지하면서 창의적 변형을 더하는 데 유리한 Nano Banana Pro 모델과, 안정적인 이미지 향상을 위한 Google 모델을 사용합니다.
기술적으로 이 워크플로는 여러 노드를 사용해 기능을 구성합니다. GeminiImage2Node가 이미지 생성의 핵심이며, LoadImage 및 SaveImage 노드가 입력과 출력을 관리합니다. 또한 ComfyUI-KJNodes 및 ComfyUI_essentials의 커스텀 노드를 포함해 유연성과 사용자 정의 옵션을 확장합니다. 이 워크플로의 특징 중 하나는 선택한 이미지를 4K 해상도로 업스케일링할 수 있다는 점으로, 전문 광고에 적합한 고품질 출력을 제공합니다. 적은 작업으로 임팩트 있는 비주얼 콘텐츠를 만들고 싶은 비즈니스에 특히 유용합니다.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 모든 항목이 로드된 Comfy Cloud에서 열거나, 자체 ComfyUI에서 사용하려면 다운로드하세요.
Cloud에서 사용해 보기워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
Loading the graph
Open full-size workflow preview- 작성자
- Rob
사용자 지정 노드 필요
- 워크플로 읽는 중
코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
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({
"10": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"11",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Create an editorial photoreal 3×3 grid for a high end e commerce ad featuring only the following product: purple glass bottle with galaxy texture.\n\nBackground: minimalist studio. \nLighting: soft and diffused.\n\nGenerate as one 3×3 grid with no margin, gutter or borders.\n\nFollow the prompts for each grid image. If left blank use your creativity:\n\nPosition 1,1: Product hero shot\n\nPosition 1,2: Product pouring out liquid\n\nPosition 1,3: Extreme close up\n\nPosition 2,1: Bottle being opened with corkscrew bottle opener\n\nPosition 2,2: Bottle floating angled\n\nPosition 2,3: Liquid exploding\n\nPosition 3,1: \n\nPosition 3,2:\n\nPosition 3,3:",
"resolution": "4K",
"response_modalities": "IMAGE",
"seed": 54321,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"11": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Product Image"
}
},
"58": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Crop Inset Grid Images"
}
},
"59": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"56:29",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"60": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"56:33",
0
]
},
"_meta": {
"title": "Save Image 2"
}
},
"61": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"56:39",
0
]
},
"_meta": {
"title": "Save Image 3"
}
},
"62": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"56:40",
0
]
},
"_meta": {
"title": "Save Image 4"
}
},
"63": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_6",
"images": [
"56:45",
0
]
},
"_meta": {
"title": "Save Image 6"
}
},
"64": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_5",
"images": [
"56:43",
0
]
},
"_meta": {
"title": "Save Image 5"
}
},
"65": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_7",
"images": [
"56:46",
0
]
},
"_meta": {
"title": "Save Image 7"
}
},
"66": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_8",
"images": [
"56:49",
0
]
},
"_meta": {
"title": "Save Image 8"
}
},
"67": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_9",
"images": [
"56:51",
0
]
},
"_meta": {
"title": "Save Image 9"
}
},
"68": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_stitched",
"images": [
"10",
0
]
},
"_meta": {
"title": "Save Stitched Image"
}
},
"79": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"93:87",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Upscale image 1. Use the product from image 2 as a reference.",
"resolution": "4K",
"response_modalities": "IMAGE",
"seed": 54321,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"81": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_upscaled",
"images": [
"79",
0
]
},
"_meta": {
"title": "Save Upscaled Image"
}
},
"91": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1
},
"_meta": {
"title": "Select Image Number"
}
},
"56:18": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"10",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"56:29": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "1"
}
},
"56:32": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:29",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:33": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "2"
}
},
"56:34": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:33",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:38": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:39",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:39": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "3"
}
},
"56:40": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "4"
}
},
"56:41": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:40",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:42": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:43",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:43": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "5"
}
},
"56:44": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:45",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:45": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "6"
}
},
"56:46": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "7"
}
},
"56:47": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:46",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:48": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:49",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:49": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "8"
}
},
"56:50": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:51",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:51": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "9"
}
},
"56:56": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"56:29",
0
],
"image_2": [
"56:33",
0
],
"image_3": [
"56:39",
0
],
"image_4": [
"56:40",
0
],
"image_5": [
"56:43",
0
],
"image_6": [
"56:45",
0
],
"image_7": [
"56:46",
0
],
"image_8": [
"56:49",
0
],
"image_9": [
"56:51",
0
],
"inputcount": 9
},
"_meta": {
"title": "Image Batch Multi"
}
},
"56:57": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:56",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:59": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:65",
0
],
"b": [
"56:64",
0
],
"value": "(a+b) + (b/2)"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"56:60": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:65",
0
],
"b": [
"56:64",
0
],
"value": "(2*a) + (b*3)"
},
"_meta": {
"title": "Col 3 - X val"
}
},
"56:62": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:66",
0
],
"b": [
"56:64",
0
],
"value": "(2*a) + (3*b)"
},
"_meta": {
"title": "Row 3 - Y val"
}
},
"56:63": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:66",
0
],
"b": [
"56:64",
0
],
"value": "(a+b) + (b/2)"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"56:64": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"58",
0
],
"b": 0,
"value": "a"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"56:65": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:18",
0
],
"b": [
"56:64",
0
],
"value": "(a-3*b) / 3"
},
"_meta": {
"title": "WIDTH"
}
},
"56:66": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:18",
1
],
"b": [
"56:64",
0
],
"value": "(a-3*b) / 3"
},
"_meta": {
"title": "HEIGHT"
}
},
"56:67": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"56:64",
0
],
"value": "b/2"
},
"_meta": {
"title": "Col 1 - X val"
}
},
"56:71": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"56:64",
0
],
"value": "(b/2)"
},
"_meta": {
"title": "Row 1 - Y val"
}
},
"93:78": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"93:89",
0
],
"image": [
"56:56",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"93:83": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"11",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"93:86",
1
],
"target_width": [
"93:86",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"93:86": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"93:78",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"93:87": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"93:78",
0
],
"image2": [
"93:83",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"93:89": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"91",
0
],
"b": 0,
"value": "a - 1"
},
"_meta": {
"title": "Image # as index"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("11", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
그리드 이미지 사이에 경계가 보이면 Nano Banana Pro 모델의 크롭 설정을 조정해 제거할 수 있습니다.
제품용으로 설계되었지만 프롬프트와 입력 이미지를 조정하면 다른 주제에도 적용할 수 있습니다.
ComfyUI 문서에 있는 안내를 따라 커스텀 노드를 설치할 수 있습니다.
예. 각 그리드 위치에 고유한 프롬프트를 입력해 생성 이미지를 목적에 맞게 조정할 수 있습니다.