flux-kontext

作成者: agentspace-so

RunComfy上でFlux 1 Kontext Pro(Black Forest Labsの高精度ローカル画像編集モデル)を使用して画像を編集します。このスキルには、モデルのドキュメント化されたプロンプトパターンがバンドルされており、同じモデルを単純にプロンプトするよりもシャープな出力が得られます。Flux Kontextの強み(単一参照による高精度ローカル編集、強力なプロンプト制御、一貫した高忠実度出力)、スキーマ(単一画像+プロンプト)、およびNano Banana Edit / GPT Image 2 edit / Flux 2 Kleinにルーティングするタイミングを文書化しています。呼び出し...

npx skills add https://github.com/agentspace-so/runcomfy-agent-skills --skill flux-kontext

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.

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 CLInpm i -g @runcomfy/cli
  2. RunComfy accountruncomfy 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
promptstringyesSingle declarative edit instruction.
imagestringyesSingle source image URL (publicly fetchable HTTPS).
aspect_ratioenumno(input)Pick from supported W:H options on the model page.
seedintnoReuse 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 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 leather
shoulder 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.

agentspace-soのその他のスキル

ai-avatar-video
agentspace-so
Create AI avatar, talking-head, and lip-sync videos on RunComfy via the `runcomfy` CLI. Routes across ByteDance OmniHuman (audio-driven full-body avatar), Wan-AI Wan 2-7 (audio-driven mouth sync via `audio_url` on a portrait), HappyHorse 1.0 (Arena #1 t2v / i2v with in-pass audio), and Seedance v2 Pro (multi-modal cinematic with reference audio + reference subject). Picks the right model for the user's actual intent — UGC voiceover, virtual presenter, dubbed product demo, lip-synced...
videocreativemedia
ai-music
agentspace-so
We need to translate the given text from English to Japanese. The text describes an agent skill for generating AI music via RunComfy CLI. It mentions specific product names: RunComfy, ElevenLabs AI Music Generation, ACE Step, ACE Step 1.5, StepFun-AI. Also technical terms like CLI, premium 44.1 kHz stereo vocal tracks, time range, audio-inpaint, audio-outpaint. We must preserve those names and terms. The text ends with "Picks the right..." which is incomplete. We should translate the entire provided text as is, including the incomplete part. We need to output only the translation, no extra commentary. The target language is Japanese. We'll write in natural Japanese, keeping the product names in English (or as they appear). For "RunComfy" and "CLI", we can keep as is. For "ElevenLabs AI Music Generation" - keep as is. For "ACE Step / ACE Step 1.5" - keep as is. For "StepFun-AI" -
creativeaudioapi
video-edit
agentspace-so
RunComfy上の既存動画を編集します。このスキルはスマートルーターであり、ユーザーの意図をRunComfyカタログ内の適切な編集モデルにマッチングします。Wan 2.7 Edit-Video(一般的なリスタイル、背景交換、パッケージ交換、アイデンティティ+モーション保持)、Kling 2.6 Pro Motion Control(参照動画からターゲットキャラクターへの正確なモーション転送)、またはLucy Edit Restyle(軽量なアイデンティティ安定リスタイル、衣装交換)を選択します。各モデルの文書化されたプロンプトパターンをバンドルして、スキルが…
videocreativemedia
relight
agentspace-so
Relight a still image — change the lighting setup, color temperature, direction, or mood — on RunComfy via the `runcomfy` CLI. Routes to Qwen Edit 2509's dedicated `relight` LoRA endpoint for purpose-built relighting, with fallback to identity-preserving edit endpoints (Nano Banana 2 Edit, GPT Image 2 Edit, FLUX Kontext Pro) when prose lighting language is enough. Use for product relighting (studio softbox → window light), portrait mood shift (overcast → golden hour), or color-grade change....
creativeimagemedia
kling-3-0
agentspace-so
RunComfy上のKling 3.0動画生成。Kling 3.0(Kling V3.0とも呼ばれる)は、快手科技の第3世代マルチショット動画モデルで、ネイティブ同期オーディオとショット間で一貫したキャラクター同一性を備えています。このスキルは、3つのレンダリングティア(Standard、Pro、4K)と2つのモード(テキストから動画、画像から動画)にわたる、全6つのKling 3.0エンドポイントをカバーします。ローカルのRunComfy CLIを通じて、runcomfy run kling/kling-3.0/ / を呼び出します。"kling"、"kling 3.0"、"kling v3"、"kling pro"、...でトリガーされます。
creativevideomedia
runcomfy-cli
agentspace-so
We need to translate the given English text into Japanese. The text describes a CLI tool called runcomfy-cli. The instruction says to preserve the name "runcomfy-cli" but only if it appears in the source text. The source text mentions "runcomfy" and "runcomfy CLI" but not "runcomfy-cli" exactly. However, the directory item type is "agent skill" and the name to preserve is "runcomfy-cli". The instruction says "Do not include the name unless it appears in the source text." The source text has "runcomfy" and "runcomfy CLI", not "runcomfy-cli". So we should not add "runcomfy-cli" if it's not there. But the instruction says "Name to preserve: runcomfy-cli" and "Translate only the text inside <text>. Do not include the name unless it appears in the source text." So we only translate the text inside <text>. The text inside <text> includes "runcomfy" and
creativemediaapi
happyhorse-1-0
agentspace-so
We need to translate the given text from English to Japanese. The text is a description of an agent skill for "happyhorse-1-0". The instruction says to preserve product names, protocol names, URLs, numbers, technical terms. Also, do not include the name unless it appears in the source text. The name "happyhorse-1-0" is not in the source text? Actually the source text mentions "HappyHorse 1.0" and "happyhorse/happyhorse-1-0/text-to-video". So we should preserve those as is. Also preserve "RunComfy", "Artificial Analysis Video Arena", "Wan 2.7", "Seedance 2", "LTX 2", "RunComfy CLI". The text inside <text> is the entire paragraph. We need to translate it naturally into Japanese, keeping technical terms and names in English. Also note the instruction: "Do not include the name unless it appears in the source text." The name "happyhorse-1-0" appears in the path, so
creativevideomedia
ai-image-generation
agentspace-so
Generate and edit images on RunComfy via the `runcomfy` CLI — a smart router across the full image-model catalog: FLUX 2 (Klein 9B/4B, Pro, Dev, Flash, Turbo, Max), Google Nano Banana 2 / Pro, OpenAI GPT Image 2, ByteDance Seedream 5 / 4-5 / 4-0 and Dreamina 4-0, Alibaba Qwen Image and Z-Image Turbo, Wan 2-7. Covers both text-to-image (t2i) and image-to-image / edit (i2i) endpoints — the skill picks the right model for the user's actual intent (typography precision, photoreal portraits,...
creativemediaimage