Stability Image Editor
Six Image-Editing Tools in One Node (Bring a Mask)
- image
- mask
- IMAGE
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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| edit_type | COMBO | 6 options: erase, inpaint, outpaint, search-and-replace, search-and-recolor, remove-background | |
| api_keyopt | STRING | — | |
| output_formatopt | COMBO | png | 2 options: png, webp |
| promptopt | STRING | — | |
| negative_promptopt | STRING | — | |
| maskopt | MASK | — | |
| grow_maskopt | INT | 50–100 | — |
| seedopt | INT | 00–4294967295 | — |
| style_presetopt | COMBO | none | 18 options: none, 3d-model, analog-film, anime, cinematic, comic-book, +12 |
| search_or_select_promptopt | STRING | — | |
| leftopt | INT | 00–2000 | — |
| rightopt | INT | 00–2000 | — |
| upopt | INT | 00–2000 | — |
| downopt | INT | 00–2000 | — |
| creativityopt | FLOAT | 0.500–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |