Staged Individual Composites
One background, one image per subject
- background
- foreground_images
- background_removal_model
- background_options
- Individual Composites
- Individual Masks
- Boxes
The sibling compositor has one big assumption baked in: you're stacking everything into a single scene. This one deliberately breaks that assumption. UC_StagedIndividualComposites takes the same background-plus-foregrounds staging architecture and returns one full-background composite per foreground - plus each one's mask and placement box - instead of one layered image. Same background, every subject composited separately, all outputs in a batch.
Why you'd want that
Three workflows immediately come to mind. Catalog/product work: one studio background, a batch of products, and you want each product on that background as its own clean image - not all of them stacked in one frame. Training-data prep: you need foreground/background/mask triplets for a dataset, and this node hands you the composite, the mask, and the box for every subject in one pass. And AB testing: place the same subject in ten spots, get ten composites, compare composition without hand-saving each one.
How it works
Inputs mirror the big compositor: background, foreground_images (autogrowing, foreground_0 at the back), execution_mode (default run_staged), placement_data (the versioned JSON the editor widget manages), and background_removal_model_name (default birefnet). Two optional inputs: an external Core background_removal_model that overrides the internal selector, and background_options - with the caveat in the tooltip that foreground_blend is ignored here, since each result contains exactly one foreground anyway.
Outputs: Individual Composites (IMAGE), Individual Masks (MASK), and Boxes (BOUNDING_BOX) - all aligned by index. The retained-cutout cache behaves the same as the sibling: background and placement edits reuse cached cutouts without rerunning background removal, but the cache lives in server memory, so a ComfyUI restart wipes it and you must re-stage.
The settings that matter
execution_mode-run_stagingpopulates the placement editor and retains cutouts;run_staged(the default) composites the retained cutouts with no model work. Use the former after a restart or when you change foreground pixels, the latter for fast iteration.placement_data- let the editor manage it. Hand-editing the JSON is how you break your own scene.background_removal_model_name-birefnetis the default and the KB's documented community pick; connect an external model if you want to override.
Install
Part of ComfyUI-UtilsCollection:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart, or install via ComfyUI Manager (search "UtilsCollection"). No pack-side model downloads; BiRefNet weights come through ComfyUI core's background-removal handling, and opencv-python + typing-extensions auto-install.
Gotchas
Same restart trap as the whole staging family: after a ComfyUI restart, re-run staging before run_staged will do anything - the retained cutouts are server-memory residents, not files. And this node is an output node (is_output_node: true), so it's meant to be a terminal in the graph - don't try to chain its image batch into heavy downstream processing expecting per-composite grouping to survive untouched.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| background | IMAGE | — | |
| execution_mode | COMBO | run_staged | Frontend-managed staging request; retained cutouts are validated automatically. |
| placement_data | STRING | {"version":2,"workspace_padding":0.5,"layers":{}} | — |
| background_removal_model_name | COMBO | birefnet | 2 options: birefnet, lucida |
| foreground_images | COMFY_AUTOGROW_V3 | — | |
| background_removal_modelopt | BACKGROUND_REMOVAL | — | |
| background_optionsopt | UC_STAGED_LAYERED_BACKGROUND_OPTIONS | foreground_blend is ignored because each result contains one foreground. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Individual Composites | IMAGE | — |
| Individual Masks | MASK | — |
| Boxes | BOUNDING_BOX | — |