Nodes Browser
ComfyDeploy: How Node - Size Matcher works in ComfyUI?
What is Node - Size Matcher?
Match image/mask sizes
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
Node - Size Matcher
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Node - Size Matcher
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)
cover_crop_center
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>
cover_crop
Same as
<details> <summary> Expand </summary> </details>cover_crop_center
but without centering the smaller after resizing.
fit_center
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_dont_resize
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>
fill
Expand the smaller image to exactly match the size of the larger image, allowing the aspect ratio to change
<details> <summary> Expand </summary> </details>
crop_larger_center
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>
crop_larger_topleft
Same as
<details> <summary> Expand </summary> </details>crop_larger_center
but crops the larger image from the top left corner (skip centering)
Node - Paste Cutout on Base Image (Compositing)
- Composites two images together
- Automatically matches size of the images with various size matching methods (if necessary)
- If the cutout doesn't have an alpha channel (not really a cutout), the bg is automatically inferred and made transparent
invert
option
Base Layer Composite with Alpha Layer
<details> <summary> Expand </summary> </details>
BG Being Inferred when Alpha Layer is Missing
<details> <summary> Expand </summary> </details>
Using with Auto Segmentation
<details> <summary> Expand </summary> </details>
With Chromakeying
<details> <summary> Expand </summary> </details>
Installation
cd
intoComfyUI/custom_nodes
git clone
this repo
Requirements
- Python3.10+