ImageQuantize_motorway_edition
Palette size plus dithering
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
Quantization is how you force a smooth photo-like image into a limited palette - the trick behind posterization and a lot of pixel-art looks. ImageQuantize_motorway_edition is stock ComfyUI's ImageQuantize, wrapped for the MOTORWAY 🚌💨 pipe in agilly1989/ComfyUI_agilly1989_motorway.
It reads the image out of the pipe under INPUT_image_key (default "image"), reduces it to a set number of colors, and stores the result back under OUTPUT_IMAGE_key (default "IMAGE"). The only visible output is the Motorway pipe - the quantized image is parked in the pipe under that key.
Inputs that matter
INPUT_image_key(default"image") - pipe key of the sourcecolors(INT, 1 to 256, default 256) - how many distinct colors the result can use. Lower is more aggressively posterizeddither-none,floyd-steinberg,bayer-2,bayer-4,bayer-8,bayer-16OUTPUT_IMAGE_key(default"IMAGE") - where the result lands
The dither choice is the aesthetic dial. With none you get hard, flat bands of color - clean and graphic. Floyd–Steinberg scatters noise between neighboring pixels so the eye blends them into more apparent colors, which keeps gradients readable at low palette counts. The bayer-* options are ordered (checkerboard-style) dithering; higher numbers give finer patterns. For pixel-art, colors around 16–64 with no dither is the classic look; for a "paint-by-numbers" poster, 8 or fewer colors lands closer to where you're going.
How it works
Standard clone mechanics: pop the Motorway, pull the image via the input key, run stock ImageQuantize with colors and dither, store the result under the output key, and return a cloned pipe so nothing upstream is mutated. Underneath, it's the exact node ComfyUI ships - the only thing this pack adds is the key-based plumbing.
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 model downloads.
Gotchas
Keys are exact and case-sensitive; a 'MotorwayClass' object has no attribute 'hash_' error means your key string matches nothing in the pipe. Mind the case default - you read "image" (lowercase) and write "IMAGE" (uppercase), so a chain of clones needs keys you set to match. And the family status: BETA, with the motorway_edition clones disabled in the 1.1.7 hotfix - if it's not in your menu, stock ImageQuantize does the identical job with wires.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_image_key | STRING | image | — |
| colors | INT | 2561–256 | — |
| dither | COMBO | 6 options: none, floyd-steinberg, bayer-2, bayer-4, bayer-8, bayer-16 | |
| OUTPUT_IMAGE_key | STRING | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |