SetLatentNoiseMask_motorway_edition
Inpainting without a single wire across the canvas
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
This is the core ComfyUI SetLatentNoiseMask node, but living on the Motorway: instead of dragging a wire from your latent and a wire from your mask, you tell it which keys hold them in the Motorway and let a single pipe carry everything.
If you've done inpaint in ComfyUI before, you know the shape of this node. You take an image, paint a mask over the bit you want regenerated, VAE-encode both, then set a noise mask on the latent so the sampler only denoises inside the masked region. Everything outside stays untouched. The _motorway_edition version does exactly that, it just pulls its two inputs out of a shared Motorway by name.
The Motorway, quickly
This pack is agilly1989's take on a "pipe" - a way to stop a big workflow from turning into a plate of spaghetti. You start with MotorwayStart, drop values onto the pipe with Motorway AxB nodes (each value stored under a text key you type), and later nodes read those keys back. The _motorway_edition nodes are auto-generated clones of ComfyUI's own nodes, added in the pack's 1.1.0 update: they wrap the original node, pull inputs from the Motorway, run it, and write outputs back under keys you specify.
What to set
The inputs that matter here are the three key fields, all plain text:
INPUT_samples_key(defaultsamples) - the Motorway key holding the LATENT you want to inpaint.INPUT_mask_key(defaultmask) - the Motorway key holding the MASK that defines the region to regenerate.OUTPUT_LATENT_key(defaultLATENT) - the key the masked latent gets written to.
On the way in you need a latent and a mask in the pipe; on the way out you get the modified latent under LATENT, ready for your KSampler. The whole node has no sliders - everything is keys, because the original node's inputs are all connections, not widgets. It returns a MOTORWAY, so it slots straight into the middle of a pipe chain.
Installing it
Same as any custom node:
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI and it appears under agilly1989 Nodes → Motorway-ed → latent → inpaint. ComfyUI Manager can also install it - search for ComfyUI_agilly1989_motorway. There are no pip dependencies here; this is pure-Python wrapping of core nodes.
Where people get burned
The classic failure is a key mismatch. If the Motorway doesn't have a key you referenced, you'll see 'MotorwayClass' object has no attribute 'hash_' - that error means a key doesn't exist in the pipe. Keys are case-sensitive and must match exactly between the node that wrote the value and this one reading it.
Second, remember the mask lives on the Motorway too. If you're coming from a normal ComfyUI graph where the mask wire just exists, you now have to write it onto the pipe (e.g. from a SolidMask or a mask-from-image node) under the key mask before this node runs. And a note on the pack itself: it's in active beta, the README says so in caps - "if things break it's because I broke it." If you update the pack and motorway-ed nodes start disappearing from the menu, that's a known pack-side shuffle, not a corrupt install.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_samples_key | STRING | samples | — |
| INPUT_mask_key | STRING | mask | — |
| OUTPUT_LATENT_key | STRING | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |