image-edit

작성자: agentspace-so

RunComfy에서 이미지 편집 — 이 스킬은 사용자의 의도를 RunComfy 카탈로그 내 적절한 편집 모델에 매칭하는 스마트 라우터입니다. Nano Banana Edit(최대 20개 배치, 정체성 보존 기본값), OpenAI GPT Image 2 Edit(다국어 이미지 내 텍스트 재작성, 다중 참조 구성, 레이아웃 정밀도), Flux Kontext Pro(단일 참조 고충실도 로컬 편집), 또는 Z-Image Turbo Inpaint(마스크 기반 정밀 영역 편집)를 선택합니다. 각 모델의 문서화된 프롬프트 패턴을 번들로 제공하여 스킬이...

npx skills add https://github.com/agentspace-so/runcomfy-agent-skills --skill image-edit

Image Edit — Pro Pack on RunComfy

runcomfy.com · Nano Banana Edit · GPT Image 2 Edit · Flux Kontext · Z-Image Inpaint · GitHub

Image edit, intent-routed. This skill doesn't lock you to one model — it picks the right edit model in the RunComfy catalog based on what the user actually wants: batch identity-preservation, multilingual text rewrite, single-shot precise edit, or mask-driven region replacement.

npx skills add agentspace-so/runcomfy-skills --skill image-edit -g

Pick the right model for the user's intent

User intentModelWhy
Batch edit 1–20 images consistently (SKU gallery, A/B variants)Nano Banana EditUp to 20 input images per call; locked aspect/resolution for series
Swap background, preserve subject identityNano Banana EditStrong identity preservation under "keep X unchanged" prompts
Localized object removal / addition with spatial language ("the left object", "upper-right corner")Nano Banana EditHonors directional spatial scope
Multilingual / non-Latin in-image text rewrite (Japanese kana, Cyrillic, Arabic)GPT Image 2 EditStrongest in class for multilingual typography
Multi-reference composition (subject from img1, scene from img2, palette from img3)GPT Image 2 EditNumbered refs route cues correctly
Layout-precise repositioning ("move headline from top-right to bottom-center")GPT Image 2 EditDirectional language honored at layout level
Identity preservation across translated headline variantsGPT Image 2 EditSame source asset → many language variants, identity stable
Single-shot precise local edit ("she's now holding an orange umbrella")Flux Kontext ProSingle-ref single-instruction, high-fidelity preservation
Mask-driven object removal (cables, watermarks, distractions)Z-Image Turbo InpaintMask-required, strength-tunable, edge-consistent
Mask-driven region replacement (full background swap with mask)Z-Image Turbo InpaintHigh strength + clean mask = clean replacement
Default if unspecifiedNano Banana EditMost flexible, supports both single and batch

The agent reads this table, classifies the user's intent, and picks the matching subsection below.

Prerequisites

  1. RunComfy CLInpm i -g @runcomfy/cli
  2. RunComfy accountruncomfy login.
  3. CI / containers — set RUNCOMFY_TOKEN=<token>.

Route 1: Nano Banana Edit — default for general edit + batch

Model: google/nano-banana-2/edit

Schema

FieldTypeRequiredDefaultNotes
promptstringyesLead with preservation goals, end with the change.
image_urlsarrayyes1–20 publicly-fetchable HTTPS URLs.
number_of_imagesintno11–4 outputs per call.
aspect_ratioenumnoautoauto follows input; lock for batch consistency.
resolutionenumno1K0.5K / 1K / 2K / 4K.
output_formatenumnopngpng / jpeg / webp.
seedintnoReproducibility.
enable_web_searchboolnofalseWeb-grounded edits (extra latency).

Invoke

runcomfy run google/nano-banana-2/edit \
  --input '{
    "prompt": "Keep the subject identity, pose, and clothing unchanged. Convert the background into a rainy neon cyberpunk street.",
    "image_urls": ["https://.../portrait.jpg"]
  }' \
  --output-dir <absolute/path>

Batch (lock aspect + resolution):

runcomfy run google/nano-banana-2/edit \
  --input '{
    "prompt": "Replace the watermark in the bottom-right with the text \"AURA\" in clean white sans-serif. Keep everything else exactly as in the input.",
    "image_urls": ["https://.../sku-1.jpg", "https://.../sku-2.jpg", "https://.../sku-3.jpg"],
    "aspect_ratio": "1:1",
    "resolution": "1K"
  }' \
  --output-dir <absolute/path>

Prompting tips

  • Preservation first: "Keep [identity / pose / brand / framing] unchanged." Then state the change.
  • Spatial scope: "background only", "the left object", "upper-right quadrant" — concrete locations honored.
  • Batch consistency: lock aspect_ratio and resolution across the batch.
  • Iterate small: split compound edits into multiple shorter passes.

Route 2: GPT Image 2 Edit — multilingual text + multi-ref composition

Model: openai/gpt-image-2/edit

Schema

FieldTypeRequiredDefaultNotes
promptstringyesEdit instruction; lead with preservation.
imagesstring[]yesUp to 10 HTTPS URLs. First is primary; rest are auxiliary.
sizeenumnoautoauto, 1024_1024, 1024_1536, 1536_1024. Only these.

Invoke

Multilingual text rewrite:

runcomfy run openai/gpt-image-2/edit \
  --input '{
    "prompt": "Keep the photograph, layout, and brand mark exactly as in the input. Replace only the in-image headline. The new headline reads \"今日のおすすめ\" in bold Japanese kana, same position and font weight.",
    "images": ["https://.../poster-en.jpg"]
  }' \
  --output-dir <absolute/path>

Multi-ref composition:

runcomfy run openai/gpt-image-2/edit \
  --input '{
    "prompt": "Compose subject from image 1 into the room from image 2. Match the lighting and color palette of image 2. Keep image 1 subject identity unchanged.",
    "images": ["https://.../subject.jpg", "https://.../room.jpg"]
  }' \
  --output-dir <absolute/path>

Prompting tips

  • Quote in-image text exactly. Name the script for non-Latin: "Japanese kana", "Cyrillic", "Arabic right-to-left".
  • Number multi-refs: "subject from image 1, lighting from image 2".
  • Directional layout language: "move the headline from top-right to bottom-center", "replace the watermark in the bottom-right".
  • size: "auto" preserves input ratio — recommended unless the edit changes framing.

Route 3: Flux Kontext Pro — single-shot precise local edit

Model: blackforestlabs/flux-1-kontext/pro/edit

Schema (minimal)

FieldTypeRequiredNotes
promptstringyesOne declarative edit instruction.
imagestringyesSingle source image URL.
aspect_ratioenumnoPick from supported W:H values.
seedintnoReproducibility.

Single image only — no array. For multi-image flows, use Route 1 (Nano Banana Edit).

Invoke

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>

Prompting tips

  • One declarative instruction. "She is now holding an orange umbrella and smiling" — imperative, single change.
  • Preservation first. Lead with "Keep [unchanged elements]" then state the change.
  • Iterate small. Compound edits drift on a single pass; split into sequential passes.

Route 4: Z-Image Turbo Inpaint — mask-driven precise region edit

Model: tongyi-mai/z-image/turbo/inpainting

Schema

FieldTypeRequiredNotes
promptstringyesWhat to fill / replace; preservation constraints for the unmasked surround.
imagestringyesSource image URL.
mask_imagestringyesGrayscale mask URL (white = inpaint, black = preserve).
strengthfloatno0.3–0.6 retouching, 0.7–1.0 full replacement.
control_scalefloatno0.6–0.9 typical.
aspect_ratioenumnoW:H output ratio.
seedintnoReproducibility.

Invoke

Object removal (low strength):

