nano-banana-2

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nano Banana 2 — Pro Pack on RunComfy

RunComfy上的Nano Banana 2专业套件

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是谷歌图像生成产品线中的闪存级模型。当迭代速度和可预测构图比极致细节更重要时,选择它。
你的需求适用模型
快速草稿、社交媒体缩略图、批量变体生成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
字符串以主体为优先的描述文本。
num_images
整数11–4。创意构思阶段建议用4。
seed
整数0重复使用可保证结果可复现。
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
整数41(严格)– 6(宽松)。
limit_generations
布尔值true限制每个提示轮次仅生成一次。
enable_web_search
布尔值false添加联网关联功能(额外费用+延迟)。
如需图像编辑(保留主体并修改),请查看同系列的
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垂直主视觉:亚麻桌 runner 上放着一个陶瓷茶杯,柔和的晨间侧光,顶部用手绘衬线字体写着大的"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成功
64CLI参数错误
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.
该技能调用
runcomfy run google/nano-banana-2/text-to-image
,传入符合schema的JSON参数。CLI向
https://model-api.runcomfy.net/v1/models/google/nano-banana-2/text-to-image
发送POST请求,轮询请求状态,获取结果,并将
.runcomfy.net
/
.runcomfy.com
的URL下载到
--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的单个下载,防止恶意或异常模型输出占满磁盘。