nano-banana-2
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNano 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 -gGoogle Nano Banana 2——Gemini系列中的闪存级文本生成图像模型——托管在RunComfy Model API上。针对构思、社交平台缩略图批量生成和快速草稿进行优化,具备出色的图像内文字渲染能力。
bash
npx skills add agentspace-so/runcomfy-skills --skill nano-banana-2 -gWhen 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 want | Use |
|---|---|
| Rapid drafts, social thumbnails, batch variants | Nano Banana 2 |
| In-image typography with predictable rendering | Nano Banana 2 |
| Web-grounded image (current events / real entities) | Nano Banana 2 + |
| Image edit (preserve subject, swap background) | Nano Banana Edit (sibling skill) |
| Heavy stylization, painterly look | Flux 2 |
| Maximum prompt adherence + multilingual text | GPT Image 2 |
| 2K–4K hero shots, max realism | Seedream 5 |
| Hyperrealistic portrait | Nano 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 + |
| 图像编辑(保留主体,替换背景) | 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
前置条件
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account — opens a browser device-code flow.
runcomfy login - CI / containers — set instead of
RUNCOMFY_TOKEN=<token>.runcomfy login
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy账户 — 会打开浏览器设备码登录流程。
runcomfy login - CI/容器环境 — 设置环境变量替代
RUNCOMFY_TOKEN=<token>。runcomfy login
Endpoints + input schema
端点与输入 schema
google/nano-banana-2/text-to-image
google/nano-banana-2/text-to-imagegoogle/nano-banana-2/text-to-image
google/nano-banana-2/text-to-image| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Subject-first description. |
| int | no | 1 | 1–4. Use 4 for ideation rounds. |
| int | no | 0 | Reuse for reproducibility. |
| enum | no | | |
| enum | no | | |
| enum | no | | |
| int | no | 4 | 1 (strict) – 6 (permissive). |
| bool | no | true | Limit each prompt round to one generation. |
| bool | no | false | Adds web grounding (extra cost + latency). |
For image edit (preserve subject + apply changes), see the sibling skill.
nano-banana-edit| 字段 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| string | 是 | — | 以主体优先的描述文本。 |
| int | 否 | 1 | 1–4。构思阶段建议用4。 |
| int | 否 | 0 | 重复使用可保证结果可复现。 |
| 枚举值 | 否 | | |
| 枚举值 | 否 | | |
| 枚举值 | 否 | | |
| int | 否 | 4 | 1(严格)– 6(宽松)。 |
| bool | 否 | true | 限制每个提示词轮次仅生成一次。 |
| bool | 否 | false | 添加网络关联功能(额外费用 + 延迟)。 |
如需图像编辑(保留主体并应用修改),请查看同类工具。
nano-banana-editHow 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 when iterating a single prompt across small variants — keeps composition stable.
seedWeb-grounding, sparingly. Turn on only when the prompt names current events / real entities. Adds latency + cost; off by default.
enable_web_searchDon'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 case | Why Nano Banana 2 |
|---|---|
| Marketing draft thumbnails (batch of 4) | Fast iteration at 0.5K, then promote winner to 2K |
| Social-platform-native | Wide aspect ratio support including 9:16, 4:5, 21:9 |
| In-image typography for posters / cards | Predictable text rendering when characters are quoted |
| Web-grounded current-event imagery | |
| Reproducible variant testing | Strong seed + consistent framing |
| 使用场景 | 选择Nano Banana 2的原因 |
|---|---|
| 营销草稿缩略图(4图批量) | 0.5K分辨率下快速迭代,再将优选版本升级到2K |
| 适配社交平台原生格式 | 支持多种宽高比,包括9:16、4:5、21:9 |
| 海报/卡片的图像内文字 | 字符加引号时,文字渲染可预测 |
| 关联网络的时事图像 | |
| 可复现的变体测试 | 稳定的种子+一致的构图 |
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 textureBrand-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 lightingVertical 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 endpoint — not this one.
/edit
- 仅支持静态图像。该端点不支持视频生成。
- 每次请求最多生成4张图。
- 网络搜索会增加延迟和成本——仅按需开启。
- 2K/4K分辨率成本更高——除非用户明确要求,默认使用1K。
- 如需图像编辑,请使用端点——而非本端点。
/edit
Exit codes
退出码
| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
Full reference: docs.runcomfy.com/cli/troubleshooting.
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | 无效CLI参数 |
| 65 | 无效输入JSON/schema不匹配 |
| 69 | 上游5xx错误 |
| 75 | 可重试:超时/429 |
| 77 | 未登录或令牌被拒绝 |
How it works
工作原理
The skill invokes with a JSON body matching the schema. The CLI POSTs to , polls the request, fetches the result, and downloads any / URL into . cancels the remote request before exit.
runcomfy run google/nano-banana-2/text-to-imagehttps://model-api.runcomfy.net/v1/models/google/nano-banana-2/text-to-image.runcomfy.net.runcomfy.com--output-dirCtrl-C该工具使用符合schema的JSON体调用。CLI将请求POST到,轮询请求状态,获取结果,并将任何/链接的内容下载到。会在退出前取消远程请求。
runcomfy run google/nano-banana-2/text-to-imagehttps://model-api.runcomfy.net/v1/models/google/nano-banana-2/text-to-image.runcomfy.net.runcomfy.com--output-dirCtrl-CSecurity & Privacy
安全与隐私
- Token storage: writes the API token to
runcomfy loginwith mode 0600 (owner-only read/write). Set~/.config/runcomfy/token.jsonenv var to bypass the file entirely in CI / containers.RUNCOMFY_TOKEN - Input boundary: the user prompt is passed as a JSON string to the CLI via . 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.
--input - 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 (request submission) and
model-api.runcomfy.net/*.runcomfy.net(download whitelist for generated outputs). No telemetry, no callbacks.*.runcomfy.com - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
- 令牌存储:会将API令牌写入
runcomfy login,权限为0600(仅所有者可读写)。在CI/容器环境中,可设置环境变量~/.config/runcomfy/token.json来完全绕过文件存储。RUNCOMFY_TOKEN - 输入边界:用户提示词通过以JSON字符串形式传递给CLI。CLI不会对提示词进行shell展开;会直接通过HTTPS将JSON体传输给Model API。提示词内容不存在shell注入风险。
--input - 第三方内容:你传入的图像/遮罩/视频URL由RunComfy模型服务器获取,而非本地CLI。将外部URL视为不可信;基于图像的提示词注入是所有图像编辑/视频编辑模型的已知风险。
- 出站端点:仅允许(提交请求)和
model-api.runcomfy.net/*.runcomfy.net(生成结果下载白名单)。无遥测,无回调。*.runcomfy.com - 生成文件大小限制:CLI会中止任何超过2 GiB的单个下载,以防止恶意或失控的模型输出填满磁盘。