Nodes/X4Lch3mist Nodes/Dither 1-bit
ComfyUI Node

Dither 1-bit

1-bit dither: turns an image into two colours using stripes, Bayer dots, halftone or error diffusion. Also outputs the pattern as a MASK for compositing.

By X4Lch3mist·Created 2 months ago·Updated about a month ago· 0
Dither 1-bit
  • image
  • image
  • mask
◄patterndiagonal stripes►
◄pixel_size2►
◄pattern_size8►
◄smoothing0.30►
◄black_point0.15►
◄white_point0.90►
◄gamma1.00►
◄invertfalse►
◄fg_color#FFFFFF►
◄bg_color#000000►
CategoryX4Lch3mist/image

Inputs (11)

NameTypeDefaultDescription
imageIMAGE—
patternCOMBOdiagonal stripes9 options: diagonal stripes, diagonal stripes (reverse), horizontal lines, vertical lines, crosshatch, bayer, +3
pixel_sizeINT21–32Size of one dither pixel in output pixels. Bigger = coarser, more retro.
pattern_sizeINT82–64Period of the stripes / dots, measured in dither pixels. Ignored by floyd-steinberg and atkinson.
smoothingFLOAT0.300–1Blends a little Bayer into stripes/dots. 0 = hard graphic lines, higher = finer tone steps.
black_pointFLOAT0.150–1Everything darker than this becomes solid background. Raise it if dark areas get striped.
white_pointFLOAT0.900–1Everything brighter than this becomes solid foreground.
gammaFLOAT1.000.1–5>1 brightens midtones (more ink), <1 darkens them.
invertBOOLEANfalse—
fg_colorSTRING#FFFFFFColour of the 'on' pixels, hex.
bg_colorSTRING#000000Colour of the 'off' pixels, hex.

Outputs (2)

NameTypeDescription
imageIMAGE—
maskMASK—