Nodes/ascii-art-comfyui/AsciiGenerator
ComfyUI Node

AsciiGenerator

Make your ComfyUI output actually look like ASCII art

By Deep-Neko·Created about a year ago·Updated about a year ago· 3
AsciiGenerator
  • image
  • IMAGE
width512
height512
num_cols-1

Let's get one thing straight before you wire this up: AsciiGenerator is not a filter that turns a finished image into ASCII art. It's a preprocessor - it renders your source image as a block of characters and hands that to a ControlNet, so the sampler generates ASCII-art-looking output instead of pasting a watermark over it. The name's a little generous, but the mechanism is the thing, and it works.

What it's for

ASCII art as an aesthetic is one of those creative-outlier looks that ControlNet users love and the big model trainers never bothered with. Think QR-code ControlNet: bright, weird, pattern-based conditioning that's genuinely popular but got stranded on SD 1.5 while everyone shipped canny/depth/pose unions for the modern bases. This node is the control-map generator for exactly that genre - it's the preprocessor half of a one-trick setup. By itself the node does nothing. Paired with the matching control_sd15_ascii.ckpt ControlNet (the "ASCII art controlnet" on Civitai that this pack's README links to) and an SD 1.5 checkpoint, it turns any prompt into output that genuinely reads as rendered text.

How it works

The mechanism is old-school and satisfyingly simple. Your input image gets resized to width×height and converted to grayscale. Then it's chopped into a grid of cells, and each cell's average brightness maps to one character - darker cells get denser characters, brighter cells get lighter ones. The pack ships a character set (English alphabet by default, sorted by rendered brightness so the mapping is consistent) and a bundled monospace font, so it's all self-contained. The character grid is drawn out with Pillow, cropped to its bounding box, and resized back to your target size.

One detail worth knowing: the node exposes a num_cols setting for column count, and -1 (the default) auto-picks it as (width/height) × 200. At 512×512 that's roughly a 200-column grid - dense enough to look like real ASCII art rather than vague letter-shaped smudges.

The inputs that matter

There are only three, plus the image, which is exactly the right amount of friction for a niche node:

  • image - any IMAGE tensor. Feed it from LoadImage or from a previous node if you want to chain effects.
  • width / height - target canvas size, default 512×512, from 128 to 2048. Keep it near your latent size; the ASCII map gets resized to match anyway.
  • num_cols - character columns, -1 for auto. Lower it for chunky, readable block letters; raise it for fine detail that mostly becomes noise.

The single output is an IMAGE - the rendered ASCII map, which you wire into a ControlNetApply / ControlNetApplyAdvanced node's image input, or straight into a PreviewImage to see what the model will be looking at. That's the whole graph: load image → generate ASCII map → apply ASCII ControlNet → sample.

Installing it

ComfyUI Manager is the easy route: open it, search for ascii-art-comfyui (the pack's registry title) and hit install. Manual install is the usual two-liner:

cd ComfyUI/custom_nodes
git clone https://github.com/Deep-Neko/ComfyUI_ascii_art

then restart ComfyUI. Good news on dependencies: the node's real requirements are just pillow==9.5 (pinned in the pyproject), and numpy/torch/torchvision already live in ComfyUI. The fonts travel with the repo, so no separate font or model download for the node itself - though the clone is a chunky ~40MB because of the CJK fonts it bundles for language support that isn't exposed in this node's UI.

Where people get burned

The companion model is the gotcha. The example workflow loads control_sd15_ascii.ckpt from its ControlNetLoader, and you'll get a load error until you grab it from the linked Civitai model page and drop it into ComfyUI/models/controlnet. It's an SD 1.5 ControlNet, so pair it with an SD 1.5 checkpoint (the example uses an anime model) - don't try to strap it onto FLUX or SDXL and wonder why nothing happens.

num_cols too big triggers a fallback: the node prints "Too many columns or rows. Use default setting" and quietly switches to a fixed 6×12 cell grid. If your output suddenly looks low-res and blocky, that message in the console is why - dial the columns back down.

And if you hit weird text rendering that looks wrong, remember the pillow pin. The pack targets pillow==9.5; a much newer Pillow in your environment can make font metrics behave differently, so it's the first thing to check if characters come out misaligned. Start with the example workflow, swap in your own image, and let the preview tell you whether the ASCII map is readable before you blame the sampler.

Categoryimage/preprocessors

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
widthINT512128–2048
heightINT512128–2048
num_colsINT-1-1–1024

Outputs (1)

NameTypeDescription
IMAGEIMAGE