ComfyUI Node
Reference Concat
Concatenates a batch of reference images into a strip alongside a main image, for feeding identity references to video models without losing subject identity. The strip is placed on the main image's longest side, sized to exactly match that side's length (no resolution cap), and the main image is never shrunk. 'offset' slides the strip further into the main image (overlap) or further outside it (gap). If main_image is left unconnected, outputs a contact-sheet grid of just the reference images instead (side/ref_scale/offset are ignored in that mode). Accepts either a MoonPack Image List (keeps each reference's native resolution) or a plain stacked IMAGE batch.
Reference Concat
- reference_images
- main_image
- image
- mask
◄sidetop►
◄ref_scale0.50►
◄offset0►
◄fillblack►
◄interpolationbicubic►
◄max_ref_side0►
◄invert_maskfalse►
CategoryMoonPack/image
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| reference_images | IMAGE | Reference images to concatenate. Connect a MoonPack Image List to keep each image's native resolution (recommended for mixed-resolution references), or a plain stacked IMAGE batch. | |
| side | COMBO | top | Which side of the main image the strip goes on. The strip's row-vs-column layout is auto-picked from the main image's longest side; 'top'/'left' place the strip before the main image along that axis, 'bottom'/'right' place it after. Ignored if main_image is unconnected. |
| ref_scale | FLOAT | 0.500.01–4 | Strip thickness as a fraction of the main image's cross-side. The main image's long side is a cap: the strip is only scaled down (never stretched) if it would overflow. Ignored if main_image is unconnected. |
| offset | INT | 0-8192–8192 | Positive: slide the strip into the main image, covering that many pixels of it. Negative: pull the strip away from the main image, leaving a filled gap. Clamped so the main image is never cropped or shrunk. Ignored if main_image is unconnected. |
| fill | COMBO | black | Background color for any gap/leftover space. 'edge_average' samples the main image's edge nearest the strip, or the average of all references when main_image is unconnected. |
| interpolation | COMBO | bicubic | Resampling filter used whenever a reference image is resized, including upscaling references smaller than the target size. |
| max_ref_side | INT | 00–8192 | Caps each reference's longest side to this many pixels before any other processing (downscale only, never upscales). Keeps one oversized reference from blowing up the contact-sheet or strip size. 0 = no cap. |
| invert_mask | BOOLEAN | false | Flip the output mask (main-image/empty-cell area becomes 1.0 instead of the reference area). |
| main_imageopt | IMAGE | Main / first-frame image. If a batch is passed, only the first frame is used. Leave unconnected to instead output a contact-sheet grid of the reference images. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |