ImageToAscii
Turn any ComfyUI image into terminal ASCII art
- image
- STRING
ImageToAscii is the nostalgia node nobody asked for and a surprising number of people quietly enjoy. Feed it any IMAGE - a generated render, a loaded photo, a frame from a video pass - and it hands you back the same picture as a block of text characters, the way every BBS and cowsay-obsessed teenager made art in the '90s. It doesn't generate anything, it doesn't upscale anything, and it doesn't improve your images in any measurable way. What it does is take a finished image and translate it into @%#*+=-style characters you can paste into a terminal, a code comment, a README, or a Discord message. The author's own framing says it best: it exists "to decorate terminal apps like Neofetch." If that's not your use case, you're probably here for the novelty - and that's fine, it's a fun party trick.
It's a rare utility node that actually is as simple as it looks. The whole thing lives in one short file with zero extra dependencies - no model downloads, no pip installs, nothing beyond the torch, numpy, and Pillow that ComfyUI already ships. Compare that to the WAS Node Suite and rgthree utility sprawl the ecosystem is known for, and this is refreshingly small.
Here's the mechanism, straight from the source. The node takes your IMAGE tensor, strips the batch dimension, scales it to 0–255, and converts it to a PIL image. Then it resizes to whatever output_width you set, keeping the aspect ratio but multiplying height by 0.55 - that's the classic correction because terminal characters are roughly twice as tall as they are wide, and without it your art comes out stretched. It converts to grayscale, then walks every pixel and maps its brightness to a character: pixel // 32 gives you one of eight buckets, and darker pixels land on denser characters like @ while bright pixels get sparse ones. The result comes back as a STRING, gets printed to the server console, and gets written to a file called ascii_image.txt.
Three inputs actually matter:
- image - required, any IMAGE output. Sampler outputs work directly.
- output_width (default 64, min 8, max 640) - the width of the art in characters. Lower it and you get chunky, readable blocks; push it high and you get fine detail that wraps endlessly in a normal terminal.
- ascii_set_8chars_up (default
"@%#*+=-:. ") - the character ramp, ordered dark to light. You can swap in your own string here.
The output is a single STRING, and this is where beginners trip. ImageToAscii isn't an output node itself, so nothing appears on screen when you run it. You need to wire that string into a text sink - ComfyUI's built-in Preview Text or Save Text, or WAS Node Suite's Show Text - or just check the server console, since the node print()s the art every run. Oh, and that ascii_image.txt file: it's written to ComfyUI's working directory, not your output folder. If you go looking for it, that's where it'll be.
Two gotchas worth knowing. First, despite the default set having ten characters, only the first eight are ever used - pixel // 32 caps out at index 7, so the trailing . never appear no matter how bright the image is. Don't be confused when your output has no spaces. Second, if you replace the string with fewer than eight characters, you'll get a clean IndexError. Keep it at least 8 and you're fine.
Installing is one command:
cd ComfyUI/custom_nodes
git clone https://github.com/tomudo/ComfyUI-ascii-art
Then restart ComfyUI. Or, if you run ComfyUI Manager, just search "ComfyUI-ascii-art" in the install tab and hit install. That's genuinely the whole install - no models, no requirements.txt, no heavy dependencies.
One oddity: the node is filed under the conditioning category in the node menu, which is a weird home for something that produces text and touches nothing conditioning-related. You'll find it under "conditioning" when you right-click to add a node; ignore the label and just use it. For a small utility that costs you nothing but a moment of fun, it's hard to complain.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| output_width | INT | 648–640 | — |
| ascii_set_8chars_up | STRING | @%#*+=-:. | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |