单图精准编辑,保真焕新
简介
Flux 1 Kontext Pro 单图精准编辑模型,专为高精度局部修改与身份保留设计,支持单指令快速迭代,适合品牌资产与人物精修场景。
原始描述
Edit images with Flux 1 Kontext Pro (Black Forest Labs' precise local image-edit model) on RunComfy — bundled with the model's documented prompting patterns...
通过你的 Agent 添加
安装目录:flux-kontext/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Flux Kontext Pro 是 Black Forest Labs 推出的单参考、单指令精准图像编辑模型,通过 RunComfy CLI 调用 blackforestlabs/flux-1-kontext/pro/edit 端点实现。其工作流极简:上传一张源图,输入一条声明式编辑指令(如"She is now holding an orange umbrella and smiling"),即可获得高保真输出。
关键特性:
- 单图输入:仅支持一张源图(对比 Nano Banana Edit 的 1-20 张)
- 声明式指令:最佳实践是单条祈使句,避免复合指令
- 前置保留语言:以"Keep [元素] unchanged"开头,明确标识需保留的内容
- 种子复现:通过 seed 参数生成可控变体序列
显著优点
- 身份保留能力突出:在明确指令下,人物面部、姿态、服装等核心特征保持稳定
- 单指令响应精准:针对"替换标签文字""添加道具"等局部修改场景,首试成功率极高
- 工作流极简:无需复杂参数调优,适合快速迭代
- 品牌友好:文本替换、颜色调整等资产级编辑表现可靠
潜在局限与风险
局限
说明
单图限制
不支持多图批量处理,需转向 Nano Banana Edit
复合指令漂移
"改A且加B并删C"类长句易失控,建议拆分为顺序单指令
多语言文本编辑弱
嵌入式文字修改建议改用 GPT Image 2 edit
文档覆盖不全
除 prompt/image/aspect_ratio/seed 外,其他字段需查阅模型页面确认
适合人群
- 品牌设计师:产品图局部调整、标签文字替换
- 电商运营:模特图快速道具添加/背景微调
- 内容创作者:人物肖像精修、风格一致性保持
- AI 工作流搭建者:需与 Nano Banana Edit、Flux 2 Klein 等模型做路由决策的场景
常规风险
- 模型误路由:用户明确说"Flux Kontext"时不可擅自替换为其他模型
- 提示词意图篡改:仅可调整语序为"保留优先"结构,不可改变编辑目标
- 多图误传:若用户上传多张图,需确认主图或路由至支持多图的模型
- CLI 凭证安全:token 存储于
~/.config/runcomfy/token.json,需确保文件权限为 060
| 局限 | 说明 |
|---|---|
| 单图限制 | 不支持多图批量处理,需转向 Nano Banana Edit |
| 复合指令漂移 | "改A且加B并删C"类长句易失控,建议拆分为顺序单指令 |
| 多语言文本编辑弱 | 嵌入式文字修改建议改用 GPT Image 2 edit |
| 文档覆盖不全 | 除 prompt/image/aspect_ratio/seed 外,其他字段需查阅模型页面确认 |
适合人群
- 品牌设计师:产品图局部调整、标签文字替换
- 电商运营:模特图快速道具添加/背景微调
- 内容创作者:人物肖像精修、风格一致性保持
- AI 工作流搭建者:需与 Nano Banana Edit、Flux 2 Klein 等模型做路由决策的场景
常规风险
- 模型误路由:用户明确说"Flux Kontext"时不可擅自替换为其他模型
- 提示词意图篡改:仅可调整语序为"保留优先"结构,不可改变编辑目标
- 多图误传:若用户上传多张图,需确认主图或路由至支持多图的模型
- CLI 凭证安全:token 存储于
~/.config/runcomfy/token.json,需确保文件权限为 060
- 模型误路由:用户明确说"Flux Kontext"时不可擅自替换为其他模型
- 提示词意图篡改:仅可调整语序为"保留优先"结构,不可改变编辑目标
- 多图误传:若用户上传多张图,需确认主图或路由至支持多图的模型
- CLI 凭证安全:token 存储于
~/.config/runcomfy/token.json,需确保文件权限为 060
技能正文
name: flux-kontext
displayName: "🎨 Flux Kontext Pro — Pro Pack on RunComfy"
description: >
Edit images with Flux 1 Kontext Pro (Black Forest Labs' precise local
image-edit model) on RunComfy — bundled with the model's documented
prompting patterns so the agent gets sharper output than naive
prompting against the same model. Knows Flux Kontext's strengths
(single-reference precise local edits, strong prompt control,
consistent high-fidelity outputs), the schema (single image + prompt),
and when to route to Nano Banana Edit / GPT Image 2 edit / Flux 2
Klein instead. Calls
runcomfy run blackforestlabs/flux-1-kontext/pro/edit through the
local RunComfy CLI. Triggers on "flux kontext", "flux-kontext",
"flux 1 kontext", "kontext", "BFL kontext", or any explicit ask to
edit with this model.
emoji: "🎨"
homepage: https://www.runcomfy.com
license: MIT
🎨 Flux Kontext Pro — Pro Pack on RunComfy
runcomfy.com · docs · Model page
Black Forest Labs' Flux 1 Kontext Pro — single-reference precise local image edit — hosted on the RunComfy Model API. Strong prompt control, consistent outputs, high fidelity.
This skill bundles the model's documented prompting patterns — single-shot edit instruction, preservation language, sibling-routing — so the agent gets the model's strongest output on the first or second try, instead of burning credits on prompts the model wasn't going to nail.
Why this skill (vs calling the model raw)
Flux Kontext is the single-reference, single-shot precise edit model. Pick a target image, write one clear edit instruction, get a high-fidelity result. This skill packs that model knowledge in:
- Single image input — Kontext takes ONE source image (vs. Nano Banana Edit's 1–20). Use it when the edit is a focused single-image transformation, not a batch operation.
- One clean instruction — Kontext is at its best with one declarative edit ("She is now holding an orange umbrella and smiling"). Long compound instructions drift; split them.
- Preservation language still applies —
"Keep the person's face and pose unchanged. Add an orange umbrella in her left hand and a slight smile."Lead with what stays. - Aspect ratio enum — pick from the supported list; out-of-list gets cropped or 422'd.
- Sibling routing — when Flux Kontext wins (single-shot precise local edit, high-fidelity preservation) vs when Nano Banana Edit / GPT Image 2 edit / Flux 2 Klein beat it (batch edits up to 20, multilingual text editing, generating new compositions).
The agent calling this skill gets the model's strongest output on the first or second try — same model, sharper result.
When to pick this model (vs siblings)
You want
Use
Single-image precise local edit ("she's now holding X")
Flux Kontext ✓
High-fidelity preservation of source identity
Flux Kontext ✓
Batch edits across 1–20 images
Nano Banana Edit
Edit multilingual / embedded text in image
GPT Image 2 edit
Generate from scratch, no source image
Flux 2 Klein
| You want | Use |
|---|---|
| Single-image precise local edit ("she's now holding X") | Flux Kontext ✓ |
| High-fidelity preservation of source identity | Flux Kontext ✓ |
| Batch edits across 1–20 images | Nano Banana Edit |
| Edit multilingual / embedded text in image | GPT Image 2 edit |
| Generate from scratch, no source image | Flux 2 Klein |
If the user said "Flux Kontext" / "kontext" / "BFL Kontext" explicitly, route here regardless.
Prerequisites
- RunComfy CLI —
npm i -g @runcomfy/cli or curl -fsSL https://runcomfy.com/install.sh | sh
- RunComfy account —
runcomfy login opens a browser device-code flow.
- CI / containers — set
RUNCOMFY_TOKEN=<token> instead of runcomfy login.
Endpoints + input schema
blackforestlabs/flux-1-kontext/pro/edit
Field
Type
Required
Default
Notes
prompt
string
yes
—
Single declarative edit instruction.
image
string
yes
—
Single source image URL (publicly fetchable HTTPS).
aspect_ratio
enum
no
(input)
Pick from supported W:H options on the model page.
seed
int
no
—
Reuse for variant comparisons.
npm i -g @runcomfy/cli or curl -fsSL https://runcomfy.com/install.sh | shruncomfy login opens a browser device-code flow.RUNCOMFY_TOKEN=<token> instead of runcomfy login.blackforestlabs/flux-1-kontext/pro/edit
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prompt |
string | yes | — | Single declarative edit instruction. |
image |
string | yes | — | Single source image URL (publicly fetchable HTTPS). |
aspect_ratio |
enum | no | (input) | Pick from supported W:H options on the model page. |
seed |
int | no | — | Reuse for variant comparisons. |
The schema is intentionally minimal — Kontext leans on prompt + single ref. For multi-image or web-grounded edits, route to Nano Banana Edit.
How to invoke
Default — local edit, preserve everything else:
runcomfy run blackforestlabs/flux-1-kontext/pro/edit \
--input '{
"prompt": "Keep the person'\''s face, pose, and clothing unchanged. Add an orange umbrella in her left hand and a slight smile.",
"image": "https://.../portrait.jpg"
}' \
--output-dir <absolute/path>
With seed for reproducible variant series:
runcomfy run blackforestlabs/flux-1-kontext/pro/edit \
--input '{
"prompt": "Keep the bottle, label, and lighting unchanged. Replace the brand text on the label from \"ALPHA\" to \"AURA\".",
"image": "https://.../bottle.jpg",
"seed": 42
}' \
--output-dir <absolute/path>
Prompting — what actually works
One declarative instruction. Kontext shines on prompts shaped like the docs example: "She is now holding an orange umbrella and smiling". Imperative mood, single change.
Preservation first. Lead with "Keep [identity / pose / framing / brand] unchanged." Then the change. Models honor what's stated up front.
Single ref only — pick the right one. No multi-image fanout here. If you have multiple references, decide which is primary and pass that one. For multi-image flows, route to Nano Banana Edit.
Iterate on small changes. If Kontext drifts, split a compound edit into sequential single-instruction passes (pass 1: change background, pass 2: change clothing).
Aspect ratio — pick from the supported enum. Out-of-list values 422 or crop.
Anti-patterns:
- Compound prompts ("change A and add B and remove C") → drift.
- Trying to fan out to multiple source images → wrong model (use Nano Banana Edit).
- Prompts written in passive voice → less reliable.
- Asking for novel composition without a source image → wrong model (use Flux 2 Klein t2i).
Where it shines
Use case
Why Flux Kontext
Single-shot precise local edit
Specifically designed for this; high fidelity
Preserve source identity through targeted change
Strong preservation under explicit instruction
Brand-asset text or color swap
Quoted text + preservation lead-in works well
Quick iteration on one image
Short prompts + single ref = fast result loop
Sample prompts (verified to produce strong results)
| Use case | Why Flux Kontext |
|---|---|
| Single-shot precise local edit | Specifically designed for this; high fidelity |
| Preserve source identity through targeted change | Strong preservation under explicit instruction |
| Brand-asset text or color swap | Quoted text + preservation lead-in works well |
| Quick iteration on one image | Short prompts + single ref = fast result loop |
Page example:
She is now holding an orange umbrella and smiling
Preservation-led brand edit:
Keep the bottle silhouette, table, and lighting exactly as in the input.
Replace only the brand text on the label, from "ALPHA" to "AURA".
Same font weight, white on black, centered.
Compositional micro-edit:
Keep the person's face, pose, and clothing unchanged. Add a leather
shoulder bag, dark brown, hanging on the right shoulder.
Default behavior for the calling agent
- Single image only. If the user provides multiple sources, ask which is primary or route to Nano Banana Edit.
- Lead with preservation. Rewrite the user's edit request to start with
"Keep [unchanged elements]" followed by the change.
- Pick
aspect_ratio carefully. If unspecified, omit (preserves input). If specified, use a supported value.
- Always pass
--output-dir. Deliver the file.
Hard constraints
- Don't switch models without permission. If user said "Flux Kontext", don't substitute Nano Banana Edit, GPT Image 2 edit, or Flux 2 Klein.
- Don't rewrite the prompt's INTENT — you may rewrite for preservation-first ordering only.
- Don't pass multiple
image values — single ref only.
Limitations
- Single source image only. For multi-image flows, use Nano Banana Edit (1–20).
- Public RunComfy docs are minimal — schema fields beyond prompt + image + aspect_ratio + seed may exist; check the model page for the latest field list.
- Compound prompts drift — split into sequential passes.
- For multilingual / embedded text editing, GPT Image 2 edit usually wins.
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
"Keep [unchanged elements]" followed by the change.aspect_ratio carefully. If unspecified, omit (preserves input). If specified, use a supported value.--output-dir. Deliver the file.- Don't switch models without permission. If user said "Flux Kontext", don't substitute Nano Banana Edit, GPT Image 2 edit, or Flux 2 Klein.
- Don't rewrite the prompt's INTENT — you may rewrite for preservation-first ordering only.
- Don't pass multiple
imagevalues — single ref only.
Limitations
- Single source image only. For multi-image flows, use Nano Banana Edit (1–20).
- Public RunComfy docs are minimal — schema fields beyond prompt + image + aspect_ratio + seed may exist; check the model page for the latest field list.
- Compound prompts drift — split into sequential passes.
- For multilingual / embedded text editing, GPT Image 2 edit usually wins.
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
| 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.
How it works
The skill invokes runcomfy run blackforestlabs/flux-1-kontext/pro/edit with a JSON body matching the schema. The CLI POSTs to https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-1-kontext/pro/edit, 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.
Security & Privacy
- This skill only invokes the
runcomfy CLI. No other endpoints, no telemetry, no callbacks.
- The token saved by
runcomfy login lives at ~/.config/runcomfy/token.json (mode 0600).
- Auto-download is restricted to
*.runcomfy.net / *.runcomfy.com — a compromised model cannot trick the CLI into pulling arbitrary internet content.
runcomfy CLI. No other endpoints, no telemetry, no callbacks.runcomfy login lives at ~/.config/runcomfy/token.json (mode 0600).*.runcomfy.net / *.runcomfy.com — a compromised model cannot trick the CLI into pulling arbitrary internet content.正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。