Enable resize_source when your intended operation is to resize the source to the destination image’s dimensions. Leave it off when the source should retain its dimensions and you want to place its top-left corner using x and y. These are different compositing choices, not mask settings: decide from the intended output size and placement, then inspect the result against the destination canvas.
Decide what should happen to the source
The ImageCompositeMasked documentation describes resize_source as a Boolean that controls whether the source is resized to match the destination’s dimensions. Treat “match” as a size instruction, not as a guarantee that the source will fit a particular subject or preserve a desired composition.
Use resize_source = true when the composite calls for a source brought to the destination’s width and height. Use false when the source’s existing dimensions are intentional and its placement should be controlled by coordinates. If preserving the source’s size matters, do not enable resizing simply because the images have different dimensions.
The documentation identifies x and y as the destination coordinates for the source’s top-left corner. With resizing off, use those values to choose where the source begins, then inspect how much of it lies within the destination. The documentation does not specify edge behavior for every out-of-bounds placement, so do not assume that coordinates will expand the canvas or that an off-canvas source will behave in a particular way.
Check the node inputs
The three image-related inputs have distinct jobs. destination is the background image and defines the canvas being composited onto. source is the image placed over it. The optional mask specifies which parts of the source are composited; it does not decide whether the source is resized. The input reference documents the mask separately from the resize flag.
Before adjusting the mask, confirm that you have the right destination and source connected. A mask cannot correct a mistaken size decision, and changing x or y does not resize the source. Keep those controls conceptually separate while diagnosing the result.
Make and inspect a size decision
- Read the width and height of both image inputs and note the intended destination canvas size.
- State the intended result: should the source be resized to the destination’s dimensions, or retain its own dimensions?
- Set
resize_sourcetotruefor the first goal andfalsefor the second. Confirm that the mask input, if used, is serving the intended compositing role. - When resizing is off, set
xandyfor the source’s top-left corner in destination coordinates. Use the image preview to check position and visible coverage, rather than judging by coordinates alone. - Inspect the resulting
imageoutput. Compare its canvas, the visible source extent, and the areas selected by the mask with your stated goal. If a dimension or position is wrong, change one relevant control at a time and inspect again.
Hypothetical acceptance checks
The following dimensions and observations are hypothetical examples for planning a check, not software test results. They illustrate how to state the goal before judging the output.
| Destination | Source | Goal and setting | Hypothetical acceptance check |
|---|---|---|---|
| 1024 × 1024 | 640 × 360 | Match destination size; resize_source = true | Check that the source is resized to the destination dimensions as documented; inspect whether the resulting composition suits the intended artwork. |
| 1200 × 800 | 400 × 300 | Preserve source size; resize_source = false, x = 700, y = 420 | The source begins at that top-left position; inspect the output near the right and bottom edges to see what is visible within the destination canvas. |
The second example places the source near two canvas edges; it does not predict how out-of-bounds pixels are handled. If your intended acceptance condition depends on edge clipping, cropping, or canvas expansion, verify that behavior in the actual workflow rather than inferring it from this documentation.
Troubleshoot without mixing controls
If the source looks the wrong size, first compare the intended size operation with resize_source; do not try to compensate by moving it with x or y. If it has the right size but is in the wrong place, keep the resize choice fixed and adjust the coordinates. If the wrong regions appear, inspect the mask and its connection separately. If the source is unexpectedly missing or only partly visible, check the coordinates against the destination canvas and review the output; the documentation does not promise a particular out-of-bounds result.
This node description does not specify aspect-ratio handling, mask-resampling details, coordinate behavior beyond identifying the top-left placement, or how out-of-bounds source pixels are treated. Do not rely on assumptions about those details when they determine delivery requirements. Check the actual output in your ComfyUI workflow.
Common questions
Does `resize_source` control how much of the source mask is visible? No. The documented role of the flag is source resizing; the optional mask controls which source parts are composited.
Should I turn it on whenever the image sizes differ? Not automatically. Turn it on if your goal is to resize the source to the destination dimensions. Leave it off if preserving source dimensions is part of the intended result.
What should I adjust when the source has the right dimensions but is misplaced? Use x and y, which the documentation defines as the top-left placement coordinates in the destination. Then inspect the output to confirm visible position and coverage.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the photo editor. The external software controls discussed above belong to their respective products.