ASCII | GlitchNodes
Your image, but made of text
- IMAGE
- image
ASCII turns any image into terminal-art - a grid of characters where each glyph is shaded to stand in for a block of the original. It's a novelty filter, sure, but it's a good one, and it's the rare node in GlitchNodes that isn't really a glitch at all. Great for album art, thumbnail treatments, or just making a portrait look like a 1982 mainframe printout.
The node is a port of the collidingScopes/ascii project (credited in the source), so the mechanics are battle-tested: it downsamples the image to a character grid, maps each cell's brightness to a glyph, and then does the fun part - paints the glyphs in a gradient between two font colors. So dark areas get fontColor, bright areas blend toward fontColor2. The defaults (#c7205b pink → #00ff61 green on a #080c37 navy background) are very synthwave, but any hex pair works.
The inputs that matter
- resolution (1–512, default 137) - how many characters across. This is the quality knob; low values give you big, blocky glyphs, high values get close to photorealistic text.
- fontColor / fontColor2 / background - the gradient colors and the canvas behind the glyphs.
- fontSizeFactor (0.1–10, default 3) - scales the built-in Pillow font relative to the cell size. Crank it if glyphs look cramped.
- textType -
Random Text(the default) picks random glyphs per cell;Input Textrenders the string intextInputinstead. Want it to spell something specific? SettextTypeto Input Text and type away. - threshold (0–255) and invert - fine-tune which brightness levels become which character.
- randomness (0–100, default 15) - how randomly characters are chosen; 0 gives a fixed ordered ramp, 100 is full noise. Plus a
seedto lock it down.
Output is a normal image (IMAGE), so it drops straight into PreviewImage/SaveImage or any downstream node. It also handles a batch, if you want a whole sequence as ASCII frames.
Installing it
It's part of the GlitchNodes pack - install that once and you get all 19 nodes. ComfyUI Manager → Install Custom Nodes → search "GlitchNodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/GlitchNodes
# restart ComfyUI
Requirements are numpy, torch, Pillow, opencv-python, scipy - nothing exotic, no model downloads. Note that ASCII and FrequencyModulation are the two nodes not listed in the pack README's node table; they're newer additions, so they can lag behind in documentation and behave a bit rougher around the edges.
Gotchas
The threshold behavior can surprise you - at 0 the mapping is automatic, and once you start raising it you're manually cutting the brightness ramp, which is where results can go from "art" to "grey soup." And because the glyphs are drawn with Pillow's built-in font, don't expect fancy fonts - keep the output small (under a few hundred pixels across) unless you enjoy enormous canvases. It's a playful node in an experimental pack: if a run errors or looks wrong, dial resolution down and move on.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| IMAGE | IMAGE | — | |
| background | STRING | #080c37 | — |
| fontColor | STRING | #c7205b | — |
| fontColor2 | STRING | #00ff61 | — |
| fontSizeFactor | FLOAT | 3.000.1–10 | — |
| resolution | INT | 1371–512 | — |
| threshold | INT | 00–255 | — |
| invert | BOOLEAN | true | — |
| randomness | INT | 150–100 | — |
| textType | COMBO | 2 options: Random Text, Input Text | |
| textInput | STRING | pxlpshr | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |