nano-banana-2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nano Banana 2 — Pro Pack on RunComfy

Nano Banana 2 — RunComfy专业工具包

Google Nano Banana 2 — the flash-tier text-to-image model in the Gemini family — hosted on the RunComfy Model API. Optimized for ideation, social-thumbnail batches, and rapid drafts with strong in-image typography.
bash
npx skills add agentspace-so/runcomfy-skills --skill nano-banana-2 -g
Google Nano Banana 2——Gemini系列中的闪存级文本生成图像模型——托管在RunComfy Model API上。针对构思、社交平台缩略图批量生成和快速草稿进行优化,具备出色的图像内文字渲染能力。
bash
npx skills add agentspace-so/runcomfy-skills --skill nano-banana-2 -g

When to pick this model (vs siblings)

何时选择该模型(对比其他同类模型)

Nano Banana 2 is the flash-tier of the Google image-gen line. Pick it when iteration speed and predictable framing matter more than maximum detail.
You wantUse
Rapid drafts, social thumbnails, batch variantsNano Banana 2
In-image typography with predictable renderingNano Banana 2
Web-grounded image (current events / real entities)Nano Banana 2 +
enable_web_search
Image edit (preserve subject, swap background)Nano Banana Edit (sibling skill)
Heavy stylization, painterly lookFlux 2
Maximum prompt adherence + multilingual textGPT Image 2
2K–4K hero shots, max realismSeedream 5
Hyperrealistic portraitNano Banana Pro
If the user said "Nano Banana" / "nano-banana-2" / "Gemini image" explicitly, route here regardless. If they said "Nano Banana" without specifying 2 vs Pro, default to Pro for portraits and 2 for everything else.
Nano Banana 2是Google图像生成产品线中的闪存级模型。当迭代速度和可预测构图比极致细节更重要时,选择它。
需求场景适用模型
快速草稿、社交缩略图、批量变体生成Nano Banana 2
可预测渲染的图像内文字Nano Banana 2
关联网络的图像(时事/真实实体)Nano Banana 2 +
enable_web_search
图像编辑(保留主体,替换背景)Nano Banana Edit(同类工具)
重度风格化、绘画质感Flux 2
最高提示词契合度 + 多语言文字GPT Image 2
2K–4K主视觉图、极致写实Seedream 5
超写实肖像Nano Banana Pro
如果用户明确提及"Nano Banana" / "nano-banana-2" / "Gemini image",无论其他情况都使用该模型。如果用户只说"Nano Banana"未指定2还是Pro,默认肖像类用Pro,其他场景用2

Prerequisites

前置条件

  1. RunComfy CLI
    npm i -g @runcomfy/cli
  2. RunComfy account
    runcomfy login
    opens a browser device-code flow.
  3. CI / containers — set
    RUNCOMFY_TOKEN=<token>
    instead of
    runcomfy login
    .
  1. RunComfy CLI
    npm i -g @runcomfy/cli
  2. RunComfy账户
    runcomfy login
    会打开浏览器设备码登录流程。
  3. CI/容器环境 — 设置环境变量
    RUNCOMFY_TOKEN=<token>
    替代
    runcomfy login

Endpoints + input schema

端点与输入 schema

google/nano-banana-2/text-to-image

google/nano-banana-2/text-to-image

FieldTypeRequiredDefaultNotes
prompt
stringyesSubject-first description.
num_images
intno11–4. Use 4 for ideation rounds.
seed
intno0Reuse for reproducibility.
aspect_ratio
enumno
auto
auto
,
21:9
,
16:9
,
3:2
,
4:3
,
5:4
,
1:1
,
4:5
,
3:4
,
2:3
,
9:16
.
resolution
enumno
1K
0.5K
(drafts),
1K
(default),
2K
(final),
4K
(max).
output_format
enumno
png
png
,
jpeg
,
webp
.
safety_tolerance
intno41 (strict) – 6 (permissive).
limit_generations
boolnotrueLimit each prompt round to one generation.
enable_web_search
boolnofalseAdds web grounding (extra cost + latency).
For image edit (preserve subject + apply changes), see the sibling
nano-banana-edit
skill.
字段类型是否必填默认值说明
prompt
string以主体优先的描述文本。
num_images
int11–4。构思阶段建议用4。
seed
int0重复使用可保证结果可复现。
aspect_ratio
枚举值
auto
auto
,
21:9
,
16:9
,
3:2
,
4:3
,
5:4
,
1:1
,
4:5
,
3:4
,
2:3
,
9:16
resolution
枚举值
1K
0.5K
(草稿),
1K
(默认),
2K
(终稿),
4K
(最高)。
output_format
枚举值
png
png
,
jpeg
,
webp
safety_tolerance
int41(严格)– 6(宽松)。
limit_generations
booltrue限制每个提示词轮次仅生成一次。
enable_web_search
boolfalse添加网络关联功能(额外费用 + 延迟)。
如需图像编辑(保留主体并应用修改),请查看同类工具
nano-banana-edit

How to invoke

调用方式

Default draft (1K, square, png):
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{"prompt": "<user prompt>"}' \
  --output-dir <absolute/path>
Vertical 4-up batch for ideation:
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<user prompt>",
    "num_images": 4,
    "aspect_ratio": "9:16",
    "resolution": "0.5K"
  }' \
  --output-dir <absolute/path>
Final at 2K with seed lock:
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<user prompt>",
    "resolution": "2K",
    "aspect_ratio": "16:9",
    "seed": 42
  }' \
  --output-dir <absolute/path>
Web-grounded (current event / real entity):
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<prompt referencing a real-world event from this week>",
    "enable_web_search": true
  }' \
  --output-dir <absolute/path>
默认草稿(1K,正方形,png格式):
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{"prompt": "<用户提示词>"}' \
  --output-dir <绝对路径>
用于构思的垂直4图批量生成:
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<用户提示词>",
    "num_images": 4,
    "aspect_ratio": "9:16",
    "resolution": "0.5K"
  }' \
  --output-dir <绝对路径>
锁定种子的2K终稿:
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<用户提示词>",
    "resolution": "2K",
    "aspect_ratio": "16:9",
    "seed": 42
  }' \
  --output-dir <绝对路径>
关联网络的图像(时事/真实实体):
bash
runcomfy run google/nano-banana-2/text-to-image \
  --input '{
    "prompt": "<引用本周现实事件的提示词>",
    "enable_web_search": true
  }' \
  --output-dir <绝对路径>

Prompting — what actually works

提示词技巧——有效的方法

Subject-first declarative grammar. "A cinematic close-up portrait of an American woman standing under neon lights in rainy Tokyo, shallow depth of field, reflective wet streets, ultra-detailed, realistic skin texture" — primary subject, then action, environment, style, camera. Front-load subject; trail with directives.
Exact text quoting for in-image typography. "The label reads 'AURA' in clean bold sans-serif, centered, white on black" — quote the literal characters. Specify placement and font style. Don't say "with the brand name on it" and hope.
Consistent seeds for refinement. Lock
seed
when iterating a single prompt across small variants — keeps composition stable.
Web-grounding, sparingly. Turn on
enable_web_search
only when the prompt names current events / real entities. Adds latency + cost; off by default.
Don't conflict styles. "minimalist + ornate + retro + cyberpunk" cancels. Pick 1–2 anchors.
Anti-patterns:
  • Trying to verbally describe a stable subject identity — use the edit endpoint with image refs instead.
  • Asking for resolutions outside the 4 tiers → 422.
  • Aspect ratios outside the 11 supported values → 422.
  • Non-quoted in-image text → unpredictable rendering.
主体优先的陈述性语法。例如:“一位美国女性站在东京雨夜的霓虹灯下的电影感特写肖像,浅景深,反光的湿街道,超细节,真实皮肤纹理”——先讲主体,再讲动作、环境、风格、镜头。主体前置,指令后置。
图像内文字用精确引号包裹。例如:“标签上用干净粗体无衬线字体写着‘AURA’,居中,黑底白字”——把实际字符用引号括起来。指定位置和字体样式。不要只说“上面有品牌名称”来碰运气。
用固定种子来优化细节。当对单个提示词进行小变体迭代时,锁定
seed
——保持构图稳定。
谨慎使用网络关联。仅当提示词涉及时事/真实实体时开启
enable_web_search
。会增加延迟和成本;默认关闭。
不要混合冲突风格。“极简+华丽+复古+赛博朋克”会相互抵消。选择1-2种核心风格。
反模式:
  • 试图用文字描述稳定的主体特征——改用带图像引用的编辑端点。
  • 请求超出4个层级的分辨率→返回422错误。
  • 使用11种支持比例之外的宽高比→返回422错误。
  • 未加引号的图像内文字→渲染结果不可预测。

Where it shines

优势场景

Use caseWhy Nano Banana 2
Marketing draft thumbnails (batch of 4)Fast iteration at 0.5K, then promote winner to 2K
Social-platform-nativeWide aspect ratio support including 9:16, 4:5, 21:9
In-image typography for posters / cardsPredictable text rendering when characters are quoted
Web-grounded current-event imagery
enable_web_search
integrates fresh info
Reproducible variant testingStrong seed + consistent framing
使用场景选择Nano Banana 2的原因
营销草稿缩略图(4图批量)0.5K分辨率下快速迭代,再将优选版本升级到2K
适配社交平台原生格式支持多种宽高比,包括9:16、4:5、21:9
海报/卡片的图像内文字字符加引号时,文字渲染可预测
关联网络的时事图像
enable_web_search
集成最新信息
可复现的变体测试稳定的种子+一致的构图

Sample prompts (verified to produce strong results)

验证有效的示例提示词

