Nodes/ComfyUI-color-ascii-art-node/ASCII Art Custom Font (High-Res)
ComfyUI Node

ASCII Art Custom Font (High-Res)

The same ASCII art, but sharp enough to print

By Shiba-2-shiba·Created 2 years ago·Updated 6 months ago· 7
ASCII Art Custom Font (High-Res)
  • image
  • IMAGE
pixel_size20
resolution_scale4.0
downscale_modearea
aspect_ratio_correction0.75
font_name
font_size_min8
font_size_max16
char_selection_modeluminance_hue
seed0
charset_sourceFile
ascii_chars_filenameset4.txt
dynamic_chars_to_test!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
dynamic_sigma1.5
brightness1.00
contrast1.00
enable_color_matchfalse
color_match_methodmkl

ASCIIArtCustomFont is the sibling of ASCIIArtNodeV3 from the same pack, and the one-line difference is in its display name: high-res. The base V3 node renders your ASCII art back at the input image's resolution - fine for screen use, but the glyphs get chunky fast. This node adds a resolution_scale dial (default 4×, up to 16×) so you can draw the same art onto a much bigger canvas. Same character-mapping engine, same bundled fonts, bigger output.

When would you actually need it? When the ASCII art is going somewhere larger than a thumbnail: a print, a big poster, a stream overlay, a Discord banner you plan to zoom into. Just be clear-eyed about what "high-res" buys you here. It gives you more pixels, not more detail - the underlying grid and shading decisions are identical to V3, and nothing is being hallucinated or upscaled with an ESRGAN-style model. You're essentially re-rendering the glyphs at a finer canvas resolution, the way the "more pixels" rung of upscaling works, not the "invent detail" rung.

How it works

The mechanism is the same three-step pipeline as V3: pixelate the image into a grid (pixel_size blocks, corrected by aspect_ratio_correction), pick a character per cell from a charset using char_selection_mode (default luminance_hue), then draw the glyphs back. The difference is that the output canvas is image_width * resolution_scale by image_height * resolution_scale, and the font sizes are multiplied by the same scale so glyphs stay proportional to their cells. Each cell's color is sampled from the pixelated image, so you still get the full color-art effect, not monochrome terminal output.

One neat extra this node carries: charset_source lets you pick between File (the bundled set1.txtset5.txt) and Dynamic, which generates a character set on the fly from whatever you type into dynamic_chars_to_test, ranked by how visually dense each glyph is (dynamic_sigma controls that ranking). If the stock sets feel limiting, that's the knob.

Inputs that matter

  • resolution_scale (default 4) - the big one. 1× gives you V3-equivalent output; 16× is a lot of canvas.
  • pixel_size and aspect_ratio_correction - same grid control as V3.
  • font_size_min / font_size_max - shading range; bigger spread = more contrast between dark and light cells.
  • enable_color_match + color_match_method - optional color re-transfer (mkl default; again, idt is a trap).

Output is a single IMAGE; straight into Save Image.

Installing it

Same as the rest of the pack - it ships together with V3:

cd ComfyUI/custom_nodes
git clone https://github.com/Shiba-2-shiba/comfyui-color-ascii-art-node.git
cd comfyui-color-ascii-art-node
pip install -r requirements.txt

Then restart ComfyUI. No models, no keys. If you use ComfyUI Manager, search "ComfyUI-color-ascii-art-node" instead. The color-matcher dependency installs automatically with requirements.txt - if you enable color match and nothing happens, check that the package actually landed in your environment.

Gotchas

Two things to keep in mind. First, this is a per-cell Python drawing loop, and cranking resolution_scale to 8× or 16× on a big image multiplies the pixels you're asking Pillow to stamp - expect it to get noticeably slow. Use the smallest scale that still looks crisp rather than maxing the dial. Second, the blank-output trap applies here exactly as it does to V3: if your chosen font can't render the characters in your charset file, you get a white canvas. Match font_name to the charset - NotoSansJP-VariableFont_wght.ttf for the Japanese set4.txt, decorative fonts for the symbol sets.

CategoryImage Processing/ASCII Art

Inputs (18)

NameTypeDefaultDescription
imageIMAGE
pixel_sizeINT201–200
resolution_scaleFLOAT4.01–16
downscale_modeCOMBOarea6 options: nearest, bilinear, bicubic, area, lanczos, contrast
aspect_ratio_correctionFLOAT0.750.1–10
font_nameCOMBO9 options: Chewy-Regular.ttf, Creepster-Regular.ttf, Customfont.ttf, KR Rachel's Chalkboard.ttf, Lobster Bisque.ttf, NotoSansJP-VariableFont_wght.ttf, +3
font_size_minINT81–100
font_size_maxINT161–200
char_selection_modeCOMBOluminance_hue4 options: brightness, hue, saturation, luminance_hue
seedINT00–18446744073709550000
charset_sourceoptCOMBOFile2 options: File, Dynamic
ascii_chars_filenameoptSTRINGset4.txt
dynamic_chars_to_testoptSTRING!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
dynamic_sigmaoptFLOAT1.50.1–10
brightnessoptFLOAT1.000–5
contrastoptFLOAT1.000–5
enable_color_matchoptBOOLEANfalse
color_match_methodoptCOMBOmkl5 options: mkl, hm, reinhard, idt, hm-mkl-hm

Outputs (1)

NameTypeDescription
IMAGEIMAGE