Extensions/comfyui-pixelcut
ComfyUI Extension

comfyui-pixelcut

ComfyUI custom nodes for the Pixelcut API — background removal and more.

By pixelcutai·Created about a month ago·Updated 29 days ago· 1
pixelcutai/comfyui-pixelcut
Nodes2
On cloudLocal install
CategoryPixelcut
Stars1
Updated29 days ago
Readme

ComfyUI-Pixelcut

Comfy Registry

ComfyUI custom nodes for the Pixelcut image API.

Background removal — Pixelcut's flagship cutout model, exposed as a native ComfyUI node that takes an IMAGE and returns the cutout plus its alpha MASK.

Install from the Comfy Registry or via ComfyUI Manager.

Nodes

| Node | Inputs | Outputs | | --- | --- | --- | | Pixelcut Remove Background | image, and optional api_key, crop, shadow, shadow_opacity, invert_mask | image (RGB cutout), mask (subject alpha) | | Pixelcut Credits | optional api_key | credits_remaining (INT) |

The mask marks the subject by default (1 = subject). Flip invert_mask to mark the background instead, matching ComfyUI's LoadImage alpha convention.

Installation

Via ComfyUI Manager: search for "Pixelcut" and install.

Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/pixelcutai/comfyui-pixelcut
cd comfyui-pixelcut
pip install -r requirements.txt

Restart ComfyUI. The nodes appear under the Pixelcut category.

API key

Get a key from your Pixelcut API dashboard.

Provide it either way:

  • Environment variable (recommended): set PIXELCUT_API_KEY before launching ComfyUI. It never touches your saved workflows.
    export PIXELCUT_API_KEY="sk-..."
    
  • api_key widget: type it into the node. Convenient, but note the key is saved into the workflow JSON and embedded in saved-image metadata — don't share those files.

The widget value takes precedence over the environment variable when set.

Usage

Load ImagePixelcut Remove BackgroundPreview Image. The mask output can drive compositing, Set Latent Noise Mask, or any mask-consuming node.

Batches are supported (one API call per frame). When crop is enabled, frames may come back at different sizes and can't be stacked into one batch — process such images individually.

See example_workflows/ for a ready-to-load graph.

Credits & options

  • Background removal costs credits per call; shadow adds +3 credits per image. Check your balance with the Pixelcut Credits node.
  • Image limits: 25 MB, 64×64 min, 6000×6000 max.

How it works

ComfyUI images are local tensors, so the node uploads image bytes directly via multipart/form-data and requests the raw binary result (Accept: image/*) — no intermediate URL hosting or second download. The returned PNG's alpha channel becomes the ComfyUI MASK.

License

MIT — see LICENSE.