
The Nano Banana workflow leverages the power of the Gemini-2.5-Flash model to provide consistent and high-quality image editing capabilities. This workflow is designed to streamline the process of editing images by integrating several key nodes, such as LoadImage, PreviewAny, and GeminiImageNode. The LoadImage node is responsible for importing images from the specified 'ComfyUI/input' folder, which is a prerequisite for initiating the workflow. Once the images are loaded, the PreviewAny node allows users to preview and select the images they wish to edit. The core of the workflow, the GeminiImageNode, applies the Gemini-2.5-Flash model to perform advanced image editing tasks, ensuring consistency and quality across the batch of images.
What makes this workflow particularly useful is its ability to handle batch processing through the ImageBatch node, which is activated using Ctrl-B. This feature is ideal for users who need to edit multiple images simultaneously, saving time and effort. The workflow concludes with the SaveImage node, which outputs the edited images to the desired location. The integration of MarkdownNote provides users with the ability to annotate and document their editing process, making it easier to keep track of changes and iterations. Overall, this workflow is a powerful tool for anyone looking to perform efficient and consistent image editing using AI models.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "Nano Banana" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("api_google_gemini_image_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("2", "image", asset); // LoadImage
const job = await client.run(wf);
await job.getOutputs("30")[0].toFile("output.png"); // SaveImageThe SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ













