Nodes/GlitchNodes/DitherMe | GlitchNodes
ComfyUI Node

DitherMe | GlitchNodes

Thirty-plus dithering algorithms in one node

By pxl-pshr·Created 2 years ago·Updated 3 months ago· 73
DitherMe | GlitchNodes
  • image
  • image
algorithm
color_mode
effect_size1.0
threshold0.50
sharpen0.0
blur0.0
noise0.00
temporal_coherence0.0
shadow_color#000000
midtone_color#808080
highlight_color#FFFFFF
shadow_brightness0.00
midtone_brightness0.50
highlight_brightness1.00
palette_colors2
seed0

If you've ever wanted to argue about whether Atkinson or Burkes is the superior error-diffusion kernel, DitherMe is your node. It implements over thirty dithering algorithms in one place - the full error-diffusion family, Bayer ordered dithering, clustered and dispersed dots, halftone lines and dots, blue noise, and a few genuinely weird ones like Hilbert curve and spiral dithering. It's the deepest node in the GlitchNodes pack, and the one that turns a boring render into something that looks like a screen-printed poster.

Under the hood it's honest image-processing: error diffusion (Floyd-Steinberg, Jarvis-Judice-Ninke, Stucki, Atkinson, Burkes, Sierra and its variants) spreads quantization error to neighboring pixels for that organic "printed" look, while the ordered/Bayer paths use fixed matrices for clean, mechanical patterns. What makes it more than a novelty is color_mode: monochrome, duotone, tritone, or indexed. The duo/tritone modes with the optional shadow_color / midtone_color / highlight_color (plus per-region brightness sliders) give you full control over the two- or three-color look - that's how you get a properly stylish risograph effect instead of default black-and-white.

The inputs that matter

  • algorithm - the big dropdown. Start with floyd_steinberg; graduate to stucki or atkinson when you want a finer texture. hilbert_curve and spiral are worth one try each just to see what they do.
  • color_mode - monochrome / duotone / tritone / indexed. This changes the whole character of the output; indexed uses palette_colors (2–256).
  • effect_size (0.1–10) - scales the dither pattern density. Higher = chunkier, more visible patterns.
  • threshold (0–1) - base threshold for dither decisions; the safety valve for brightness.
  • sharpen / blur / noise - pre-processing applied before dithering. A little sharpen makes fine detail survive; a little noise gives film grain.
  • temporal_coherence (0–1) - frame-to-frame blending for video. This is the pro move: without it, dithered animation shimmers like a bad GIF; a bit of coherence keeps it stable.
  • seed (optional) - reproducible noise for the random/blue-noise paths.

Output is image (IMAGE) → PreviewImage/SaveImage. Batches are supported, and the temporal controls are clearly aimed at video work.

Installing it

Part of the GlitchNodes pack - install once, get all 19 nodes. ComfyUI Manager → Install Custom Nodes → search "GlitchNodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/GlitchNodes
# restart ComfyUI

Dependencies: numpy, torch, Pillow, opencv-python, scipy. No model downloads - this one is pure CPU-friendly NumPy.

Gotchas

The sheer number of algorithms is the trap: people pick the wildest one (spiral, wave_interference) and wonder why their render is unrecognizable. Treat it like a toolset - error diffusion for portraits, ordered/Bayer for technical art, halftone for posters. Also, some of the special-effect algorithms are slow on large images, so drop effect_size before you run it on a 4K batch. And remember the pack's standing disclaimer: "highly experimental and may break or even error" - if a particular algorithm chokes, try a smaller image or a sibling algorithm.

CategoryGlitchNodes

Inputs (17)

NameTypeDefaultDescription
imageIMAGE
algorithmCOMBO36 options: floyd_steinberg, jarvis_judice_ninke, stucki, atkinson, burkes, sierra, +30
color_modeCOMBO4 options: monochrome, duotone, tritone, indexed
effect_sizeFLOAT1.00.1–10
thresholdFLOAT0.500–1
sharpenFLOAT0.00–2
blurFLOAT0.00–2
noiseFLOAT0.000–1
temporal_coherenceFLOAT0.00–1
shadow_coloroptSTRING#000000
midtone_coloroptSTRING#808080
highlight_coloroptSTRING#FFFFFF
shadow_brightnessoptFLOAT0.00-1–1
midtone_brightnessoptFLOAT0.50-1–1
highlight_brightnessoptFLOAT1.00-1–1
palette_colorsoptINT22–256
seedoptINT00–18446744073709550000

Outputs (1)

NameTypeDescription
imageIMAGE