單張圖像產生多張一致鏡頭
上傳一張輸入圖像,自動產生X個相機角度和拍攝型別的提示。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview執行於
- 輸出
- 圖片
- 作者
- Rob
從您的程式碼呼叫此模型
以下請求使用與 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({
"1": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"2",
0
]
},
"_meta": {
"title": "Preview All Generated Prompts"
}
},
"2": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"6",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Generate 6 different prompts following the instructions below. \nEach prompt idea needs to be 50-80 words max and be separated by *.\nEach prompt should be unique, varying the camera angles and shot type. Add subtle detail and maintain consistent elements.",
"seed": 12345,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"5": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"10:9",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"6": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Reference Image"
}
},
"11": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"10:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 1"
}
},
"18": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"19:9",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"20": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"19:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 2"
}
},
"21": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"22:9",
0
]
},
"_meta": {
"title": "Save Image 3"
}
},
"23": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"22:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 3"
}
},
"24": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"25:9",
0
]
},
"_meta": {
"title": "Save Image 4"
}
},
"26": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"25:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 4"
}
},
"27": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_5",
"images": [
"28:9",
0
]
},
"_meta": {
"title": "Save Image 5"
}
},
"29": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"28:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 5"
}
},
"30": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_6",
"images": [
"31:9",
0
]
},
"_meta": {
"title": "Save Image 6"
}
},
"32": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"31:3:1",
0
]
},
"_meta": {
"title": "Preview Prompt 6"
}
},
"10:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"10:3:8",
0
],
"string": [
"10:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"10:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"10:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"10:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"10:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"10:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"10:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"10:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"10:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"10:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"10:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"10:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"10:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"10:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"10:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 1,
"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)"
}
},
"19:10": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"6",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:11": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"19:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"19:3:8",
0
],
"string": [
"19:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"19:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"19:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"19:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"19:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"19:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 2
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"19:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"19:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"19:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"19:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"19:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"19:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"19:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"19:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"19:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 2,
"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)"
}
},
"22:10": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"6",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"22:11": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"22:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"22:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"22:3:8",
0
],
"string": [
"22:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"22:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"22:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"22:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"22:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"22:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 3
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"22:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"22:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"22:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"22:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"22:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"22:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"22:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"22:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"22:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 3,
"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)"
}
},
"25:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"25:3:8",
0
],
"string": [
"25:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"25:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"25:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"25:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"25:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"25:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 4
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"25:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"25:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"25:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"25:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"25:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"25:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"25:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"25:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"25:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 4,
"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)"
}
},
"28:10": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"6",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"28:11": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"28:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"28:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"28:3:8",
0
],
"string": [
"28:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"28:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"28:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"28:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"28:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"28:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 5
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"28:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"28:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"28:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"28:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"28:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"28:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"28:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"28:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"28:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 5,
"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)"
}
},
"31:11": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"31:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"31:3:1": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": True,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": True,
"regex_pattern": [
"31:3:8",
0
],
"string": [
"31:3:7",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"31:3:2": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"31:3:1",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"31:3:3": {
"class_type": "SomethingToString",
"inputs": {
"input": [
"31:3:9",
0
],
"prefix": "",
"suffix": ""
},
"_meta": {
"title": "Something To String"
}
},
"31:3:6": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 6
},
"_meta": {
"title": "Int - Select Prompt Number (not index)"
}
},
"31:3:7": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": [
"2",
0
]
},
"_meta": {
"title": "Text (Multiline)"
}
},
"31:3:8": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "(?<=\\{)\\d+(?=\\})",
"replace": [
"31:3:3",
0
],
"string": "(?:^(?!\\s*\\*?\\s*$).+$\\n(?:^\\s*\\*?\\s*$\\n)*){0}^(?!\\s*\\*?\\s*$)(.+)$"
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"31:3:9": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"31:3:6",
0
],
"b": 0,
"value": "a-1"
},
"_meta": {
"title": "Convert Prompt Number to Index"
}
},
"31:8": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"6",
0
],
"images.image1": [
"31:9",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"31:9": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"6",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"31:3:1",
0
],
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 6,
"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)"
}
}
})
workflow.set_input("6", "image", client.assets.from_url("https://comfy.org/catalog-media/388e7cf3-2ed0-4b56-9f3b-41080c2b8025/6b000691-26db-4348-a026-bde146e5bcc7"))
# 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("5"):
output.to_file(output.name)
for output in job.get_outputs("18"):
output.to_file(output.name)
for output in job.get_outputs("21"):
output.to_file(output.name)
for output in job.get_outputs("24"):
output.to_file(output.name)
for output in job.get_outputs("27"):
output.to_file(output.name)
for output in job.get_outputs("30"):
output.to_file(output.name)試試範例
關於此工作流程
此 ComfyUI 工作流程名為「Single Image to Multiple Consistent Shots」,旨在把單一輸入圖片轉換為一系列不同相機角度與鏡頭類型的圖片。它使用 Nano Banana Pro 模型,在維持多視角一致性的同時提供高品質的圖片生成。工作流程結合 PreviewAny、GeminiNode 與 SaveImage 等節點來處理並輸出圖片;也使用來自 comfyui-kjnodes 與 comfyui_essentials 的自訂節點,以提升功能與彈性。透過自動產生相機角度的多組提示詞,此工作流程特別適合需要從單一圖片來源產出多種鏡頭的創作者,例如分鏡規劃或產品攝影。
問答
Images with clear subjects and good lighting tend to yield the best results, as the model can better interpret and generate consistent angles.
Yes, the GeminiNode allows you to define specific parameters for camera angles, giving you control over the output.
While the workflow is efficient, it is primarily designed for pre-production and not optimized for real-time applications.
Consistency is maintained by using the same model settings across all generated images. Ensure that the Nano Banana Pro model is configured uniformly for each output.
相關工作流程
- Nano Banana Pro Image Edit
Character Turnaround Sheet Generator
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
See your subject from a new angle
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- FLUX.1 Fill
Edit a selected region