NAI 清理杂物
One click to clean the junk out of a scene
- image
- 图像
- 统计
NAI 清理杂物 (Declutter) is NovelAI's "clean up the picture" tool, exposed as a node. It's part of the pack's Director Tools family - a batch of one-button image-editing API calls that sit at the cheap end of the bill, good for the last cleanup step before a render is done. Give it an IMAGE, it asks the API to remove the visual clutter - background mess, stray objects, the junk that accumulates around a subject - and hands back a cleaned IMAGE plus a 统计 string describing what the call returned.
The single input beyond the image is the one that makes it a real tool rather than a toy:
- keep_text_bubbles - default off. When checked, the cleanup requests NovelAI's "declutter but keep text bubbles" variant (the code literally switches the API tool name from
decluttertodeclutter-keep-bubbles). For comic/manga panels with dialogue balloons, this is the difference between "cleaned the panel" and "wiped the dialogue."
Outputs: 图像 (the cleaned IMAGE) and 统计 (a short string with the result count). Wire the image onward to a saver, an upscaler, or back into an img2img pass.
The honest framing
Declutter is a light edit, not a reconstruction. It's best at the finishing step - the "the subject is right but the background has a lamp I didn't ask for" case. It's not a repair tool for a genuinely broken render, and it's not a substitute for masking out something you specifically want gone; for that, the inpaint sampler with a hand-painted mask is the right call and gives you control over what survives. Keep the two straight: Declutter decides what's clutter, you decide with inpaint.
It's also an API call that costs Anlas, and like every Director Tool in this pack it returns its work in one shot - there's no strength dial here, no way to say "clean it a little." It's binary. If the result is too aggressive, route the output through the inpaint sampler with a mask over the bits you actually wanted to keep, or just re-run on a lighter version of the image.
Install
Standard pack install: search ComfyUI-NovelAI-GENYTOOLS in ComfyUI Manager, or git clone https://github.com/XTOGENY/ComfyUI-NovelAI-GENYTOOLS.git into custom_nodes + pip install -r requirements.txt, and set your Persistent API Token in ComfyUI settings. This node runs only when you execute it - nothing phones home until the sampler or a tool node actually runs, so wiring it into a workflow costs you nothing until you queue.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| keep_text_bubbles | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 统计 | STRING | — |