Stylize
X1Stylize is the comic/fine-art shortcut
- image
- mask
- image
- mask
- stylize_info
Every now and then you want the image to stop looking like a render and start looking like a print - flat color bands, halftone dots, ink lines. The usual route is a pile of filters that fight each other. x1Stylize bundles the three classic deterministic stylizers - posterize, halftone, and ink linework - into one node with a single settings blob, so you can push an image toward "screen-printed poster" or "inked comic panel" without installing a graphic-design plugin.
How it works
The three effects stack on top of each other, and each is off until you turn it on:
- Posterize (
posterize_bits, default 8 = full range, effectively off). Drop to 4 or 3 and the image collapses into distinct color bands. This is the flat-graphic look - each band gets the average of its range, so gradients become hard edges. The "bits" phrasing is the classic Photoshop posterize scale; 8 bits is the original range, each step down halves the color levels. - Halftone (
halftone_strength, default 0 = off;halftone_size, 8). When strength is above zero, the node renders the image through a halftone dot screen - brightness becomes dot size, exactly like a newspaper photo or old comic print.halftone_sizeis the dot pitch in pixels: small for fine detail, big for an aggressively retro look. - Ink (
stylize_ink_strength, default 0 = off;stylize_ink_threshold, 0.28). This is the line-art pass - it extracts edges and dark areas as black "ink" over the image, thresholded so only strong contrasts get the treatment. Combined with posterize it reads like a cel or a screen-print; on its own it's a stylized sketch effect.
Because they're independent, you can dial in any combination: posterize alone for flat graphic, halftone + low posterize for a printed texture, ink + posterize for a comic panel.
The inputs that matter
All settings live in a settings_json string, prefilled:
posterize_bits(8) - color levels; lower = flatter.halftone_strength(0) /halftone_size(8) - dot-screen amount and pitch.stylize_ink_strength(0) /stylize_ink_threshold(0.28) - ink amount and edge threshold.mask_feather(12.0) /invert_mask- for when the optionalmaskinput limits the effect to a region.
Outputs are image, mask (the affected region), and stylize_info (a one-line log of the active settings).
Installing it
It's part of the MKRShift Nodes pack. ComfyUI Manager: search "MKRShift", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart after. No models - these are deterministic pixel operations that run in milliseconds on CPU.
Gotchas
The settings_json rule applies: invalid JSON silently resets to defaults, so if your halftone "stopped working," check the braces before anything else. And a stylistic note: halftone and ink are resolution-sensitive. A halftone dot pitch of 8px looks like retro print at 512px and disappears into noise at 2048px. Pick the dot size on the resolution you're actually delivering. Also worth knowing: posterize on skin produces posterized skin - if you're stylizing a portrait, mask the face out first or run it at a high bit count and let the halftone carry the look.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| settings_json | STRING | {"posterize_bits":8,"halftone_strength":0.0,"halftone_size":8,"stylize_ink_strength":0.0,"stylize_ink_threshold":0.28,"mask_feather":12.0,"invert_mask":false} | — |
| maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| stylize_info | STRING | — |