runcomfy run tongyi-mai/z-image/turbo/inpainting \
  --input '{
    "prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.",
    "image": "https://.../street.jpg",
    "mask_image": "https://.../cables-mask.png",
    "strength": 0.5,
    "control_scale": 0.8
  }' \
  --output-dir <absolute/path>

Region replacement (high strength):

runcomfy run tongyi-mai/z-image/turbo/inpainting \
  --input '{
    "prompt": "Replace busy backdrop with smooth light gray studio paper; mask background only.",
    "image": "https://.../product.jpg",
    "mask_image": "https://.../bg-mask.png",
    "strength": 0.9
  }' \
  --output-dir <absolute/path>

Prompting tips

  • A mask URL is required — grayscale, white = inpaint region, black = preserve. Slight blur on mask edges (1–3px) blends better than sharp binary.
  • Strength by intent: 0.3–0.5 for retouching / cleanup, 0.6–0.7 for object replacement with style match, 0.8–1.0 for full-region replacement.
  • Name what stays outside the mask in the prompt: "preserve rooflines and sky gradient", "match brick pattern and mortar tone".
  • Spatial labels still help even though the mask defines the region: "the left shelf", "upper-right quadrant".

Limitations

  • Each route inherits its model's limits. Nano Banana: 1–20 inputs, 1–4 outputs. GPT Image 2 Edit: up to 10 refs, 4 fixed sizes. Flux Kontext: single ref. Z-Image Inpaint: mask required.
  • No multi-route blending. This skill picks one model per call.
  • Brand-specific overrides — if the user named a specific model, route to the corresponding brand skill (gpt-image-edit, flux-kontext, nano-banana-edit) for fuller treatment.

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 picks one of Nano Banana Edit / GPT Image 2 Edit / Flux Kontext Pro / Z-Image Turbo Inpaint based on user intent and invokes runcomfy run <model_id> with the matching JSON body. The CLI POSTs to the Model API, 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 Korean. 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: CLI, 44.1 kHz stereo, vocal tracks, tag-driven composition, multilingual lyrics, audio-inpaint, audio-outpaint. Also numbers and prices. We must preserve all these. The text ends with "Picks the right..." which is incomplete. We should translate that as is. The instruction says: "Translate only the text inside <text>. Do not include the name unless it appears in the source text." The name "ai-music" is given as the name to preserve, but it does not appear in the source text, so we don't include it. Also do not add labels. We'll produce a natural Korean translation that preserves all proper nouns, URLs (none here), numbers, prices, and technical terms. Use appropriate Korean phrasing.
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)은 Kuaishou Technology의 3세대 멀티샷 비디오 모델로, 기본 동기화 오디오와 샷 간 일관된 캐릭터 정체성을 제공합니다. 이 스킬은 세 가지 렌더링 등급(Standard, Pro, 4K)과 두 가지 모드(텍스트-투-비디오, 이미지-투-비디오)에 걸친 모든 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 Korean. 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" - that might mean we should keep that name if it appears, but it doesn't. So we just translate the text as is. We need to translate the description accurately, preserving product names, protocol names, URLs, numbers, technical
creativemediaapi
happyhorse-1-0
agentspace-so
We need to translate the given text from English to Korean. The text describes an agent skill for generating text-to-video with HappyHorse 1.0 on RunComfy. It mentions strengths, schema, routing alternatives, and CLI command. The instruction says to preserve product names, protocol names, URLs, numbers, technical terms. So "HappyHorse 1.0", "RunComfy", "Artificial Analysis Video Arena", "1080p", "Wan 2.7", "Seedance 2", "LTX 2", "runcomfy run happyhorse/happyhorse-1-0/text-to-video", "CLI", "happyhorse", "happy horse" should remain as is. Also preserve the name "happyhorse-1-0" if it appears, but it's not in the text except in the CLI path. The text inside <text> is what we translate. We must not add labels or extra commentary. Just the translation. Let's translate sentence by sentence: "Generate text-to-video with HappyHorse
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