Gemini-Nano-1图片编辑
'make it sunset' and mean it
- image_input
- output
NanoBanana - Gemini 2.5 Flash Image - is the instruction-editing model that made "edit this picture with a sentence" feel like a solved problem. Change the background to a beach, swap the lighting to golden hour, add a product to the shot: it just does it, and it follows the prompt with unusual strictness. This node wraps that model in its simplest, most direct form: image in, instruction in, edited image out. No context plumbing, no thinking-level knobs, no web search - if you want the focused editor rather than the kitchen-sink node, this is it.
How it works
Your prompt and images are base64'd and POSTed to the gateway under the model id gemini-2.5-flash-image. The key input to understand is is_translation (default off). NanoBanana accepts Chinese input but doesn't reliably render Chinese output - the README is explicit about this. So if you're prompting in Chinese and the result comes back off, flip is_translation on and the pack pre-translates your instruction to English before the model sees it. Leave it off for English prompts, where it's just overhead.
The inputs that matter
prompt(STRING) - the edit instruction. Keep it to a single clear directive; the pack's own guidance for this model family is short, natural-language, one-instruction-at-a-time prompts.is_translation(BOOLEAN) - the Chinese-input toggle above.Size(1:1, 3:4, 4:3, 9:16, 16:9) - output aspect. 3:4 is the default.mount(INT, 1–4, default 1) - how many edited variants to request. More mounts = more takes per run = more money per run, but it's a cheap way to dodge a bad seed.seed(INT) - reproducibility.
Optional: image_input (IMAGE - a batch; you can feed multiple reference shots). One output, output (IMAGE).
Installing it
This is one node in comfyui-MJAPI-party. ComfyUI Manager → search "mojieapi_party" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MoJIeAIGC/comfyui-MJAPI-party.git
Register at mojieaigc.com and set your key in config.ini (leave BASE_URL = https://www.mojieaigc.com/v1/completions untouched), then restart:
[API]
KEY = your_api_key
BASE_URL = https://www.mojieaigc.com/v1/completions
Nothing to download; standard pack dependencies only.
Common issues
- Chinese prompt produced garbled or unchanged output. That's the
is_translationflag's entire reason to exist. Try it before blaming the model. - The edit ignores part of your instruction. This model family does best with one directive per prompt. "Change the background to a beach AND add a person AND make it rainy" is a coin flip; split it into sequential edits.
- Output text/typography in English. Expected - Chinese output isn't supported by this backend, so don't plan a workflow that needs rendered Chinese text out of NanoBanana.
- Error image with text - the pack's standard failure display (key, balance, timeout, or a refused edit under Google's moderation - which nothing in the pack bypasses).
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A beautiful sunset | — |
| is_translation | BOOLEAN | false | — |
| Size | COMBO | 3:4 | 5 options: 1:1, 3:4, 4:3, 9:16, 16:9 |
| mount | INT | 11–4 | — |
| seed | INT | 0 | — |
| image_inputopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | IMAGE | — |