⚙️ 背景移除设置
The config bag for the background-removal pipeline (and when you can skip it)
- config
BackgroundRemovalSettings (⚙️ 背景移除设置) is a settings carrier, not a processor. It doesn't touch a single pixel - it packages four configuration values into a single BACKGROUND_REMOVAL_CONFIG object that downstream nodes in this pack's background pipeline are supposed to consume. Think of it as a named settings bag you wire up once and feed into the actual removal nodes, so you can change timeout or edge smoothing in one place instead of hunting through a chain.
It's a thin node, and it's honest to say so. In a typical single-node workflow - image in, AdvancedBackgroundRemoval out - you will never need it. It exists for the pack's server-API mode: there's a background removal HTTP service in the pack (rembg_api.py) that this config's enable_server_api toggle and api_timeout value are meant to drive, where removal runs out-of-process rather than inline.
How it works
The four inputs are simply packed into a Python dict and passed out as the config output:
enable_server_api(default true) - whether the pipeline should use the pack's background-removal server rather than inline processing.api_timeout(5–120s, default 30) - how long to wait on that server before giving up.fallback_threshold(5–50, default 20) - the confidence/quality threshold at which the pipeline bails out to a fallback removal path.edge_smooth_iterations(1–5, default 2) - how many smoothing passes the downstream removal should run on mask edges.
Output: a single config of type BACKGROUND_REMOVAL_CONFIG, which you wire into whichever node in the pack expects a background-removal config input.
Installing it
Nothing special - install the pack once (ComfyUI Manager → "Kontext Super Prompt" or git clone https://github.com/aiaiaikkk/super-prompt-canvas) and restart ComfyUI. No extra dependencies; this node is pure plumbing.
Where people get burned
Mostly by expectations: people drop it into a workflow expecting it to remove backgrounds and nothing happens, because that's not what it does. The values also won't do anything unless the node you connect it to actually consumes this config type - if you're running the plain AdvancedBackgroundRemoval node with default settings, this is dead weight and you can delete it. Use it when you're building out the pack's server-backed removal pipeline and need the knobs in one place; skip it for a quick inline cutout.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| enable_server_api | BOOLEAN | true | — |
| api_timeout | INT | 305–120 | — |
| fallback_threshold | FLOAT | 20.005–50 | — |
| edge_smooth_iterations | INT | 21–5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | BACKGROUND_REMOVAL_CONFIG | — |