Stability Search And Recolor
Find it by name, repaint it by prompt — no mask required
- image
- IMAGE
Search and Recolor is the recolor sibling of the pack's Search and Replace node, and it shares the same party trick: you don't draw a mask, you describe the object. Type what's in the picture ("the jacket"), type what color it should become ("a deep forest green"), and the model locates the object by description and repaints just that region. It's the one-call version of a local workflow that means mask editor plus segmentation plus an inpaint pass, and it hits stable-image/edit/search-and-recolor on Stability's servers.
It's a cloud node from the official "Stability API nodes for ComfyUI" pack: credits per call, API key required, zero VRAM, nothing downloaded. The community's standing reply to this pack - "not local, not interested" - applies here as much as anywhere, and if you have a GPU you can absolutely do this locally. What this node gives you is the "one sentence edit" that would take a local workflow several nodes and a few attempts to match. When you just want to see the car in a different color without fighting a mask, that's worth something.
How it works
The model uses select_prompt as a locator, exactly like Search and Replace: it grounds that description to pixels, then recolors what it found according to prompt. The inputs that matter:
- select_prompt - what to find. Specificity wins, especially in crowded frames: "the woman's jacket" rather than "the jacket."
- prompt - the new color or palette. Describe the target look ("a muted sage green, matte finish"); you can push past flat recoloring into texture and material hints, though color is the reliable part.
- grow_mask (0–20, default 3) - how many pixels the selection expands. This is your edge-control dial; bump it if you see a halo of the old color, lower it if the recolor is bleeding onto the surroundings.
- negative_prompt, seed - the usual steering and reproducibility.
Then the pack's shared furniture: style + style_preset (ignored unless style is on - the recurring quirk), output_format for png/webp/jpeg. Output is a single IMAGE tensor, into Save Image or downstream.
Installing it
From the "Stability API nodes for ComfyUI" pack - ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Stability-AI/ComfyUI-SAI_API
# restart ComfyUI
No model downloads; requests is the only dependency beyond ComfyUI's own stack. Key via SAI_API_KEY, a sai_platform_key.txt file, or the per-node api_key_override (which rides in the workflow JSON - don't share those files).
Common issues
- It recolored the wrong thing -
select_promptwas too vague. Add attributes or location to pin down the instance. - Halo of the old color -
grow_masktoo low. Add a few pixels and re-run. - Color bleeds onto the background -
grow_masktoo high, or the object has edges the model can't cleanly separate. Tighten the mask growth. - "payment_required" - credits ran out.
It's a narrow tool - recolor is a narrower ask than replace - but it's the most satisfying node in the pack for the demo effect alone. Point at something, change its color, done. Just keep the select prompt specific.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| select_prompt | STRING | — | |
| prompt | STRING | — | |
| negative_promptopt | STRING | — | |
| grow_maskopt | INT | 30–20 | — |
| seedopt | INT | 00–4294967294 | — |
| styleopt | BOOLEAN | false | — |
| style_presetopt | COMBO | 17 options: 3d-model, analog-film, anime, cinematic, comic-book, digital-art, +11 | |
| output_formatopt | COMBO | 3 options: png, webp, jpeg | |
| api_key_overrideopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |