ImageInvert_motorway_edition
Invert an image's colors straight out of the Motorway
- MOTORWAY ππ¨
- MOTORWAY ππ¨
Color inversion is a tiny operation with a surprising number of uses: negative images for film-style looks, flipping a white background to black (or vice versa) before it becomes a mask, or just the cel-shaded punch of a fully inverted render. ImageInvert_motorway_edition is stock ComfyUI's ImageInvert, wrapped for the MOTORWAY ππ¨ pipe in agilly1989/ComfyUI_agilly1989_motorway.
The wrapper reads the image out of the pipe under INPUT_image_key (default "image"), inverts every pixel (1.0 - value per channel), and stores the result back under OUTPUT_IMAGE_key (default "IMAGE"). Only visible output is the Motorway pipe - the inverted image sits in the pipe under that key for the next node.
What it's good for
- Flipping a light-background image to dark before you derive a mask from it
- Film-negative aesthetics on a generated image
- Quick A/B comparison against the original parked under a different key
Because there are no tuning knobs, this is about as thin as a node gets - the only fields are the read key, the write key, and the Motorway input itself.
How it works
The standard clone pattern: pop the Motorway, pull the image via the input key string, call stock ImageInvert, store the output under the output key, and return a cloned pipe so nothing upstream is mutated. Underneath it is the exact node ComfyUI ships - no behavior added.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or search "motorway" in ComfyUI Manager. Pure Python, no requirements.txt, no model downloads.
Gotchas
The pack-wide rules apply. Keys are exact and case-sensitive; a 'MotorwayClass' object has no attribute 'hash_' error means your key string doesn't match anything in the pipe. Remember the case default: you read "image" (lowercase) and write "IMAGE" (uppercase), so a chain of clones needs keys you set to match. And note the family status: these motorway_edition clones are the pack's experimental feature, disabled in the 1.1.7 hotfix - if the node isn't in your menu, stock ImageInvert is the identical node with wires.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β | |
| INPUT_image_key | STRING | image | β |
| OUTPUT_IMAGE_key | STRING | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY ππ¨ | MOTORWAY ππ¨ | β |