Visit ComfyUI Online for ready-to-use ComfyUI environment
Transform images into ASCII art with customizable options for unique, retro visual representations.
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.
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.
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.
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.
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
.
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.
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.
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.
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
.
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
.
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_width
values to find the right balance between detail and simplicity for your project.style
parameter to quickly switch between different artistic looks and find the one that best fits your creative vision.contrast_boost
to enhance the visual impact of the ASCII art.custom_chars
to create unique ASCII art that reflects your personal style or the theme of your project.ascii_width
value is outside the allowed range.ascii_width
is set between 20 and 200.custom_chars
string does not contain enough characters to map the full range of pixel intensities.custom_chars
string to ensure a smooth gradient in the ASCII art.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.