Nodes/ComfyUI-Image-Effects/๐ŸŽญ ASCII Art Generator
ComfyUI Node

๐ŸŽญ ASCII Art Generator

Turn a Render Into Terminal-Art, and Keep It an Image You Can Save

By orion4dยทCreated about a year agoยทUpdated about a year agoยท 28
๐ŸŽญ ASCII Art Generator
  • image
  • IMAGE
โ—„ascii_resolution80โ–บ
โ—„styleclassicโ–บ
โ—„invertfalseโ–บ
โ—„background_colorwhiteโ–บ
โ—„text_colorblackโ–บ
โ—„contrast_boost2.0โ–บ
โ—„height_compression2.0โ–บ
โ—„font_scale0.9โ–บ

ASCII Art Generator converts your image into classic character-based art - .:-=+*#%@ - and then renders that text back into an image. So the output is a normal IMAGE you can preview, save, and run further filters on. If you want pure text instead of a picture of text, that's the pack's sibling ASCII Text Generator; this node is the one that stays in the image pipeline.

It's the go-to for retro-computer aesthetic: cover art that looks like a 1970s line-printer printout, "mainframe" headers for a project, or just a fun way to break up a boring preview. It slots in anywhere - it takes an IMAGE in and gives an IMAGE out, so you can even feed the ASCII result back into more effects.

How it works

The pipeline is the classic luminance-to-character mapping, done carefully. It converts to grayscale, downsizes to an ascii_resolution-wide grid (with height_compression dividing the height, because monospace characters are taller than they are wide), then maps each pixel's brightness onto a character ramp from space to @. Crucially, it applies contrast boost before mapping - a power-curve stretch plus an S-curve (via a tanh) - so the characters actually track detail instead of collapsing into a gray mush. If invert is on, it maps darkโ†’@ instead.

The character ramps vary by style: classic is the 10-char ramp above, detailed uses block characters โ–‘โ–’โ–“โ–ˆ, minimal is a short 5-char ramp, and blocks uses Unicode block elements. Then it draws the text onto a background color at font_scale and returns an image at your original resolution.

The inputs that matter

  • ascii_resolution (20โ€“200, default 80) - characters across the image width. 80 is recognizable; 200 gets seriously detailed (and slow).
  • style - classic, detailed, minimal, or blocks. Pick your aesthetic; blocks gives a chunky pixel-art vibe.
  • invert - flips light/dark mapping; essential for black-background versions.
  • contrast_boost (1โ€“4, default 2) - how aggressively it stretches contrast before mapping. Higher = more dramatic separation, and more crushed midtones.
  • background_color / text_color - white, black, gray (or auto for text). text_color: auto picks whatever maximizes contrast against your chosen background.

Single IMAGE output at your original dimensions.

Installing it

Ships in ComfyUI-Image-Effects (Orion4D). ComfyUI Manager โ†’ search "Image Effects", or:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects
cd ComfyUI-Image-Effects
pip install -r requirements.txt

Restart, then it's under Add Node โ†’ Image Effects. It uses Pillow for text rendering - no models, no downloads.

Gotchas

Standard pack behavior: only the first image of a batch is processed. The thing to know about ASCII is that faces and fine detail simply don't survive - this effect lives on bold shapes and strong contrast, so portrait work will be mush no matter what you do. If the output looks too light or too dark, change invert or drop contrast_boost before fighting the sliders. And since the output is a full-resolution image, there's no point putting it through an upscaler - the character grid is the resolution, and that's the charm.

CategoryImage Effects

Inputs (9)

NameTypeDefaultDescription
imageIMAGEโ€”
ascii_resolutionINT8020โ€“200โ€”
styleCOMBOclassic4 options: classic, detailed, minimal, blocks
invertBOOLEANfalseโ€”
background_coloroptCOMBOwhite3 options: white, black, gray
text_coloroptCOMBOblack3 options: black, white, auto
contrast_boostoptFLOAT2.01โ€“4โ€”
height_compressionoptFLOAT2.01โ€“3โ€”
font_scaleoptFLOAT0.90.3โ€“1.5โ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”