Nodes/comfyui-google-genmedia-custom-nodes/Placeholder: Gemini 3.1 Flash Image (πŸ§ͺ)
ComfyUI Node

Placeholder: Gemini 3.1 Flash Image (πŸ§ͺ)

Prototype Nano Banana 2 for free β€” including its 4K output and thinking mode

By catnipglitchΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 0
Placeholder: Gemini 3.1 Flash Image (πŸ§ͺ)
  • image1
  • image2
  • image3
  • Placeholder Image
  • param_summary
  • thought_image
β—„modelGEMINI_31_FLASH_IMAGEβ–Ί
β—„promptA vivid landscape painting of a futuristic cityβ–Ί
β—„seed0β–Ί
β—„aspect_ratioautoβ–Ί
β—„image_size1Kβ–Ί
β—„temperature0.70β–Ί
β—„top_p1.00β–Ί
β—„top_k32β–Ί
β—„output_modeIMAGE+TEXTβ–Ί
β—„thinking_levelminimalβ–Ί
β—„include_thoughtsfalseβ–Ί
β—„system_instructionβ–Ί

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, or 4K. 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:1 through 21:9, plus ultrawide 4:1 and 8:1 and an auto default.
  • 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_size on the default 1K, the long edge is 1024. Set it to 4K and 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.
CategoryGoogle AI/Placeholder

Inputs (15)

NameTypeDefaultDescription
modelCOMBOGEMINI_31_FLASH_IMAGE1 options: GEMINI_31_FLASH_IMAGE
promptSTRINGA vivid landscape painting of a futuristic cityβ€”
seedINT00–4294967295β€”
aspect_ratioCOMBOauto13 options: auto, 1:1, 2:3, 3:2, 3:4, 4:1, +7
image_sizeCOMBO1K4 options: 512, 1K, 2K, 4K
temperatureFLOAT0.700–1β€”
top_pFLOAT1.000–1β€”
top_kINT321–64β€”
output_modeCOMBOIMAGE+TEXT2 options: IMAGE+TEXT, IMAGE
image1optIMAGEβ€”
image2optIMAGEβ€”
image3optIMAGEβ€”
thinking_leveloptCOMBOminimal2 options: minimal, High
include_thoughtsoptBOOLEANfalseβ€”
system_instructionoptSTRINGβ€”

Outputs (3)

NameTypeDescription
Placeholder ImageIMAGEβ€”
param_summarySTRINGβ€”
thought_imageIMAGEβ€”