Create a character turnaround
Create multiple character views and close-ups from one reference image.
下载工作流在 Cloud 中试用 API 文档
查看工作流内部
源模板的只读预览。在 Cloud 中打开,即可查看节点并进行修改。
Loading the graph
Open full-size workflow preview- 作者
- Rob
从代码中调用该模型
以下请求使用与体验区相同的预设图和设置。每次提交都可能开始一次付费运行;如果提交结果未知,请勿自动重试。
1 获取 API 密钥 ↗
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"
}
},
"4": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-close_up",
"images": [
"5",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"5": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "9:16",
"images": [
"1",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "A 360 turnaround view of the subject, Close up shot of face, straight in 4 different angles, headshots, all white background",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"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)"
}
},
"6": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-full_body",
"images": [
"7",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"7": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"1",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "A 360 turnaround full body view of the subject, straight in 4 different angles. Front view, half turn, side profile, back view. \nFull-body shots, all white background.",
"resolution": "2K",
"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)"
}
},
"11": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"7",
0
],
"image2": [
"5",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"15": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-character_sheet",
"images": [
"11",
0
]
},
"_meta": {
"title": "Save Image"
}
}
})
workflow.set_input("1", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/templates-character_sheet_pink_silver_outfit.jpg"))
# 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("15"):
output.to_file(output.name)
for output in job.get_outputs("6"):
output.to_file(output.name)
for output in job.get_outputs("4"):
output.to_file(output.name)