Nodes/ComfyUI_agilly1989_motorway/ControlNetInpaintingAliMamaApply_motorway_edition
ComfyUI Node

ControlNetInpaintingAliMamaApply_motorway_edition

Masked inpainting ControlNet on the Motorway — the AliMama flavor

By agilly1989·Created 2 years ago·Updated about a year ago· 7
ControlNetInpaintingAliMamaApply_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_positive_keypositive
INPUT_negative_keynegative
INPUT_control_net_keycontrol_net
INPUT_vae_keyvae
INPUT_image_keyimage
INPUT_mask_keymask
strength1.00
start_percent0.000
end_percent1.000
OUTPUT_positive_keypositive
OUTPUT_negative_keynegative

Inpainting ControlNets are the "mask-aware" branch of the ControlNet family: instead of a preprocessor feeding the model a structure map, the mask itself becomes part of the condition, so the model learns to treat masked areas as "paint here" and unmasked areas as "leave alone". ControlNetInpaintingAliMamaApply is the core node that applies that style of ControlNet - the "AliMama" naming comes from the original SD1.5 inpainting ControlNet this node class was built for - and the _motorway_edition runs it from the bus.

How it works

Mechanically it's the core node from nodes_controlnet.py, and it looks a lot like ControlNetApplyAdvanced except there's one extra input: the mask. Positive and negative conditioning go in, a control net, a VAE to encode the image, the image, and the mask - and the two conditioned outputs come back out, with strength plus start_percent/end_percent controlling how hard and when the control applies. The Motorway wrapper turns every data input into an INPUT_*_key string and every output into an OUTPUT_*_key.

The honest framing from the KB's inpainting essay: instruction-editing models ate most of the "fix this region" use case, but a ControlNet-based inpaint still wins where you want the rest of the image untouched and precise control over the masked region - and the mask-aware ControlNet blends edges better than blind model inpainting.

The inputs that matter

  • MOTORWAY 🚌💨 - the bus, required.
  • INPUT_positive_key / INPUT_negative_key - conditionings, defaults positive / negative.
  • INPUT_control_net_key - the inpainting CONTROL_NET, default control_net.
  • INPUT_vae_key / INPUT_image_key - VAE and the image to inpaint on, defaults vae / image.
  • INPUT_mask_key - the mask that says what gets regenerated, default mask. This is the field that makes this node different from the plain advanced apply.
  • strength / start_percent / end_percent - the usual knobs.
  • OUTPUT_positive_key / OUTPUT_negative_key - defaults positive / negative.

Only output: the Motorway.

Installing

The pack install, same as everything here:

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart, or ComfyUI Manager → "ComfyUI_agilly1989_motorway". No pip deps. You supply the inpainting ControlNet weights and the mask - neither comes from the pack.

Caveats

Pack-wide: active beta, "BIG BROKEN WITH ASYNC" README banner, _motorway_edition clones commented out of __init__.py in the checked version (uncomment ClonedNodeMapping if missing). Keys are exact and case-sensitive - hash_ error means a key isn't in the bus. And a practical note: "AliMama" weights are SD1.5-era, so make sure the inpainting ControlNet you load actually matches your base model, or this node will silently do nothing useful. If you're not on a Motorway, plain ControlNetInpaintingAliMamaApply is the same node.

Categoryagilly1989 Nodes/Motorway-ed/conditioning/controlnet

Inputs (12)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_positive_keySTRINGpositive
INPUT_negative_keySTRINGnegative
INPUT_control_net_keySTRINGcontrol_net
INPUT_vae_keySTRINGvae
INPUT_image_keySTRINGimage
INPUT_mask_keySTRINGmask
strengthFLOAT1.000–10
start_percentFLOAT0.0000–1
end_percentFLOAT1.0000–1
OUTPUT_positive_keySTRINGpositive
OUTPUT_negative_keySTRINGnegative

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