nanobanana-pro-fallback

Verified·Scanned 2/19/2026

Nano Banana Pro with auto model fallback — generate/edit images via Gemini Image API. Run via: uv run {baseDir}/scripts/generate_image.py --prompt 'desc' --filename 'out.png' [--resolution 1K|2K|4K] [-i input.png]. Supports text-to-image + image-to-image (up to 14); 1K/2K/4K. Fallback chain: gemini-2.5-flash-image → gemini-2.0-flash-exp. MUST use uv run, not python3.

from clawhub.ai·v0.4.4·12.1 KB·0 installs
Scanned from 0.4.4 at 1461ad6 · Transparency log ↗
$ vett add clawhub.ai/yazelin/nanobanana-pro-fallback

🍌 Nano Banana Pro (Fallback Edition)

AI 圖片生成 Agent Skill,支援自動模型切換。

Fork of OpenClaw's nano-banana-pro — same interface, added automatic model fallback.

Features

  • 🔄 Auto Fallbackgemini-2.5-flash-imagegemini-2.0-flash-exp-image-generation
  • 🖼️ Generate — Text-to-image
  • ✏️ Edit — Image-to-image, up to 14 input images
  • 📐 Auto Resolution — Detects optimal resolution from input image size
  • 📦 Zero Config — Just set GEMINI_API_KEY and go

Install

# Via ClawHub
clawhub install nanobanana-pro-fallback

# Or clone directly
git clone https://github.com/yazelin/nanobanana-pro.git

Usage

# Generate
uv run scripts/generate_image.py --prompt "a cat in a garden" --filename "cat.png"

# Edit
uv run scripts/generate_image.py --prompt "make it sunset" --filename "out.png" -i input.png

# Multi-image composition
uv run scripts/generate_image.py --prompt "combine these" --filename "out.png" -i a.png -i b.png

# Resolution options: 1K (default), 2K, 4K
uv run scripts/generate_image.py --prompt "hi-res landscape" --filename "out.png" --resolution 2K

Requirements

  • Python 3.10+
  • uv (auto-installs dependencies)
  • GEMINI_API_KEY environment variable

Configuration

Env VariableDescription
GEMINI_API_KEYGemini API key (required)
NANOBANANA_FALLBACK_MODELSCustom model chain, comma-separated

vs Original

nano-banana-pronanobanana-pro-fallback
ModelFixed gemini-3-pro-image-previewAuto fallback chain
Resolution detectManual onlyAuto from input
ClawHub slugnanobanana-pronanobanana-pro-fallback

License

MIT