多参图像手动拼接
Drag your reference cutouts where you want them
- model
- clip
- image_1
- image_2
- image_3
- image_4
- image_5
- video_frame
- collage
- alpha_mask
Its sibling AutoRefCollage cuts people out of reference images with SAM3 and auto-composes them - fast, but it decides where everyone lands. ManualRefCollage is the same SAM3 pipeline with a control panel bolted on: each cutout lands on an editable canvas where you can drag, position, and scale it before the collage is rendered. If the auto layout overlaps your subjects or puts the wrong person on the wrong side of the frame, this is the node you reach for instead.
It's the more polished half of the pair, too - the changelog shows the author iterating on it hard across v2.0 through v2.2.2, fixing preview loading, bypass handling, and external width/height routing. It comes from the same single-maintainer pack (ComfyUI-FeiHou-Toolbox), same author as the wan2.2-Remix HuggingFace workflow.
How it works
Same SAM3 segmentation core as AutoRefCollage: model + clip from a CheckpointLoaderSimple pointed at a SAM3/SAM3.1 checkpoint (not your SDXL/Flux checkpoint), prompt as the detection phrase, up to five image_1..image_5 references. The difference is the frontend. The node's JS builds a canvas overlay, and a backend route (/feihou/manual_collage/load) generates SAM3 preview cutouts server-side so you can see the alpha edges before you run the workflow. When you're happy, the layout - position, scale, order of each cutout - is serialized into the layout_json widget and replayed during execution.
One extra trick: a video_frame input can sit behind the collage as a composition reference. background_opacity (default 0.3) blends that frame over the black/white background - handy when you're lining up subjects to match a scene before generation.
The inputs that matter
model/clip- SAM3 checkpoint and its CLIP, fromCheckpointLoaderSimple.prompt- short detection phrase, defaultperson.layout_json- the layout saved by the node UI. It's an internal field; you normally don't hand-edit it.width/height- the canvas size. Here's the gotcha: since v2.2.2 these are only applied when you click the应用尺寸(Apply Size) button. The author deliberately stopped auto-applying linked width/height, so early reads don't fire before KJNodesSet_variable/Get_variablechains are ready. If you wire width/height externally and nothing changes, click the button.detection_threshold- same SAM3 mask threshold as AutoRefCollage; lower keeps more edge detail.background_opacity/background- video-frame blend and collage background color.video_frame- optional background image to compose against.
Outputs: collage (IMAGE) and alpha_mask (MASK), same contract as the auto version.
Install
ComfyUI Manager (search ComfyUI-FeiHou-Toolbox) or:
cd ComfyUI/custom_nodes
git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-Toolbox
Restart ComfyUI and hard-refresh the browser - the canvas UI lives in the pack's JS, so a stale page means you'll see a bare node with no editor. No Python dependencies beyond what ComfyUI ships, but the pack needs a current ComfyUI build (it's written against the comfy_api.latest node API) and a SAM3 checkpoint on disk.
Common issues
- Width/height ignored - you edited or wired them but the canvas didn't move. Click
应用尺寸. That's the intended behavior, not a bug. - No cutout previews - the preview route needs to resolve the upstream
CheckpointLoaderSimple; if it can't, it errors out and you get an empty canvas. Check the checkpoint is actually connected. - Bypassed inputs sneak into the render - fixed in v2.1: ignored or bypassed images are now excluded from both the preview and execution. If you're on an old install, update the pack.
- Missing SAM3 license - SAM3 ships under Meta's custom SAM License, not Apache; worth a glance at the terms before you build production workflows on it.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | SAM3/SAM3.1 model from CheckpointLoaderSimple. | |
| clip | CLIP | SAM3/SAM3.1 CLIP from CheckpointLoaderSimple. The node encodes the prompt with this input. | |
| prompt | STRING | person | Text prompt used internally for SAM3 detection. Use a short object phrase, e.g. person or woman. |
| layout_json | STRING | Internal manual collage layout saved by the node UI. | |
| width | INT | 128064–8192 | Output collage width. |
| height | INT | 128064–8192 | Output collage height. |
| detection_threshold | FLOAT | 0.500–1 | SAM3 mask threshold after segmentation. Lower values keep more edge/detail; higher values remove weak regions. |
| background_opacity | FLOAT | 0.300–1 | Background video frame opacity mixed over the black/white collage background. |
| background | COMBO | black | Background color for the RGB collage image output. |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| video_frameopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| collage | IMAGE | — |
| alpha_mask | MASK | — |