ApoRepainter
Background removal (colour-to-alpha), object erase and exact-size crop tools for ComfyUI, with an in-node image editor.

🧬<ins>Tools</ins>
| Tool | What it does | |---|---| | RemBG | Removes a flat colour background to true transparency (colour-to-alpha): clean edges, no halo, letter counters cleared. Auto-detects the colour or takes one you pick with the eyedropper. | | Erase | Click and erase: a circle removes a spot or object and rebuilds the area from its surroundings, with a smooth fill or a patch-copy texture fill, chosen automatically. | | Crop | Exact-size crop with each side moved inward or outward, an exact width x height with a 9-point anchor, or crop to content. |
Also: five presets per tool with starters, export and import; images, masks and transparency straight from Load Image; outputs for 4-channel and 3-channel nodes plus a plain-language info report; and every setting saved in the workflow.
💭<ins>Presets</ins>
Each tool has five named preset slots at the bottom of its settings. Click one to apply it, tune something, and Save it back under your own name. A small orange modified marker shows when you have changed a setting since applying a preset. Five starters per tool ship with the node, Reset to defaults and Restore starters are one click, and Export set / Import set keep as many sets as you like. Your own presets live in user_presets, which an update never touches. Full guide: docs/presets.md.
✍🏻<ins>Tool guides</ins>
See the docs folder: a page per tool, the visual editor, presets, images, masks and transparency, a generated reference of every widget, and Testing.
⚙️<ins>Installation</ins>
<h3 align="left">Option 1: Comfy Manager Install [recommended]</h3>ApoRepainter has no extra requirements (torch, numpy and Pillow already ship with ComfyUI), so you can install it via Comfy Manager without any fear of breaking your Comfy. Search APO in Manager. After installation, rename the folder to ComfyUI-ApoRepainter.
<h3 align="left">Option 2: Manual Install [git clone]</h3>cd ComfyUI/custom_nodes
git clone https://github.com/ApoloniArt/ApoRepainter ComfyUI-ApoRepainter
No Git? On GitHub press Code > Download ZIP, unpack it, and put the folder into ComfyUI/custom_nodes/ named ComfyUI-ApoRepainter.
- Restart ComfyUI fully (close the console window too). The node appears as ApoRepainter in the Add Node menu.
Update: in Comfy Manager press Update, or for a manual install run git pull inside custom_nodes/ComfyUI-ApoRepainter, then restart. Your own presets are not part of the repository, so an update never touches them (see Presets).
🤔<ins>Check your Install</ins>
Double-click RUN_TESTS.bat in the ComfyUI-ApoRepainter folder. It prints one PASS / FAIL line per test (details in docs/testing.md).
🏃🏻♀️➡️<ins>Quick Start</ins>
- Add Load Image and ApoRepainter (Add Node > ApoRepainter), or just drop a picture onto the ApoRepainter node.
- Pick RemBG, Erase or Crop with the tabs along the top of the node. Try Photo on black or Banner / flat graphic from the Presets block.
- Add Preview Image (or Save Image) and run. Use the
imageoutput, ormaskfor the alpha. - To combine steps, connect the
imageoutput to theimage_insocket of a second ApoRepainter node set to another tool.
Transparent PNG from Load Image? Connect its IMAGE to image_in and its MASK to mask_in (see images, masks and transparency).
🫱🏻🫲🏻<ins>Attribution & Licenses</ins>
ApoRepainter is MIT licensed, see LICENSE. If you use it in a project, a mention of "ApoRepainter by ApoloniArt" is very much appreciated 🥰
See NOTICE for the full attribution request.
Bundled font: Bitcount Ink SIL Open Font License 1.1.
Development details and version updates can be found in CHANGELOG.md
<div align="center">
Developed by ApoloniArt ⚢🌈
</div>