Nodes/aicu-comfyui-stability-ai-api/Stability Image Editor
ComfyUI Node

Stability Image Editor

Six Image-Editing Tools in One Node (Bring a Mask)

By aicuai·Created 2 years ago·Updated 2 years ago· 1
Stability Image Editor
  • image
  • mask
  • IMAGE
edit_type
api_key
output_formatpng
prompt
negative_prompt
grow_mask5
seed0
style_presetnone
search_or_select_prompt
left0
right0
up0
down0
creativity0.50

StabilityEdit is the Swiss-army knife of this pack: one node, six different edit jobs behind a single edit_type dropdown, all hitting Stability's hosted /v2beta/stable-image/edit/{type} endpoints. The menu is erase, inpaint, outpaint, search-and-replace, search-and-recolor, and remove-background. No local inpainting model, no BiRefNet download, no VRAM - just credits.

Which mode you pick changes which inputs matter, so let's go through the ones that actually get set.

  • erase - mask an object and remove it; the model fills the hole. Needs a mask.
  • inpaint - same as erase but replaces the masked area with what your prompt describes. Needs a mask.
  • outpaint - extend the canvas in any direction. Set left / right / up / down in pixels (at least one must be > 0) and creativity (0–1, default 0.5) for how freely it invents the extension.
  • search-and-replace - describe what to find in search_or_select_prompt ("red car") and what to replace it with in prompt ("blue van"). No mask needed - the model locates the thing itself.
  • search-and-recolor - same, but the prompt describes a new color rather than a new object.
  • remove-background - just cuts the background out. Ignores everything except output_format (png/webp).

The mask input - where beginners get stuck

erase and inpaint require a mask, and the node will error with "mask required" if you forget it. Wire the MASK output from a Load Image node (load a separately-saved black-and-white mask), or from any segmentation node (SAM, BiRefNet, manual mask editors). The grow_mask dial (default 5) then expands your mask outward by a few pixels so the model blends the boundary instead of cutting a hard seam - the classic inpainting move of not painting right on the edge.

The rest

  • image - required, always.
  • prompt / negative_prompt - used by inpaint and the search modes; ignored by erase and remove-background.
  • seed - set for reproducible edits.
  • style_preset - 18 named looks for the replacement content.
  • output_format - png or webp only (no jpeg here).
  • api_key - per-node override.

Output: a single IMAGE.

Installing it

Part of the aicu-comfyui-stability-ai-api pack:

cd ComfyUI/custom_nodes
git clone https://github.com/aicuai/aicu-comfyui-stability-ai-api.git
cd aicu-comfyui-stability-ai-api
pip install -r requirements.txt

Or ComfyUI Manager → search "aicu-comfyui-stability-ai-api" → install → restart. You need a paid Stability AI key: the node's api_key field, the STABILITY_API_KEY env var, or the pack's auto-generated config.ini.

Honest takes

search-and-replace is the standout here - masked-free object editing is exactly the kind of thing that's annoying to set up locally and trivial here. On the flip side, remove-background is a waste of credits in 2026: the free local BiRefNet (which ComfyUI now ships in core) beats it on hair and edges. And a couple of grounded gotchas: erase/inpaint reject images with sides under 64px or extreme aspect ratios (1:2.5–2.5:1 enforced), and everything runs through Stability's moderation - a 403 means the platform refused the content, and no amount of prompt tweaking fixes that. For masked inpainting and object surgery specifically, this node is the easiest path in the pack.

CategoryStability AI

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
edit_typeCOMBO6 options: erase, inpaint, outpaint, search-and-replace, search-and-recolor, remove-background
api_keyoptSTRING
output_formatoptCOMBOpng2 options: png, webp
promptoptSTRING
negative_promptoptSTRING
maskoptMASK
grow_maskoptINT50–100
seedoptINT00–4294967295
style_presetoptCOMBOnone18 options: none, 3d-model, analog-film, anime, cinematic, comic-book, +12
search_or_select_promptoptSTRING
leftoptINT00–2000
rightoptINT00–2000
upoptINT00–2000
downoptINT00–2000
creativityoptFLOAT0.500–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE