Nodes/ComfyUI ASCII Art Nodes/ASCII Art Generator (Static)
ComfyUI Node

ASCII Art Generator (Static)

Your image, redrawn as terminal text — the honest way

By LamEmil·Created about a year ago·Updated about a year ago· 1
ASCII Art Generator (Static)
  • image
  • ascii_image
char_width100
font_pathcour.ttf
font_size15
ascii_charset .'`^":;Il!i~_?[{1(|/fjxnvzXYJCLQ0Zmwqdkh*#M&8%B@$
background_color#000000
text_color#FFFFFF
invert_brightness_mappingfalse

Of the eight nodes in LamEmil's ComfyUI ASCII Art Nodes pack, this is the one you'll actually reach for. Feed it any image and it hands you back a static ASCII-art version of that image at the exact same resolution. No model involved, no VRAM touched, no API key - it's pure Pillow image processing that could run on a Raspberry Pi if ComfyUI would fit on one.

The practical uses are the fun ones: profile pictures, thumbnails, t-shirt or print mockups, or just the retro-terminal look slapped onto a render you already made. Because it's a graph node, you drop it straight after VAE decode - KSampler → VAE Decode → this node → Save Image - and every image you generate can come out as text art too. For a single utility node, that's a lot of mileage.

How it works

The mechanism is classic ASCII conversion, and it's worth understanding because every other node in the pack is this same pipeline with extra steps. The image is downscaled to a char_width × character-height grid, where height is derived as char_width × aspect × 0.5 - the 0.5 compensates for terminal glyphs being roughly twice as tall as they are wide, so the output doesn't look squashed. The grid is grayscaled, and each pixel's brightness (0–255) is mapped linearly onto an index in ascii_charset, which is ordered from visually sparse to dense - the default starts with a space and ends at @ and $. That string of characters is rendered with Pillow at font_size, then LANCZOS-upscaled back to your input's original dimensions. So the output tensor is always the same size as the input tensor.

The inputs that matter

Most of the shared controls are self-explanatory, but three deserve your attention:

  • char_width (default 100) - the resolution of the text grid. 80–120 is the sweet spot; higher is more detail but more characters and slower renders.
  • font_path - defaults to cour.ttf, a Courier file that is not shipped with the pack. If Pillow can't load it, the node logs a warning and falls back to a chunky default bitmap font. Point this at a real monospace font - on Linux, /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf usually exists.
  • ascii_charset - the whole personality of the output lives here. Swap in different characters to change the texture.

text_color sets the uniform color of the glyphs (default #FFFFFF), background_color the canvas, and invert_brightness_mapping flips which end of the charset bright pixels use - handy if your source is dark-on-light.

The single output, ascii_image, is a normal IMAGE tensor. Wire it into any Save Image or preview node and you're done.

Install

Via ComfyUI Manager, search the pack title "ComfyUI ASCII Art Nodes" and install. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/LamEmil/ComfyUI_ASCIIArtNode
cd ComfyUI_ASCIIArtNode
pip install -r requirements.txt

Then restart ComfyUI. The only dependency is Pillow>=9.0.0; torch and numpy come from the ComfyUI environment. No model downloads, nothing heavy.

Where people get burned

The font is the number one gotcha - a missing font quietly degrades your output instead of erroring, so if your ASCII art looks like a pixelated mess, check font_path first. Two more things: the README calls the folder ComfyUI_ASCIINodes, but the repo clones as ComfyUI_ASCIIArtNode - don't rename it after cloning. And this is a tiny, single-commit hobby project (May 2025) with no real community footprint, so treat it as a fun utility rather than a maintained platform - it works as shipped, but don't expect fixes.

Categoryimage/art

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
char_widthINT10010–2000
font_pathSTRINGcour.ttf
font_sizeINT155–100
ascii_charsetSTRING .'`^":;Il!i~_?[{1(|/fjxnvzXYJCLQ0Zmwqdkh*#M&8%B@$
background_colorSTRING#000000
text_colorSTRING#FFFFFF
invert_brightness_mappingBOOLEANfalse

Outputs (1)

NameTypeDescription
ascii_imageIMAGE