skill
Image Inpainting
Mask-driven image inpainting on RunComfy via the `runcomfy` CLI. Routes to Tongyi MAI Z-Image Turbo Inpainting (the dedicated inpainting endpoint with mask, strength, and control-scale) and to identity-preserving edit models (Nano Banana 2 Edit, GPT Image 2 Edit, FLUX Kontext Pro) when a mask isn't available and the region must be described instead. Use for object removal, watermark removal, region replacement, blemish cleanup, and any controlled local edit where a binary mask defines the tar...
About
# Image Inpainting
Mask-driven region edits — remove objects, fill gaps, replace masked areas — on RunComfy via the `runcomfy` CLI. This skill routes to Z-Image Turbo Inpainting when a mask is available, and to instruction-driven edit models when the region must be described in prose.
[runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting) · [Z-Image Inpainting](https://www.runcomfy.com/models/tongyi-mai/z-image/turbo/inpainting?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting) · [CLI docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting)
## Powered by the RunComfy CLI
```bash # 1. Install (see runcomfy-cli skill for details) npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version
# 2. Sign in runcomfy login # or in CI: export RUNCOMFY_TOKEN=<token>
# 3. Inpaint runcomfy run tongyi-mai/z-image/turbo/inpainting \ --input '{"image": "...", "mask_image": "...", "prompt": "..."}' \ --output-dir ./out ```
CLI deep dive: [`runcomfy-cli`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/runcomfy-cli) skill.
---
## Pick the right model
Listed by precision of region targeting (mask-required first, then description-based).
**Z-Image Turbo Inpainting** — `tongyi-mai/z-image/turbo/inpainting` *(default — mask required)* > Dedicated inpainting endpoint with mask, strength, and control-scale. Open-weights, sub-second to a few seconds. > Pick for: precise region edits with a binary mask — object removal, watermark cleanup, full-region replacement. > Avoid for: edits without a mask — use Nano Banana 2 Edit (description-based).
**Z-Image Turbo Inpainting LoRA** — [`tongyi-mai/z-image/turbo/inpainting/lora`](https://www.runcomfy.com/models/tongyi-mai/z-image/turbo/inpainting/lora?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting) > Inpainting endpoint with LoRA adapter support — apply a fine-tuned style during inpainting. > Pick for: brand-style-locked inpainting (LoRA captures the look, mask defines the region). > Avoid for: generic inpainting — use the base inpainting endpoint.
**Nano Banana 2 Edit** — `google/nano-banana-2/edit` *(description-based fallback)* > Identity-preserving edit driven by spatial language ("the watermark in the bottom-right", "the cables overhead"). No mask required. > Pick for: when no mask is available and the region can be described. > Avoid for: precise pixel-level region edges — use Z-Image Inpainting.
**GPT Image 2 Edit** — `openai/gpt-image-2/edit` > Multi-ref edit with layout-precise instructions; honors "remove only the X" directives. > Pick for: complex prompt + reference composition where the masked region needs context from other images. > Avoid for: simple single-image mask-driven jobs — use Z-Image Inpainting.
**FLUX Kontext Pro** — `blackforestlabs/flux-1-kontext/pro/edit` > Single-instruction local edit with maximum preservation of everything else. > Pick for: "keep everything except X" style local edits without a mask. > Avoid for: explicit mask-driven workflows — use Z-Image Inpainting.
---
## Route 1: Z-Image Turbo Inpainting — default
**Model**: `tongyi-mai/z-image/turbo/inpainting` **Catalog**: [Z-Image inpainting](https://www.runcomfy.com/models/tongyi-mai/z-image/turbo/inpainting?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-inpainting)
### Schema
| Field | Type | Required | Notes | |---|---|---|---| | `prompt` | string | yes | What fills the masked region; describe preservation constraints for the surround | | `image` | string | yes | Source image URL | | `mask_image` | string | yes | **Grayscale mask URL** (white = inpaint, black = preserve) | | `strength` | float | no | 0.3–0.6 for retouching, 0.7–1.0 for full replacement | | `control_scale` | float | no | 0.6–0.9 typical | | `aspect_ratio` | enum | no | W:H output ratio | | `seed` | int | no | Reproducibility |
### Invoke
**Object removal (low strength):**
```bash runcomfy run tongyi-mai/z-image/turbo/inpainting \ --input '{ "prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.", "image": "https://your-cdn.example/street.jpg", "mask_image": "https://your-cdn.example/cables-mask.png", "strength": 0.5, "control_scale": 0.8 }' \ --output-dir ./out ```
**Region replacement (high strength):**
```bash runcomfy run tongyi-mai/z-image/turbo/inpainting \ --input '{ "prompt": "Replace busy backdrop with smooth light gray studio paper; mask background only.", "image": "https://your-cdn.example/product.jpg", "mask_image": "https://your-cdn.example/bg-mask.png", "strength": 0.9 }' \ --output-dir ./out ```
### Prompting tips
- **A mask URL is required.** Grayscale, white = inpaint region, black = preserve. Slight blur on mask edges (1–3 px) blends better than a sharp binary edge. - **Strength by intent**: - `0.3–0.5` retouching
Install
Run this command
npx skills add prime-skills/runcomfy-agent-skillsWorks with
Manual steps
Install with `npx skills add prime-skills/runcomfy-agent-skills`, or clone the repository and copy the `image-inpainting` folder into your Claude skills directory.
Frequently asked questions
What is the Image Inpainting skill?
Mask-driven image inpainting on RunComfy via the `runcomfy` CLI. Routes to Tongyi MAI Z-Image Turbo Inpainting (the dedicated inpainting endpoint with mask, strength, and control-scale) and to identity-preserving edit models (Nano Banana 2 Edit, GPT Image 2 Edit, FLUX Kontext Pro) when a mask isn't available and the region must be described instead. Use for object removal, watermark removal, region replacement, blem…
How do I install Image Inpainting?
Run this in your terminal:
npx skills add prime-skills/runcomfy-agent-skillsWhich AI tools does Image Inpainting work with?
It works with claude_app, claude_code, claude_api, cursor, codex, windsurf, cline, zed.
Who made Image Inpainting?
prime-skills, released under the MIT license.
Is Image Inpainting free?
Yes, it is free to use under the MIT license.
npx skills add vercel-labs/skills
npx skills add mattpocock/skills
npx skills add mattpocock/skills
npx skills add mattpocock/skills
npx skills add mattpocock/skills
npx skills add genmedia-labs/skills
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content