Gemini Image Edit
Edit an image by describing the change — no inpainting mask math
- config
- image
- vars
- IMAGE
- text
Every diffusion user knows the fiddly version of image editing: load a mask, inpaint, hope the seam blends, crank steps, re-run. Gemini Image Edit is the "just say it" version - you hand it an image and a sentence ("make it snow", "turn the shirt red", "put her at sunset"), and Gemini's image model returns an edited IMAGE with no mask, no local model, no VRAM. It's the pack's sister node to Gemini Image Gen, same idea, but it starts from your image instead of a blank canvas.
It's the same approach that made "edit by text prompt" feel magical in the Gemini line, and it works shockingly well for global changes - recoloring, lighting, season swaps, composition tweaks. It's less reliable when you want a surgical one-pixel-precise change; if you need to alter exactly one thing in a corner, a traditional masked inpaint is still the sharper tool. This is for "change the whole vibe" edits.
The inputs
config- required, Gemini provider only. Same refusal asGemini Image Genif you feed it an OpenAI config.image- required, the source IMAGE.prompt- the edit instruction, in plain language. Mustache{{var}}templating applies.size-1K(default),2K,4K.vars- optional Mustache variables.
Outputs: IMAGE (the edited result) and text (any notes). Two behaviors worth knowing: it preserves the original aspect ratio by design - the node passes aspect_ratio=None for edits so the output matches your source framing. And if the edit fails, it returns your original image instead of an error, so a "successful" run can quietly be the untouched input.
Why you'd use it in a workflow
It slots into any graph as a drop-in IMAGE producer. Load an image, describe the change, and the output feeds straight into SaveImage or back into an upscaler or a Chat with Image for a second opinion. Because it's remote and stateless, you can also chain edits - render, ask for a color change, ask for a lighting change - which locally would eat VRAM and hours. For quick concept iteration it's genuinely the fastest path in the pack.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Moeblack/ComfyUI-SimpleChat
Restart, or use Manager and search "ComfyUI-SimpleChat". Dependency is just aiohttp. You need a Gemini API key and a Gemini image model on your API Config.
Gotchas
The quiet-failure path is the trap: no image back means you get the original back with text carrying the excuse - always glance at text if the output looks suspiciously unchanged. Your image is uploaded to Google's API, so don't edit anything you wouldn't send to a cloud service. And Gemini's content filters apply to edits too, so a "make it more graphic" instruction can bounce off the policy wall. If the result is pixelated at 1K, that's the cost of cheap edits - bump to 2K when it matters.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| config | SIMPLECHAT_CONFIG | — | |
| image | IMAGE | — | |
| prompt | STRING | — | |
| varsopt | SIMPLECHAT_VARS | — | |
| sizeopt | COMBO | 1K | 3 options: 1K, 2K, 4K |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| text | STRING | — |