ComfyUI > Nodes > ComfyUI_WordCloud > Word Cloud

ComfyUI Node: Word Cloud

Class Name

ComfyWordCloud

Category
😺dzNodes/WordCloud
Author
chflame163 (Account age: 445days)
Extension
ComfyUI_WordCloud
Latest Updated
2024-05-25
Github Stars
0.07K

How to Install ComfyUI_WordCloud

Install this extension via the ComfyUI Manager by searching for ComfyUI_WordCloud
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_WordCloud 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Word Cloud Description

Generate visually appealing word clouds from text input with customization options for AI artists to create artistic representations based on word frequency/importance.

Word Cloud:

ComfyWordCloud is a versatile node designed to generate visually appealing word clouds from a given text input. This node is particularly useful for AI artists who want to create artistic representations of text data, where the size of each word in the cloud indicates its frequency or importance. The node offers a range of customization options, allowing you to adjust the appearance and layout of the word cloud to suit your creative needs. Whether you are looking to highlight key terms, create thematic visuals, or simply explore the textual content in a new way, ComfyWordCloud provides the tools to transform text into engaging visual art.

Word Cloud Input Parameters:

text

The text input parameter is the primary source of words for the word cloud. If no text is provided, a default demo string will be used. This parameter is essential as it directly influences the content and frequency of words in the generated word cloud.

width

This parameter defines the width of the word cloud image. It determines the horizontal size of the output image, affecting how words are distributed across the canvas. The default value is typically set to a standard width, but you can adjust it to fit your specific requirements.

height

Similar to the width parameter, the height parameter specifies the vertical size of the word cloud image. Adjusting this value will change the overall dimensions of the output, allowing for more or fewer words to be displayed vertically.

margin

The margin parameter sets the space around the edges of the word cloud. This can help to ensure that words are not cut off and that the cloud has a clean, defined border. The default value is usually minimal, but it can be increased for a more spacious layout.

scale

This parameter controls the scaling factor of the word cloud. A higher scale value will result in a more detailed and larger image, while a lower value will produce a smaller, less detailed output. The default value is typically set to balance detail and performance.

font_path

The font_path parameter allows you to specify a custom font for the words in the cloud. This can be a path to a .ttf file or a system font name. Using a custom font can significantly impact the aesthetic of the word cloud.

min_font_size

This parameter sets the minimum font size for the words in the cloud. Words that appear less frequently will be displayed at this size. The default value ensures that even the least frequent words are readable.

max_font_size

The max_font_size parameter defines the maximum font size for the most frequent words in the cloud. Adjusting this value can help to emphasize key terms and create a more dynamic visual hierarchy.

relative_scaling

This parameter controls the relative scaling of word frequencies. A higher value will make the size differences between frequent and infrequent words more pronounced, while a lower value will produce a more uniform appearance.

colormap

The colormap parameter allows you to choose a color scheme for the words in the cloud. This can be a predefined colormap name or a custom color palette. The choice of colormap can greatly influence the visual impact of the word cloud.

background_color

This parameter sets the background color of the word cloud image. You can choose any color to match your design needs. The default is usually white, but it can be changed to any color that complements the word colors.

transparent_background

The transparent_background parameter, when enabled, makes the background of the word cloud image transparent. This is useful for overlaying the word cloud on other images or backgrounds.

prefer_horizontal

This parameter determines whether words should be displayed horizontally by default. Enabling this option will make most words appear horizontally, creating a more traditional word cloud layout.

max_words

The max_words parameter sets the maximum number of words to include in the word cloud. This helps to limit the complexity and focus on the most important terms. The default value is typically set to a reasonable number to ensure clarity.

repeat

The repeat parameter allows words to be repeated in the cloud. This can create a denser and more filled-out appearance, especially for smaller datasets.

include_numbers

This parameter specifies whether numbers should be included in the word cloud. Enabling this option will treat numbers as valid words and include them in the visualization.

random_state

The random_state parameter sets the seed for random number generation, ensuring reproducibility of the word cloud layout. This is useful for creating consistent results across multiple runs.

stopwords

The stopwords parameter allows you to specify a list of words to exclude from the word cloud. This helps to remove common but unimportant words, focusing the cloud on more meaningful terms.

color_ref_image

This optional parameter allows you to provide an image to reference for coloring the words in the cloud. The colors of the words will be sampled from this image, creating a visually cohesive design.

mask_image

The mask_image parameter allows you to provide a mask image that defines the shape of the word cloud. Words will be arranged to fit within the non-transparent areas of the mask, creating custom shapes.

contour_width

This parameter sets the width of the contour line around the word cloud. The default value is 0, meaning no contour, but it can be increased to add a border around the cloud.

contour_color

The contour_color parameter specifies the color of the contour line. The default is black, but it can be changed to any color that complements the word cloud design.

keynote_words

This parameter allows you to specify key terms that should be emphasized in the word cloud. These words will be given extra weight, making them more prominent in the visualization.

keynote_weight

The keynote_weight parameter sets the weight for the keynote words. A higher value will make these words significantly larger and more noticeable in the word cloud.

Word Cloud Output Parameters:

image

The image output parameter provides the generated word cloud as an image. This image can be used in various applications, such as presentations, websites, or further artistic processing.

mask

The mask output parameter provides the mask used for the word cloud, if any. This can be useful for understanding the shape constraints applied to the word cloud or for further processing.

Word Cloud Usage Tips:

  • Experiment with different colormaps and fonts to create unique and visually appealing word clouds.
  • Use the mask_image parameter to generate word clouds in custom shapes, such as logos or thematic outlines.
  • Adjust the max_words parameter to focus on the most important terms and avoid cluttering the word cloud.
  • Utilize the keynote_words and keynote_weight parameters to highlight specific terms and make them stand out.

Word Cloud Common Errors and Solutions:

"text input not found, use demo string."

  • Explanation: This error occurs when no text input is provided, and the node defaults to using a demo string.
  • Solution: Ensure that you provide a valid text input to generate a word cloud based on your specific content.

"Invalid font path."

  • Explanation: This error occurs when the specified font_path is incorrect or the font file is not found.
  • Solution: Verify that the font_path is correct and that the font file exists at the specified location.

"Mask image not found."

  • Explanation: This error occurs when the specified mask_image is not found or cannot be loaded.
  • Solution: Ensure that the mask_image path is correct and that the image file is accessible.

"Invalid color reference image."

  • Explanation: This error occurs when the color_ref_image is not found or cannot be loaded.
  • Solution: Verify that the color_ref_image path is correct and that the image file is accessible.

Word Cloud Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_WordCloud
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.