Nodes/😸 YFG Comical Nodes/🐯 YFG Image Halftone Generator
ComfyUI Node

🐯 YFG Image Halftone Generator

Turn a photo into a halftone, CMYK screen angles included

By gonzaluΒ·Created 2 years agoΒ·Updated 5 days agoΒ· 29
🐯 YFG Image Halftone Generator
  • image
  • Halftone
  • Original Image
β—„samples10β–Ί
β—„scaling1β–Ί
β—„grayscaleNoβ–Ί
β—„angle_c0β–Ί
β—„angle_m15β–Ί
β—„angle_y30β–Ί
β—„angle_k45β–Ί
β—„previewtrueβ–Ί
β—„displayhalftoneβ–Ί

Remember what comics and old newspapers look like up close - the image dissolves into a field of dots? That's halftoning, a pre-digital printing trick where tonal value is encoded as dot size: dark areas get big dots, bright areas get small ones. This node reproduces the effect digitally, and it does it properly, with separate CMYK channels and the classic rotated screen angles. If you want a poster, a pop-art treatment, or a retro print look on top of a render, this is the node.

The "YFG Image Halftone Generator" comes from the gonzalu/ComfyUI_YFG_Comical pack, itself based on Phil Gyford's original halftone code and the ComfyUI port by aimingfail. The README credits both, and the implementation shows it - this isn't a cheap filter, it's the real algorithm.

How it works

The image is split into CMYK channels (cyan, magenta, yellow, black). Each channel gets rotated by its own screen angle - the classic print angles are 0Β°, 15Β°, 30Β°, 45Β°, which are the node's defaults for angle_c, angle_m, angle_y, angle_k. The channel is then sampled in a grid of samples-sized blocks, and for each block the average brightness decides the diameter of a drawn dot (darker β†’ bigger). Each channel's dots are rotated back and layered. The result genuinely looks like offset printing.

Two knobs drive the look:

  • samples (1–32, default 10) - the dot grid resolution. Smaller = finer dots, closer to a photo; larger = chunkier, more aggressive print texture.
  • scaling (1–5, default 1) - multiplies the dot size on the same grid. Bump it for big fat dots that scream "screen-printed".

grayscale = Yes collapses everything to a single black channel (the color angles are dropped), giving a classic newsprint B&W halftone. display toggles the node's preview between the halftone result and the untouched original, and preview turns it off.

Outputs

Two IMAGE outputs: Halftone (the processed result) and Original Image (the input passed through). The original is handy if you're building a before/after pair without a second load.

Installing

Pack install, as with every node here: ComfyUI Manager β†’ search "YFG Comical", or

cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical

Restart ComfyUI. Pure PIL, no extra dependencies, no model files. (The pack-wide cv2/matplotlib import issue can still take the whole pack down; pip install opencv-python matplotlib fixes it if so.)

Practical notes

The default angles are the classic ones - leave them alone until you're chasing moirΓ© patterns, which appear when two channels' angles are too close. A halftone of a low-res or heavily compressed image looks muddy; feed it a clean render. And for real retro authenticity, downscale the image a touch first - halftone dots love a slightly soft source. This is a great "save the render from being bland" effect: run it on a character portrait and suddenly you have poster art.

Category🐯 YFG

Inputs (10)

NameTypeDefaultDescription
imageIMAGEβ€”
samplesINT101–32β€”
scalingINT11–5β€”
grayscaleCOMBONo2 options: No, Yes
angle_cINT00–90β€”
angle_mINT150–90β€”
angle_yINT300–90β€”
angle_kINT450–90β€”
previewBOOLEANtrueβ€”
displayCOMBOhalftone2 options: halftone, original

Outputs (2)

NameTypeDescription
HalftoneIMAGEβ€”
Original ImageIMAGEβ€”