Panoramic Image Generation
Upload an image to generate a panoramic image using Nano Banana/GPT Image 2.
Download WorkflowTry in Cloud API documentation
About
Upload an image to generate a panoramic image using Nano Banana/GPT Image 2.
What you provide
- Reading the workflow
Runs in ComfyUI. This workflow can't run on this page. Open it in Comfy Cloud with everything loaded, or download it for your own ComfyUI.
Try in CloudExample
Inside the workflow
A read-only preview of the node graph. Open it in Comfy Cloud or download it to edit the nodes.
Loading the graph
Open full-size workflow preview- Author
- ComfyUI
Requires custom nodes
- Reading the workflow
Use this workflow from code
Generated from the workflow graph and inputs when possible; stored examples are shown otherwise. Review credentials and endpoints before running code, which may incur charges.
1 Get API key ↗
What you need
- Runs on
- Comfy Cloud
- Key
- COMFY_API_KEY
Needs a paid Cloud plan and credits.
Download API JSONAPI documentation ↗
# 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": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "21:9",
"images": [
"75",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"45",
0
],
"resolution": "4K",
"response_modalities": "IMAGE+TEXT",
"seed": 356729005177027,
"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)"
}
},
"2": {
"class_type": "LoadImage",
"inputs": {
"image": "75235d22f427316ec22af888343e8e47e56419d1891631235b0c0d50ac7f449e.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"6": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI_Panorama",
"images": [
"1",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"11": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"2",
0
],
"model": "gemini-3-1-pro",
"prompt": [
"111",
0
],
"seed": 979056510712477,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"45": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"11",
0
],
"on_true": [
"110",
0
],
"switch": True
},
"_meta": {
"title": "If/Else Switch"
}
},
"55": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"11",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"75": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"2",
0
],
"images.image1": [
"76",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"76": {
"class_type": "LoadImage",
"inputs": {
"image": "9b0cdf8fc91ab7d1e18919815c4d49d96fd7a50c44a87dbb115b996c5aa34be6.png"
},
"_meta": {
"title": "Load Image"
}
},
"77": {
"class_type": "LoadImage",
"inputs": {
"image": "a3c227e806ee77e7ce08142112c1676fbeb7c161cabb9c73a142cb303540410b.png"
},
"_meta": {
"title": "Load Image"
}
},
"83": {
"class_type": "LoadImage",
"inputs": {
"image": "f4d2f33c3aeab1ce1176ddb2f7372fd2b6d1f0c133bef60ab20d82374e161f13.jpeg"
},
"_meta": {
"title": "Load Image"
}
},
"84": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"83",
0
],
"images.image1": [
"77",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"88": {
"class_type": "LoadImage",
"inputs": {
"image": "f4d2f33c3aeab1ce1176ddb2f7372fd2b6d1f0c133bef60ab20d82374e161f13.jpeg"
},
"_meta": {
"title": "Load Image"
}
},
"90": {
"class_type": "LoadImage",
"inputs": {
"image": "9b0e16920c5e4dbc4532f916955b3b73c176f015ff90d3c6da2d8a9e3ced124c.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"107": {
"class_type": "LoadImage",
"inputs": {
"image": "0ee357ae6373370d6f3a4cdcaba3fbd984ecb1ccc37fb4c13307f1ff19282290.png"
},
"_meta": {
"title": "Load Image"
}
},
"109": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "[Task] Generate a high-quality, professional HDRI 360-degree equirectangular panorama environment.\n[Reference Constraints] Content, art style, and lighting are strictly dictated by [Reference Image 1].[Reference Image 2 (Equirectangular Grid)] is for invisible geometric routing ONLY, absolutely do not reference its art style.\n[Scene & Atmosphere] Abstract surreal sci-fi space, highly reflective dark tiled floor at nadir, jagged porous asteroid rocks, glowing neon pink and cyan spheres, smooth metallic orbs, distant pitch-black starry void at zenith, cinematic lighting, vaporwave aesthetic, photorealistic. Ensure these elements map onto the spatial structure without breaking the underlying equirectangular geometry.\n[Projection Rules] True 360° x 180° spherical mapping. The top (zenith) and bottom (nadir) edges must display mathematically correct extreme visual stretching and distortion.[Panorama Stitching] The left and right edges must close perfectly and seamlessly, without any visual seams or breaks.[Mandatory Constraints & Negative Prompts] ABSOLUTELY NO GRID LINES. Do not render, trace, or retain any wireframes, reference lines, or the graphic flat style of [Reference Image 2]. The final output must not look like a blueprint, diagram, or mesh. It must be a fully rendered, clean, and immersive realistic environment.[Format Requirements] Strictly follow a 1:1 aspect ratio, 8k resolution."
},
"_meta": {
"title": "Text (Multiline)"
}
},
"110": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "[Task] Generate a high-quality, professional HDRI 360-degree equirectangular panorama environment.\n[Reference Constraints] Content, art style, and lighting are strictly dictated by [Reference Image 1].[Reference Image 2 (Equirectangular Grid)] is for invisible geometric routing ONLY, absolutely do not reference its art style.\n[Scene & Atmosphere] Abstract surreal sci-fi space, highly reflective dark tiled floor at nadir, jagged porous asteroid rocks, glowing neon pink and cyan spheres, smooth metallic orbs, distant pitch-black starry void at zenith, cinematic lighting, vaporwave aesthetic, photorealistic. Ensure these elements map onto the spatial structure without breaking the underlying equirectangular geometry.\n[Projection Rules] True 360° x 180° spherical mapping. The top (zenith) and bottom (nadir) edges must display mathematically correct extreme visual stretching and distortion.[Panorama Stitching] The left and right edges must close perfectly and seamlessly, without any visual seams or breaks.[Mandatory Constraints & Negative Prompts] ABSOLUTELY NO GRID LINES. Do not render, trace, or retain any wireframes, reference lines, or the graphic flat style of [Reference Image 2]. The final output must not look like a blueprint, diagram, or mesh. It must be a fully rendered, clean, and immersive realistic environment.[Format Requirements] Strictly follow a 2:1 aspect ratio, 8k resolution."
},
"_meta": {
"title": "Text (Multiline)"
}
},
"111": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "**[System Role]**\nYou are a professional VR Panorama Art Director and AI Prompt Expert. Your task is to analyze the provided image or description and directly output a complete, highly optimized English prompt ready for AI image generation.\n\n**[Workflow & Rules]**\nPlease immediately process the attached image by executing the following steps:\n1. **360° Spatial Expansion**: Analyze the image and extrapolate the 360-degree surroundings, zenith (top), and nadir (bottom).\n2. **Concise English Keywords**: Convert these details into **short, highly effective, comma-separated English keywords/phrases. Do NOT use long or bloated sentences. Keep it under 40 words.**\n3. **Template Output (CRITICAL)**: Replace `<REPLACE_THIS_WITH_GENERATED_ENGLISH_DESCRIPTION>` in the exact template below. **You MUST output the entire template exactly as written. Do NOT output any conversational filler or acknowledgment phrases!**\n\n**[Fixed Output Template] (Output this EXACTLY with the placeholder replaced):**\n[Task] Generate a high-quality, professional HDRI 360-degree equirectangular panorama environment.\n[Reference Constraints] Content, art style, and lighting are strictly dictated by [Reference Image 1]. [Reference Image 2 (Equirectangular Grid)] is for invisible geometric routing ONLY, absolutely do not reference its art style.\n[Scene & Atmosphere] <REPLACE_THIS_WITH_GENERATED_ENGLISH_DESCRIPTION>. Ensure these elements map onto the spatial structure without breaking the underlying equirectangular geometry.[Projection Rules] True 360° x 180° spherical mapping. The top (zenith) and bottom (nadir) edges must display mathematically correct extreme visual stretching and distortion.\n[Panorama Stitching] The left and right edges must close perfectly and seamlessly, without any visual seams or breaks.[Mandatory Constraints & Negative Prompts] ABSOLUTELY NO GRID LINES. Do not render, trace, or retain any wireframes, reference lines, or the graphic flat style of [Reference Image 2]. The final output must not look like a blueprint, diagram, or mesh. It must be a fully rendered, clean, and immersive realistic environment.\n[Format Requirements] Strictly follow a 2:1 aspect ratio, 8k resolution."
},
"_meta": {
"title": "Text (Multiline)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)