๐ ASCII Text Generator
Get Your Image Back as Actual Text You Can Paste Into a README
- image
- ascii_text
ASCII Text Generator is the pack's weird-but-useful outlier: it converts your image into ASCII art and hands it to you as a STRING, not an image. The output socket is plain text - copy it out of ComfyUI and paste it into a forum signature, a README, a terminal, or an email, and it renders as character art wherever monospace fonts live. The sibling ASCII Art Generator does the same conversion but draws it back into an IMAGE; this one is for when you actually want the raw text.
It's a rare case in ComfyUI where a node's whole job is to get data out of the graph as text. It's marked as an output node, so it shows its result in the UI - you can read the art right there in the node.
How it works
Same core algorithm as the ASCII Art Generator: grayscale conversion, downsizing to an ascii_width grid with height_compression to correct for character aspect ratio, a contrast-boost pass before mapping, and then a brightnessโcharacter lookup. The differences are the extras aimed at text output. It supports a custom_chars ramp (default " .-+*#@"), so you can define your own character set left-to-right from darkest to lightest - which is the one real reason to pick this node over its sibling. There are also add_border and line_numbers toggles for wrapping the output in a +--+ box with row numbers, which is oddly delightful for "generated source" aesthetics.
Styles match the sibling: classic, detailed (block chars), minimal, blocks (Unicode block elements), plus custom which uses your custom_chars ramp.
The inputs that matter
- ascii_width (20โ200, default 80) - characters per line. 80 is the classic terminal width.
- style - including
customfor your own character ramp. - custom_chars - your ramp, dark-to-light. Try
" โโโโ"for a chunkier look. - invert - flip which characters mean light vs dark.
- add_border / line_numbers - formatting extras for the pasted result.
- contrast_boost (1โ4, default 2) and height_compression (1โ3, default 2) - same as the sibling; nudge contrast if the art is muddy.
Output is a single STRING named ascii_text. Because it's an output node, you can't meaningfully chain it further - it's the end of the line by design.
Installing it
Part of 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. No models - the whole thing runs on NumPy and Pillow.
Gotchas
Same pack-wide note: only the first image of a batch is converted, so don't feed it a frame stack expecting per-frame text. The honest limitation is that pasted text art only looks right at a terminal's aspect ratio - the height_compression default of 2 exists because characters are about twice as tall as they are wide, so leave it alone unless your paste target is unusual. And heads-up: it doesn't print the text to the ComfyUI console - the result lives in the node's string output and the UI display, so read it there.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| ascii_width | INT | 8020โ200 | โ |
| style | COMBO | classic | 5 options: classic, detailed, minimal, blocks, custom |
| invert | BOOLEAN | false | โ |
| contrast_boostopt | FLOAT | 2.01โ4 | โ |
| height_compressionopt | FLOAT | 2.01โ3 | โ |
| custom_charsopt | STRING | .-+*#@ | โ |
| add_borderopt | BOOLEAN | false | โ |
| line_numbersopt | BOOLEAN | false | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ascii_text | STRING | โ |