๐ญ ASCII Art Generator
Turn a Render Into Terminal-Art, and Keep It an Image You Can Save
- image
- IMAGE
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, orblocks. Pick your aesthetic;blocksgives 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
autofor text).text_color: autopicks 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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| ascii_resolution | INT | 8020โ200 | โ |
| style | COMBO | classic | 4 options: classic, detailed, minimal, blocks |
| invert | BOOLEAN | false | โ |
| background_coloropt | COMBO | white | 3 options: white, black, gray |
| text_coloropt | COMBO | black | 3 options: black, white, auto |
| contrast_boostopt | FLOAT | 2.01โ4 | โ |
| height_compressionopt | FLOAT | 2.01โ3 | โ |
| font_scaleopt | FLOAT | 0.90.3โ1.5 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |