時尚編輯照
上傳您的角色、背景場景和產品。產生一個2x2網格,選擇您想要的圖像並放大
關於
這個 ComfyUI 工作流程用來簡化高品質時尚編輯風格(editorial)照片的生成流程。透過整合特定模型與節點(例如 Nano Banana Pro 與 Google Gemini Image),你可以上傳角色、背景場景與產品,生成一個 2x2 的候選影像網格,接著挑選想要的版本進行放大,確保最終成品更精緻。流程中使用 LoadImage 與 GeminiImage2Node 來處理影像輸入與轉換,並透過 SaveImage 節點有效率地儲存輸出。也搭配 comfyui-kjnodes 與 comfyui_essentials 的自訂節點來補強功能,適合時尚攝影愛好者與專業人士使用。
在技術上,這個工作流程結合 AI 模型與自訂節點來自動化生成。Reroute 節點用於更有效率地管理資料流,PrimitiveInt 節點協助配置影像處理參數。PreviewImage 節點可查看中間結果,讓你在確定要放大前先做判斷。特別適合時尚品牌與攝影師在不大量手動修圖的情況下,快速生成並精修 editorial 影像。
您提供的內容
- 正在讀取工作流程
在 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({
"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)問答
可上傳常見格式(如 JPEG、PNG)的角色、背景場景與產品圖像。
放大功能利用 AI 模型提升選定圖像解析度,增強專業用途的品質。
目前流程預設產生 2x2 圖格,未來版本可能支援自訂。
不需要。流程設計簡單,節點與模型會自動處理複雜步驟。