Vector Engine Gemini
Nano Banana in ComfyUI — no Google SDK, no GPU, just a key
- image_1
- image_2
- image_3
- image_4
- image_5
- image
- info
If you've ever wanted Google's Gemini image model - the "Nano Banana" family - inside a ComfyUI graph but bounced off Google's SDK docs, this is the node for you. Vector Engine Gemini is a thin wrapper that sends your prompt (plus up to five reference images) to a third-party proxy at api.vectorengine.ai, which fronts Google's Gemini image API and sends a finished image back. No local inference, no model files, no VRAM pressure - just an API key and 20–30 seconds of patience.
Why reach for it at all, when you've got Flux and friends sitting in your models folder? Because the Gemini image models are genuinely better than local diffusion at the things local diffusion is worst at: rendering text that isn't garbled, following fiddly multi-step instructions, and editing with reference images - "combine these two people into a group photo at the beach" actually works. That multi-image composition is the whole point of the image_1 through image_5 inputs. It's also the honest trade: this is a closed, watermarked model you pay per image for (the SynthID watermark is baked in), so it's a complement to your local stack, not a replacement.
How it works
The node is almost embarrassingly simple under the hood. On execute, it reads the VECTOR_ENGINE_API_KEY environment variable, compresses any input images to JPEG (max 2048px, quality 85 - the README claims this cuts payloads ~90%), and POSTs everything to /v1beta/models/{model}:generateContent on api.vectorengine.ai - the standard Gemini generateContent endpoint shape, just proxied through a reseller. It decodes the returned image back into a normal ComfyUI IMAGE tensor, so it plugs into Preview Image / Save Image like any local generation node.
Inputs and outputs that matter
- model - the dropdown gives you
gemini-3-pro-image-preview(the flagship "Nano Banana Pro") andgemini-3.1-flash-image-preview(the faster "Nano Banana 2"). Pro is better quality; the flash model is the speed pick for iterating. - prompt and system_prompt - both multiline. The system prompt is where you'd park style instructions that should apply to every job.
- aspect_ratio -
Auto, or presets from 1:1 up to 16:9/9:16. Pick what you need instead of trusting Auto. - image_size -
1K(fast),2K(balanced),4K(slow, and the priciest per image). - seed - a trap. It does exactly nothing. The author says it's "for display only" in the README, and the code confirms: the seed never reaches the API. Don't expect to reroll results with it.
Optional inputs: image_1 through image_5, any mix. Outputs are image and info (STRING). The info output is your friend - it carries the model, resolution, per-stage timings, status, and the actual error message if something fails.
Installing
ComfyUI Manager (search "ComfyUI-Vector-Engine"), or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/dzy1128/ComfyUI-Vector-Engine
Then restart. There's no requirements.txt and nothing to download - it uses only Python stdlib plus torch/numpy/Pillow, which ComfyUI already ships. Before the first run, set the key:
export VECTOR_ENGINE_API_KEY="sk-your-key-here"
Common issues
The big one: a black 512×512 image is not a crash. On any failure the node returns a black placeholder and writes the real error into the info output. Check that string first - it'll tell you if the key is bad (Authentication failed), the network dropped, or the API returned nothing. Missing key entirely, and the node refuses to even load with a VECTOR_ENGINE_API_KEY environment variable is not set error in the console.
Everything else is expectations: 20–30s per image is normal API latency, not a hang. Your input images are downscaled to 2048px before upload, so don't feed 4K sources expecting the detail to survive. And be aware of what you're plugging into: api.vectorengine.ai is an obscure reseller with essentially zero community footprint, so you're trusting it with your key and your prompts. For one-off text-heavy or multi-image edit jobs, that's fine. For a daily driver, it's worth knowing you're betting on someone else's uptime.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | gemini-3-pro-image-preview | 2 options: gemini-3-pro-image-preview, gemini-3.1-flash-image-preview |
| prompt | STRING | Generate a creative image based on the provided pictures. | — |
| system_prompt | STRING | You are an AI assistant skilled in generating images and editing pictures. | — |
| aspect_ratio | COMBO | Auto | 8 options: Auto, 1:1, 2:3, 3:2, 4:3, 3:4, +2 |
| image_size | COMBO | 1K | 3 options: 1K, 2K, 4K |
| seed | INT | 00–18446744073709550000 | — |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| info | STRING | — |