ComfyUI > Nodes > ComfyUI-Image-Effects > 📝 ASCII Text Generator

ComfyUI Node: 📝 ASCII Text Generator

Class Name

AsciiTextNode

Category
Image Effects
Author
orion4d (Account age: 929days)
Extension
ComfyUI-Image-Effects
Latest Updated
2025-05-28
Github Stars
0.02K

How to Install ComfyUI-Image-Effects

Install this extension via the ComfyUI Manager by searching for ComfyUI-Image-Effects
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Image-Effects in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

📝 ASCII Text Generator Description

Transform images into ASCII art with customizable options for unique, retro visual representations.

📝 ASCII Text Generator:

The AsciiTextNode is a powerful tool designed to transform images into ASCII art, a form of digital art that uses characters from the ASCII standard to create visual representations. This node is particularly beneficial for artists and creators looking to add a unique, retro aesthetic to their digital projects. By converting images into text-based art, the AsciiTextNode allows for creative expression through a medium that combines visual and textual elements. The node offers various customization options, enabling you to adjust the width of the ASCII output, choose different styles, and even define custom character sets. This flexibility ensures that the ASCII art generated can be tailored to fit specific artistic visions or project requirements. The node's primary function is to analyze the input image, convert it to grayscale, and map the pixel intensity values to a set of ASCII characters, resulting in a text-based representation of the original image.

📝 ASCII Text Generator Input Parameters:

image

The image parameter is the input image that you want to convert into ASCII art. It serves as the source material for the transformation process. The image should be in a format that the node can process, typically a standard image file format like JPEG or PNG.

ascii_width

The ascii_width parameter determines the width of the resulting ASCII art in terms of the number of characters. It directly affects the level of detail and resolution of the ASCII output. The minimum value is 20, the maximum is 200, and the default is 80. A larger width results in more detailed ASCII art, while a smaller width produces a more abstract representation.

style

The style parameter allows you to choose the character style for the ASCII art. Options include "classic," "detailed," "minimal," "blocks," and "custom," with "classic" as the default. Each style offers a different aesthetic, affecting the overall appearance of the ASCII art. For instance, "detailed" might use a wider range of characters for finer detail, while "minimal" uses fewer characters for a simpler look.

invert

The invert parameter is a boolean option that, when enabled, inverts the brightness values of the image before converting it to ASCII. This can be useful for creating a negative effect, where dark areas become light and vice versa. The default value is False.

contrast_boost

The contrast_boost parameter is an optional float that enhances the contrast of the image before conversion. It ranges from 1.0 to 4.0, with a default value of 2.0. Increasing the contrast can make the ASCII art more visually striking by accentuating differences in brightness.

height_compression

The height_compression parameter is an optional float that adjusts the vertical scaling of the ASCII art. It ranges from 1.0 to 3.0, with a default value of 2.0. This parameter helps maintain the aspect ratio of the original image when converting to ASCII, ensuring that the art does not appear stretched or squashed.

custom_chars

The custom_chars parameter allows you to define a custom set of characters to be used in the ASCII art. This is a string input, with a default value of " .-+*#@". By customizing the character set, you can create ASCII art that aligns with specific artistic preferences or project themes.

add_border

The add_border parameter is a boolean option that, when enabled, adds a border around the ASCII art. This can help frame the art and make it stand out more clearly. The default value is False.

line_numbers

The line_numbers parameter is a boolean option that, when enabled, adds line numbers to the ASCII art. This can be useful for reference purposes or when the ASCII art is part of a larger text-based project. The default value is False.

📝 ASCII Text Generator Output Parameters:

ascii_text

The ascii_text output parameter is the final ASCII art generated by the node. It is a string representation of the input image, composed of ASCII characters that visually approximate the original image. This output can be used in various creative projects, shared as text art, or further processed for artistic purposes.

📝 ASCII Text Generator Usage Tips:

  • Experiment with different ascii_width values to find the right balance between detail and simplicity for your project.
  • Use the style parameter to quickly switch between different artistic looks and find the one that best fits your creative vision.
  • If your image has low contrast, try increasing the contrast_boost to enhance the visual impact of the ASCII art.
  • Customize the custom_chars to create unique ASCII art that reflects your personal style or the theme of your project.

📝 ASCII Text Generator Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is in a format that the node cannot process.
  • Solution: Convert the image to a standard format like JPEG or PNG before using it with the node.

Invalid ascii_width value

  • Explanation: The ascii_width value is outside the allowed range.
  • Solution: Ensure that the ascii_width is set between 20 and 200.

Custom character set too short

  • Explanation: The custom_chars string does not contain enough characters to map the full range of pixel intensities.
  • Solution: Add more characters to the custom_chars string to ensure a smooth gradient in the ASCII art.

📝 ASCII Text Generator Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Image-Effects
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.