Cinematic portrait (page example):
A cinematic close-up portrait of an American woman standing under neon
lights in rainy Tokyo, shallow depth of field, reflective wet streets,
ultra-detailed, realistic skin texture
Brand-asset card with quoted text:
A minimalist 16:9 product card: a matte black ceramic mug centered on a
soft warm-grey paper background, rim highlight from upper-left, the
headline "Brewed Quietly" in clean bold sans-serif top-right, balanced
negative space below, e-commerce ready, clean studio lighting
Vertical platform-native:
A 9:16 vertical hero for a wellness brand: a single ceramic teacup on a
linen runner, soft morning side-light, the words "Slow Down" in
hand-drawn serif large at the top, gentle steam rising, neutral color
palette, uncluttered
电影感肖像(页面示例):
一位美国女性站在东京雨夜的霓虹灯下的电影感特写肖像,
浅景深,反光的湿街道,超细节,真实皮肤纹理
带引用文字的品牌资产卡片:
一个极简16:9产品卡片:哑光黑色陶瓷马克杯居中放在
柔和暖灰色纸张背景上,左上角的边缘高光,右上角用干净粗体无衬线字体呈现标题“Brewed Quietly”,下方留白均衡,适合电商,干净的工作室灯光
垂直平台原生图:
一个健康品牌的9:16垂直主视觉图:亚麻桌布上放着一个陶瓷茶杯,
柔和的晨间侧光,顶部用手绘衬线字体展示大字号文字“Slow Down”,轻柔的蒸汽升起,中性色调,简洁整洁

Limitations

局限性

  • Still images only. No video on this endpoint.
  • Max 4 outputs per request.
  • Web search adds latency + cost — only enable on demand.
  • 2K / 4K cost more — default to 1K unless user asked for higher.
  • For image edit, use the
    /edit
    endpoint
    — not this one.
  • 仅支持静态图像。该端点不支持视频生成。
  • 每次请求最多生成4张图
  • 网络搜索会增加延迟和成本——仅按需开启。
  • 2K/4K分辨率成本更高——除非用户明确要求,默认使用1K。
  • 如需图像编辑,请使用
    /edit
    端点
    ——而非本端点。

Exit codes

退出码

codemeaning
0success
64bad CLI args
65bad input JSON / schema mismatch
69upstream 5xx
75retryable: timeout / 429
77not signed in or token rejected
代码含义
0成功
64无效CLI参数
65无效输入JSON/schema不匹配
69上游5xx错误
75可重试:超时/429
77未登录或令牌被拒绝

How it works

工作原理

The skill invokes
runcomfy run google/nano-banana-2/text-to-image
with a JSON body matching the schema. The CLI POSTs to
https://model-api.runcomfy.net/v1/models/google/nano-banana-2/text-to-image
, polls the request, fetches the result, and downloads any
.runcomfy.net
/
.runcomfy.com
URL into
--output-dir
.
Ctrl-C
cancels the remote request before exit.
该工具使用符合schema的JSON体调用
runcomfy run google/nano-banana-2/text-to-image
。CLI将请求POST到
https://model-api.runcomfy.net/v1/models/google/nano-banana-2/text-to-image
,轮询请求状态,获取结果,并将任何
.runcomfy.net
/
.runcomfy.com
链接的内容下载到
--output-dir
Ctrl-C
会在退出前取消远程请求。

Security & Privacy

安全与隐私

  • Token storage:
    runcomfy login
    writes the API token to
    ~/.config/runcomfy/token.json
    with mode 0600 (owner-only read/write). Set
    RUNCOMFY_TOKEN
    env var to bypass the file entirely in CI / containers.
  • Input boundary: the user prompt is passed as a JSON string to the CLI via
    --input
    . The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content.
  • Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
  • Outbound endpoints: only
    model-api.runcomfy.net
    (request submission) and
    *.runcomfy.net
    /
    *.runcomfy.com
    (download whitelist for generated outputs). No telemetry, no callbacks.
  • Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
  • 令牌存储
    runcomfy login
    会将API令牌写入
    ~/.config/runcomfy/token.json
    ,权限为0600(仅所有者可读写)。在CI/容器环境中,可设置环境变量
    RUNCOMFY_TOKEN
    来完全绕过文件存储。
  • 输入边界:用户提示词通过
    --input
    以JSON字符串形式传递给CLI。CLI不会对提示词进行shell展开;会直接通过HTTPS将JSON体传输给Model API。提示词内容不存在shell注入风险。
  • 第三方内容:你传入的图像/遮罩/视频URL由RunComfy模型服务器获取,而非本地CLI。将外部URL视为不可信;基于图像的提示词注入是所有图像编辑/视频编辑模型的已知风险。
  • 出站端点:仅允许
    model-api.runcomfy.net
    (提交请求)和
    *.runcomfy.net
    /
    *.runcomfy.com
    (生成结果下载白名单)。无遥测,无回调。
  • 生成文件大小限制:CLI会中止任何超过2 GiB的单个下载,以防止恶意或失控的模型输出填满磁盘。