Placeholder: Gemini 3.1 Flash Image (π§ͺ)
Prototype Nano Banana 2 for free β including its 4K output and thinking mode
- image1
- image2
- image3
- Placeholder Image
- param_summary
- thought_image
Gemini 3.1 Flash Image - the model Google calls Nano Banana 2 ππ - is the speed-quality hybrid of the Banana lineup, and it's the most fun one to prototype with, because it has the settings that actually change your canvas. This placeholder mirrors that node exactly, generates a dummy image locally with zero API calls, and renders every parameter you passed as text on the output. You build the workflow structure for free, then swap in the real node when you're ready to spend.
If you've used the 2.5 Flash placeholder, this is that, plus the stuff that makes the 3.1 worth testing: image_size, wider aspect ratios, and a "thinking" toggle. The whole point of the Banana series is that it's Google's Gemini-native image stack - powerful, SynthID-watermarked, aggressively filtered - and the 3.1 Flash sits between the cheap 2.5 and the premium Pro. Its killer feature from a workflow-design view: you can ask for 4K and it'll actually deliver dimensions your downstream nodes have to handle.
How it works
Same Pillow machinery as the other placeholders: the node maps your image_size (512 / 1K / 2K / 4K) to a long edge in pixels - 4K means a 4096px canvas - then your aspect_ratio determines the other dimension, rounded to a multiple of 8. So image_size=4K + aspect_ratio=21:9 gives you a very wide 4096Γ1752 tensor, and you can find out right now, for free, whether your Save Image / VAE / compositing chain chokes on that.
It also mirrors the 3.1's thinking_level (minimal / High) and include_thoughts toggle, which the real model uses to reason before drawing. On the placeholder those are drawn onto the image and change nothing - they exist so the swap-in-place works without rewiring.
Inputs and outputs
- image_size - the one that matters most.
512,1K,2K, or4K. This is how you verify your pipeline at the resolution you'll actually pay for. - aspect_ratio - wider set than the 2.5 placeholder:
1:1through21:9, plus ultrawide4:1and8:1and anautodefault. - prompt - rendered on the image as a visual label.
- thinking_level and include_thoughts - mirrored from the real node; informational here.
- model - locked to
GEMINI_31_FLASH_IMAGE.
It returns three outputs: Placeholder Image (IMAGE), param_summary (STRING), and thought_image (IMAGE). That third one is the clever part - the real 3.1 node has a thought-image output slot, and the placeholder fills it with a dummy 1Γ1 tensor so nothing downstream breaks when you swap.
Installing it
It ships in the catnipglitch/comfyui-genmedia-gemini-api pack, a fork of Google's official comfyui-google-genmedia-custom-nodes. Easiest: ComfyUI Manager β search comfyui-google-genmedia-custom-nodes β Install. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/catnipglitch/comfyui-genmedia-gemini-api
pip install -r comfyui-genmedia-gemini-api/requirements.txt
Restart ComfyUI and it'll appear under Google AI/Placeholder. No API key, no GCP project, no model downloads - the pack's heavy Google dependencies install either way, but this node never touches them.
Common issues
- "Why is my 4K placeholder tiny?" If you left
image_sizeon the default1K, the long edge is 1024. Set it to4Kand watch the footer pixel size on the image update. - A workflow using the real 3.1 node won't load. The placeholder mirrors this pack's 3.1 node, not some other fork's version. Keep both from the same pack and the swap is seamless.
- Auth errors in a "placeholder" workflow. Not from this node - it makes no API call. Check for a real generation node that still made it into your test graph.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | GEMINI_31_FLASH_IMAGE | 1 options: GEMINI_31_FLASH_IMAGE |
| prompt | STRING | A vivid landscape painting of a futuristic city | β |
| seed | INT | 00β4294967295 | β |
| aspect_ratio | COMBO | auto | 13 options: auto, 1:1, 2:3, 3:2, 3:4, 4:1, +7 |
| image_size | COMBO | 1K | 4 options: 512, 1K, 2K, 4K |
| temperature | FLOAT | 0.700β1 | β |
| top_p | FLOAT | 1.000β1 | β |
| top_k | INT | 321β64 | β |
| output_mode | COMBO | IMAGE+TEXT | 2 options: IMAGE+TEXT, IMAGE |
| image1opt | IMAGE | β | |
| image2opt | IMAGE | β | |
| image3opt | IMAGE | β | |
| thinking_levelopt | COMBO | minimal | 2 options: minimal, High |
| include_thoughtsopt | BOOLEAN | false | β |
| system_instructionopt | STRING | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Placeholder Image | IMAGE | β |
| param_summary | STRING | β |
| thought_image | IMAGE | β |