ImageCompositeMasked_motorway_edition
Paste one image onto another with a mask, all inside the pipe
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
This is the node you use when you've generated something separately and want to plant it on top of another image - a face back onto a body, an object into a scene, a detail crop stitched back after a high-res pass. ImageCompositeMasked_motorway_edition is stock ComfyUI's ImageCompositeMasked, wrapped for the MOTORWAY 🚌💨 pipe in agilly1989/ComfyUI_agilly1989_motorway.
Where the normal node takes three image/mask wires, this one reads all three out of the pipe by key, composites them, and writes the result back into the pipe. Its only visible output is the Motorway.
Inputs that matter
INPUT_destination_key(default"destination") - the base image being pasted ontoINPUT_source_key(default"source") - the image being pasted inINPUT_mask_key(default"mask") - controls where the source shows throughxandy(INT, 0 to 16384) - where the source lands on the destinationresize_source(BOOLEAN, default off) - scale the source to match the destination's size before pastingOUTPUT_IMAGE_key(default"IMAGE") - the composite lands here in the pipe
The resize_source toggle is the one to remember: leave it off and the source is placed at native size, which is what you want for the crop-and-stitch detailer pattern. Turn it on and it stretches the source to fit the destination, which is handy when the two came from different generators.
How it works
Standard clone mechanics: pop the Motorway, pull destination, source and mask out using their key strings, run stock ImageCompositeMasked with x, y and resize_source, store the result under OUTPUT_IMAGE_key, and return a cloned pipe so nothing upstream is touched. The composite pattern pairs well with the pack's mask utilities - grow or feather your mask first if you want the seam to soften.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or install via ComfyUI Manager (search "motorway"). Pure Python, no requirements.txt, no downloads.
Gotchas
Keys are exact and case-sensitive; a 'MotorwayClass' object has no attribute 'hash_' error means one of the three keys ("destination", "source", "mask") was never written to the pipe - check what the upstream node actually stored under. Watch the defaults, too: this reads lowercase keys and writes uppercase "IMAGE", so chained clones need matching strings. And the pack's standing health warning applies: it's BETA, and the motorway_edition clone family is disabled in the 1.1.7 hotfix, so if the node's missing from your menu the stock version does the same job with wires.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_destination_key | STRING | destination | — |
| INPUT_source_key | STRING | source | — |
| INPUT_mask_key | STRING | mask | — |
| x | INT | 00–16384 | — |
| y | INT | 00–16384 | — |
| resize_source | BOOLEAN | false | — |
| OUTPUT_IMAGE_key | STRING | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |