Match image/mask sizes
Takes two images or masks and matches their sizes using various methods, detailed below. Inlcudes a node to smart-composite (auto match sizes first then composite)
Expand the smaller image to cover the larger image without changing the aspect ratio. Then center it. Then crop any overflowing edges until sizes match.
<details> <summary> Expand </summary> </details>
Same as
<details> <summary> Expand </summary> </details>cover_crop_center
but without centering the smaller after resizing.
Expand the smaller image as much as possible to fit inside the larger image without changing the aspect ratio. Then center it. Then pad any remaining space until sizes match.
<details> <summary> Expand </summary> </details>
Center the smaller image inside the larger image without changing either sizes. Then pad the smaller image until sizes match.
<details> <summary> Expand </summary> </details>
Expand the smaller image to exactly match the size of the larger image, allowing the aspect ratio to change
<details> <summary> Expand </summary> </details>
Center the smaller image on the larger image. Then crop the larger image to match the size of the smaller image
<details> <summary> Expand </summary> </details>
Same as
<details> <summary> Expand </summary> </details>crop_larger_center
but crops the larger image from the top left corner (skip centering)
invert
option<details> <summary> Expand </summary> </details>
<details> <summary> Expand </summary> </details>
<details> <summary> Expand </summary> </details>
<details> <summary> Expand </summary> </details>
cd
into ComfyUI/custom_nodes
git clone
this repo