Fashion Editorial Shots
Upload your character, background scene and product. Generate a 2x2 grid, select your desired image and upscale
简介
This ComfyUI workflow is designed to streamline the process of generating high-quality fashion editorial shots. By integrating specific models and nodes, such as Nano Banana Pro and Google Gemini Image, the workflow allows users to upload a character, background scene, and product to create a 2x2 grid of potential images. The user can then select their desired image for upscaling, ensuring a polished final product. Key nodes like LoadImage and GeminiImage2Node are employed to handle image inputs and transformations, while the SaveImage node ensures that the final images are stored efficiently.
Custom nodes from comfyui-kjnodes and comfyui_essentials are also utilized to enhance the workflow's functionality, making it a versatile tool for fashion photography enthusiasts and professionals alike.
Technically, the workflow leverages a combination of AI models and custom nodes to automate the image generation process. The Reroute node is used to manage data flow efficiently, while the PrimitiveInt node helps in configuring parameters for image processing. The PreviewImage node allows users to view intermediate results, facilitating informed decision-making before finalizing the upscale. This workflow is particularly useful for fashion brands and photographers looking to quickly generate and refine editorial images without the need for extensive manual editing.
你需要提供
- 正在读取工作流
在 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
- 你的文件
- 由代码根据链接上传
需要付费的 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({
"1": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Character Image"
}
},
"2": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_2_FILENAME"
},
"_meta": {
"title": "Load Background Image"
}
},
"3": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"15:10:14",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Generate a 2x2 (2 rows, 2 cols) grid.\n\nDivide the frame in 4 different 16:9 frames.\n\nFashion editorial photoshoot of the model from image 1 in the scene from image 2. The character is showcasing the product from image 3. No visible margin or borders between grid images.\n\nFor each frame choose the angle and type of shot, ensure the character and product are visible in each frame, seamlessly interacting.",
"resolution": "4K",
"response_modalities": "IMAGE+TEXT",
"seed": 12345,
"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)"
}
},
"4": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-2x2_grid",
"images": [
"3",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_3_FILENAME"
},
"_meta": {
"title": "Load Product Image"
}
},
"52": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Crop Inset Grid Images"
}
},
"54": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"53:8",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"55": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"53:9",
0
]
},
"_meta": {
"title": "Save Image 2"
}
},
"56": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"53:10",
0
]
},
"_meta": {
"title": "Save Image 3"
}
},
"57": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"53:11",
0
]
},
"_meta": {
"title": "Save Image 4"
}
},
"60": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"75:74",
0
]
},
"_meta": {
"title": "Preview Selected Image"
}
},
"62": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"68:14",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Upscale image 1 while maintaining pose and composition, add subtle details. Use the product from image 2 to add back details to the product.",
"resolution": "4K",
"response_modalities": "IMAGE+TEXT",
"seed": 12345,
"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)"
}
},
"77": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_upscaled",
"images": [
"62",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"15:10:12": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"15:9:14",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"15:10:13": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"5",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"15:10:12",
1
],
"target_width": [
"15:10:12",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"15:10:14": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"15:9:14",
0
],
"image2": [
"15:10:13",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"15:9:12": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"1",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"15:9:13": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"2",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"15:9:12",
1
],
"target_width": [
"15:9:12",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"15:9:14": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"1",
0
],
"image2": [
"15:9:13",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"53:10": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:24",
0
],
"y": [
"53:12",
0
]
},
"_meta": {
"title": "3"
}
},
"53:11": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:13",
0
],
"y": [
"53:12",
0
]
},
"_meta": {
"title": "4"
}
},
"53:12": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:16",
0
],
"b": [
"53:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"53:13": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:15",
0
],
"b": [
"53:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"53:14": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"52",
0
],
"b": 0,
"value": "a"
},
"_meta": {
"title": "Crop Inset Grid Images Value"
}
},
"53:15": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
0
],
"b": [
"53:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "WIDTH"
}
},
"53:16": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
1
],
"b": [
"53:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "HEIGHT"
}
},
"53:17": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"3",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"53:19": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"53:8",
0
],
"image_2": [
"53:9",
0
],
"image_3": [
"53:10",
0
],
"image_4": [
"53:11",
0
],
"inputcount": 4
},
"_meta": {
"title": "Image Batch Multi"
}
},
"53:20": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"53:22",
0
],
"image": [
"53:19",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "nearest-exact",
"width": [
"53:23",
0
]
},
"_meta": {
"title": "Resize Images"
}
},
"53:21": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:20",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:22": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
1
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "HEIGHT / 2"
}
},
"53:23": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
0
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "WIDTH / 2"
}
},
"53:24": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"53:14",
0
],
"value": "b/2"
},
"_meta": {
"title": "Col 1 - X val"
}
},
"53:4": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:5": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:9",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:6": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:10",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:7": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:11",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:8": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:24",
0
],
"y": [
"53:24",
0
]
},
"_meta": {
"title": "1"
}
},
"53:9": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:13",
0
],
"y": 0
},
"_meta": {
"title": "2"
}
},
"68:12": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"75:74",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"68:13": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"5",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"68:12",
1
],
"target_width": [
"68:12",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"68:14": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"75:74",
0
],
"image2": [
"68:13",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"75:69": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1
},
"_meta": {
"title": "Select Image Number"
}
},
"75:73": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"75:69",
0
],
"b": 0,
"value": "a - 1"
},
"_meta": {
"title": "Image # as index"
}
},
"75:74": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"75:73",
0
],
"image": [
"53:20",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("1", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
workflow.set_input("2", "image", client.assets.from_url("https://example.com/replace-with-a-url/image_2"))
workflow.set_input("5", "image", client.assets.from_url("https://example.com/replace-with-a-url/image_3"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)常见问答
You can upload character, background scene, and product images in common formats like JPEG and PNG.
The upscale feature uses AI models to increase the resolution of your selected image, enhancing its quality for professional use.
Currently, the workflow is set to generate a 2x2 grid, but future updates may allow for customizable grid sizes.
No prior experience is necessary. The workflow is designed to be user-friendly, with nodes and models handling the complex processes.