inpainting-regions

Compiles a Visual Intent Object into a ComfyUI SDXL inpainting prompt JSON.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ShinyGua/ComfyUI-Agent --skill inpainting-regions-shinygua
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: inpainting-regions
Source: https://github.com/ShinyGua/ComfyUI-Agent/tree/main/.claude/skills/inpainting-regions
Command: npx skills add https://github.com/ShinyGua/ComfyUI-Agent --skill inpainting-regions-shinygua

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? It converts a structured Visual Intent Object (VIO) describing a masked image edit into a ready-to-run ComfyUI inpainting workflow JSON, removing the need to hand-build node graphs for region-based image editing. ## Core Features & Use Cases - Template-based compilation: Patches a hand-authored SDXL inpaint template (LoadImage + VAEEncode + SetLatentNoiseMask) with prompt, negative prompt, image, mask, and sampler parameters. - Parameter mapping: Maps VIO fields such as steps, cfg, sampler_name, scheduler, denoise, seed, and checkpoint onto the correct ComfyUI node inputs, with negative seeds replaced by a generated random seed. - Goal validation: Rejects VIOs whose goal is not "inpaint" and returns structured JSON errors for malformed input. - Use Case: A planner emits a step with goal=inpaint plus an input image and mask PNG; the Skill outputs a complete prompt JSON that ComfyUI can execute to regenerate only the masked region. ## Quick Start Ask the agent to inpaint a masked region of an existing image by providing the image path, mask PNG, and a text prompt describing the desired content.

Frequently Asked Questions about inpainting-regions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I inpaint a masked region of an image in ComfyUI?▼

Provide a Visual Intent Object with goal set to inpaint, the input image path, a mask PNG, and a text prompt. The compile script patches an SDXL template using LoadImage, VAEEncode, and SetLatentNoiseMask nodes and outputs a runnable ComfyUI prompt JSON.

What inputs does ComfyUI inpainting with SetLatentNoiseMask require?▼

It requires a base image and a mask image loaded via LoadImage nodes, plus a checkpoint model. Optional parameters include prompt, negative prompt, steps, cfg, sampler name, scheduler, denoise strength, and seed.

Which model checkpoint does the SDXL inpaint template use?▼

The template defaults to sd_xl_base_1.0.safetensors loaded through CheckpointLoaderSimple. You can override it by setting model.checkpoint in the Visual Intent Object, which updates the ckpt_name input on node 4.

What happens if the goal is not inpaint?▼

The compile script rejects the input and exits with a non-zero status, printing a JSON error object with code "goal". This prevents the template from being used for unrelated generation tasks.

How are random seeds handled in the inpaint compilation?▼

If params.seed is a non-negative integer it is used directly in the KSampler node. A negative seed is replaced with a time-based random 32-bit value so each run produces varied results.