nano-banana-2
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNano 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 -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是谷歌图像生成产品线中的闪存级模型。当迭代速度和可预测构图比极致细节更重要时,选择它。
| 你的需求 | 适用模型 |
|---|---|
| 快速草稿、社交媒体缩略图、批量变体生成 | 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| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 字符串 | 是 | — | 以主体为优先的描述文本。 |
| 整数 | 否 | 1 | 1–4。创意构思阶段建议用4。 |
| 整数 | 否 | 0 | 重复使用可保证结果可复现。 |
| 枚举值 | 否 | | |
| 枚举值 | 否 | | |
| 枚举值 | 否 | | |
| 整数 | 否 | 4 | 1(严格)– 6(宽松)。 |
| 布尔值 | 否 | true | 限制每个提示轮次仅生成一次。 |
| 布尔值 | 否 | 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垂直主视觉:亚麻桌 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 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请求,轮询请求状态,获取结果,并将/的URL下载到指定路径。按会在退出前取消远程请求。
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的单个下载,防止恶意或异常模型输出占满磁盘。