Erics Word Cloud Generator (Advanced Image/Mask Support)
A Word Cloud Generator Inside ComfyUI — Really, and It's Weirdly Good
- input_image
- mask_image
- wordcloud
- font_preview
- color_preview
- svg_export
- used_words
Let's be honest: a word cloud node is not why you installed ComfyUI. You installed it to make images, and this pack is mostly a metadata system. But Erics Word Cloud Generator is the pack's most fun outlier - it takes a blob of text and produces a proper word-cloud image, as an IMAGE tensor, right in your graph. It's built on the classic Python wordcloud library, and it turns out ComfyUI is a surprisingly good home for it, because you can pipe the result straight into a sampler or an upscaler, or export it as real vector SVG for printing.
The required inputs are the sane ones: text (multiline - paste a speech, a paper abstract, or a dump of your favorite Civitai tags), width/height, max_words, min_font_size/max_font_size, and background_mode (transparent or solid_color) plus background_color. Hit Queue and you've got a cloud. The power lives in the optional section, and this node is deep: seven color modes (single color, random, cultural sets like red_white, emotional sets like energetic, harmony sets, custom ranges, matplotlib colormaps like viridis), four font modes, normalize_plurals (combines "cat"/"cats"), collocations for two-word phrases, custom stopwords, and special_words for boosting specific terms via JSON with a size_multiplier.
The five outputs are where it becomes genuinely useful: wordcloud (IMAGE, the cloud itself), font_preview and color_preview (IMAGE, so you can eyeball fonts and palettes before committing), svg_export (STRING - real vector SVG markup), and used_words (STRING, so you can see what actually made the cut). The intended loop: tune in the font_preview, then save the wordcloud with the pack's Save Image with Metadata nodes, or feed svg_export into the pack's Save True SVG Image node for a lossless vector file. There's even a mask_image input (MASK) with mask_placement to force words inside a shape, plus input_image as a background to overlay on.
Mechanically it's the wordcloud package doing the layout; this pack just wires it into ComfyUI types and wraps it in a genuinely enormous set of options. Dependency note: wordcloud is in the pack's requirements.txt as required, not optional, and the node's font list is pulled from your system fonts - which is why you'll see DejaVu and C059 in the dropdown rather than a curated set. If the dropdown ever shows an error string instead of inputs, the wordcloud package didn't install; pip install wordcloud fixes it.
Practical takes: random_seed is your friend for reproducible clouds, relative_scaling (default 0.8) balances frequency-vs-rank sizing, and the special_words tooltip is honest that the library can't do positioning, so don't fight it. This is a one-author pack with zero community chatter, so treat the node as self-serve - but for a tool that sounds like a toy, the output quality is genuinely decent.
Install the pack and restart:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System
cd AAA_Metadata_System
pip install -r requirements.txt
Feed it your text, pick a colormap, and try not to spend an hour on it. You will anyway.
Inputs (44)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | word cloud text generation sample example | — |
| width | INT | 800100–4096 | — |
| height | INT | 600100–4096 | — |
| max_words | INT | 20010–1000 | — |
| min_font_size | INT | 84–100 | — |
| max_font_size | INT | 10010–500 | — |
| background_mode | COMBO | solid_color | 2 options: transparent, solid_color |
| background_color | STRING | #000000 | — |
| color_modeopt | COMBO | random_colors | 8 options: single_color_hex, single_color_name, random_colors, cultural_set, emotional_set, color_harmony, +2 |
| single_color_hexopt | STRING | #FFFFFF | — |
| single_color_nameopt | COMBO | white | 50 options: white, black, red, green, blue, yellow, +44 |
| cultural_color_setopt | COMBO | red_white | 37 options: red_white, green_red, green_white_(crescent), blue_white, red,_gold/yellow,_green, red,_white,_black, +31 |
| emotional_color_setopt | COMBO | energetic | 10 options: energetic, calming, professional, creative, warm_cozy, cool_modern, +4 |
| color_harmony_setopt | COMBO | blue_family_harmony | 10 options: blue_family_harmony, green_family_harmony, red_family_harmony, cyan_family_harmony, yellow_family_harmony, warm_harmony, +4 |
| custom_color_rangeopt | STRING | #FF0000,#00FF00,#0000FF | — |
| matplotlib_colormapopt | COMBO | viridis | Matplotlib colormap for scientific color schemes |
| font_modeopt | COMBO | single_font | 4 options: single_font, random_font_per_word, random_font_per_cloud, font_set |
| primary_fontopt | COMBO | C059 BdIta | 45 options: C059 BdIta, C059 Bold, C059 Italic, C059 Roman, D050000L, DejaVuSans, +39 |
| font_setopt | STRING | Arial,Times New Roman,Courier New | — |
| prefer_horizontalopt | FLOAT | 0.50–1 | Ratio of horizontal vs vertical words |
| allow_verticalopt | BOOLEAN | true | — |
| marginopt | INT | 50–50 | Margin between words and canvas edge |
| word_spacingopt | FLOAT | 1.00.1–5 | Font scaling factor - higher values = larger fonts and more spacing |
| generation_modeopt | COMBO | from_text | Generate from text or predefined word frequencies |
| word_frequenciesopt | STRING | — | |
| include_numbersopt | BOOLEAN | false | — |
| normalize_pluralsopt | BOOLEAN | true | Combine plural/singular words (cats+cat→cat) for cleaner clouds |
| text_caseopt | COMBO | as_input | Transform text case before processing |
| collocationsopt | BOOLEAN | true | Include word pairs/phrases |
| min_word_lengthopt | INT | 21–10 | — |
| collocation_thresholdopt | INT | 3010–100 | Min frequency for word pairs to become phrases (requires more text to see effect) |
| custom_stopwordsopt | STRING | — | |
| special_wordsopt | STRING | Boost word frequency/size using JSON. Note: Positioning not supported by WordCloud library | |
| special_words_exampleopt | STRING | {"IMPORTANT": {"size_multiplier": 3.0}, "key phrase": {"size_multiplier": 2.5}} | Example: Boost word frequency to make them larger (positioning not supported) |
| preview_textopt | STRING | Font Preview Sample | Text for font preview |
| enable_svg_exportopt | BOOLEAN | false | Generate SVG version as string output |
| svg_embed_fontopt | BOOLEAN | false | Embed font in SVG (requires fontTools) |
| relative_scalingopt | FLOAT | 0.80–1 | Balance frequency vs rank sizing: 0=uniform sizes, 1=high variation, 0.8=balanced |
| repeat_wordsopt | BOOLEAN | false | Repeat words to fill space |
| random_seedopt | INT | 420–999999 | Random seed for reproducible results |
| text_file_pathopt | STRING | — | |
| mask_placementopt | COMBO | inside_mask | Place words inside or outside mask area |
| input_imageopt | IMAGE | Optional background image to overlay word cloud on | |
| mask_imageopt | MASK | Optional mask to control word placement area |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| wordcloud | IMAGE | — |
| font_preview | IMAGE | — |
| color_preview | IMAGE | — |
| svg_export | STRING | — |
| used_words | STRING | — |