Flux Kontext Pro — Pro Pack on RunComfy

作者 prime-skillsfca19ae084c2MIT收錄於 2026年10月8日更新於 2026年10月8日

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 skill gets sharper output than naive prompting against the same model. Documents 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.

僅含說明Design & Creative
AI 產生的概覽

指導透過 RunComfy CLI 使用 Flux 1 Kontext Pro 模型進行影像編輯,包含提示詞模式與模型選擇建議。

功能
此技能說明如何在 RunComfy 上執行 Flux 1 Kontext Pro 影像編輯模型,涵蓋輸入結構(提示詞、影像、長寬比、隨機種子)、CLI 呼叫範例,以及用於精確局部編輯的提示詞寫法。它也說明何時應改用 Nano Banana Edit、GPT Image 2 edit 或 Flux 2 Klein 等同類模型,並列出限制、結束碼與安全說明。產出為下載到指定輸出目錄的編輯後影像。
適用情境
當需要對單張來源影像做精確局部編輯時使用,例如加入物件、修改標籤文字,或在保留人物身分、姿態或光線的前提下更換顏色。當使用者明確提到 Flux Kontext、kontext 或 BFL Kontext 時也適用。對於多圖批次處理、影像內多語言文字編輯或無來源影像的生成任務,此技能會引導改用其他模型。
執行需求
需要透過 npm 全域安裝 RunComfy CLI,並擁有 RunComfy 帳號,可透過瀏覽器裝置碼登入,或在 CI 與容器中設定 RUNCOMFY_TOKEN 環境變數完成驗證。需要連線至 RunComfy 模型 API 與輸出下載端點的網路存取,以及可公開取得的 HTTPS 來源影像網址。此技能僅包含說明文件,不附帶指令碼。

Flux Kontext Pro — Pro Pack on RunComfy

runcomfy.com · Model page · GitHub

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.

bash
npx skills add agentspace-so/runcomfy-skills --skill flux-kontext -g

When to pick this model (vs siblings)

You wantUse
Single-image precise local edit ("she's now holding X")Flux Kontext
High-fidelity preservation of source identityFlux Kontext
Batch edits across 1–20 imagesNano Banana Edit
Edit multilingual / embedded text in imageGPT Image 2 edit
Generate from scratch, no source imageFlux 2 Klein

If the user said "Flux Kontext" / "kontext" / "BFL Kontext" explicitly, route here regardless.

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.

Endpoints + input schema

blackforestlabs/flux-1-kontext/pro/edit

FieldTypeRequiredDefaultNotes
promptstringyes—Single declarative edit instruction.
imagestringyes—Single source image URL (publicly fetchable HTTPS).
aspect_ratioenumno(input)Pick from supported W:H options on the model page.
seedintno—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:

bash
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:

bash
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 caseWhy Flux Kontext
Single-shot precise local editSpecifically designed for this; high fidelity
Preserve source identity through targeted changeStrong preservation under explicit instruction
Brand-asset text or color swapQuoted text + preservation lead-in works well
Quick iteration on one imageShort prompts + single ref = fast result loop

Sample prompts (verified to produce strong results)

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 leathershoulder bag, dark brown, hanging on the right shoulder.

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

codemeaning
0success
64bad CLI args
65bad input JSON / schema mismatch
69upstream 5xx
75retryable: timeout / 429
77not 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

  • 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.

來源與署名

來源:prime-skills/runcomfy-agent-skills位於flux-kontext提交fca19ae

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 prime-skills/runcomfy-agent-skills 的技能

Wan 2.7 — Pro Pack on RunComfy

prime-skills

Generate text-to-video with Wan 2.7 (Wan-AI's flagship motion model) on RunComfy. Documents Wan 2.7's strengths (multi-reference conditioning, audio-driven lip-sync via `audio_url`, smoother transitions, prompt expansion), the duration / resolution / aspect-ratio schema, and when to route to HappyHorse 1.0 / Seedance 2.0 / Kling / LTX 2 instead. Calls `runcomfy run wan-ai/wan-2-7/text-to-video` through the local RunComfy CLI. Triggers on "wan", "wan 2.7", "wan-2-7", "wan video", or any explicit ask to generate video with this model.

待分類2026年10月8日

Video Edit — Pro Pack on RunComfy

prime-skills

把影片編輯需求路由到三個 RunComfy 影片模型之一,並透過 RunComfy CLI 呼叫。

Design & Creative2026年10月8日

Seedance 2.0 Pro — Pro Pack on RunComfy

prime-skills

指導透過 RunComfy CLI 使用位元組跳動 Seedance 2.0 Pro 生成電影感短影音。

Design & Creative2026年10月8日

Nano Banana Edit — Pro Pack on RunComfy

prime-skills

指導透過 RunComfy CLI 使用 Google Nano Banana 2 進行圖生圖編輯。

Design & Creative2026年10月8日

Nano Banana 2 — Pro Pack on RunComfy

prime-skills

Generate images with Google Nano Banana 2 (Gemini-family flash-tier text-to-image) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Nano Banana 2's strengths (rapid iteration, in-image typography rendering, predictable framing, optional web-grounded context), the resolution-tier pricing, the safety-tolerance dial, and when to route to Nano Banana Pro / GPT Image 2 / Flux 2 / Seedream instead. Calls `runcomfy run google/nano-banana-2/text-to-image` through the local RunComfy CLI. Triggers on "nano banana", "nano-banana-2", "nano banana 2", "google image gen", "gemini image", or any explicit ask to generate with this model.

待分類2026年10月8日

Image-to-Video — Pro Pack on RunComfy

prime-skills

將圖生影片請求路由到合適的 RunComfy 模型,並透過 RunComfy CLI 呼叫。

Design & Creative2026年10月8日