Nodes/AAA Metadata System/Erics Word Cloud Generator (Advanced Image/Mask Support)
ComfyUI Node

Erics Word Cloud Generator (Advanced Image/Mask Support)

A Word Cloud Generator Inside ComfyUI — Really, and It's Weirdly Good

By EricRollei·Created 11 months ago·Updated 10 months ago· 14
Erics Word Cloud Generator (Advanced Image/Mask Support)
  • input_image
  • mask_image
  • wordcloud
  • font_preview
  • color_preview
  • svg_export
  • used_words
◄textword cloud text generation sample example►
◄width800►
◄height600►
◄max_words200►
◄min_font_size8►
◄max_font_size100►
◄background_modesolid_color►
◄background_color#000000►
◄color_moderandom_colors►
◄single_color_hex#FFFFFF►
◄single_color_namewhite►
◄cultural_color_setred_white►
◄emotional_color_setenergetic►
◄color_harmony_setblue_family_harmony►
◄custom_color_range#FF0000,#00FF00,#0000FF►
◄matplotlib_colormapviridis►
◄font_modesingle_font►
◄primary_fontC059 BdIta►
◄font_setArial,Times New Roman,Courier New►
◄prefer_horizontal0.5►
◄allow_verticaltrue►
◄margin5►
◄word_spacing1.0►
◄generation_modefrom_text►
◄word_frequencies►
◄include_numbersfalse►
◄normalize_pluralstrue►
◄text_caseas_input►
◄collocationstrue►
◄min_word_length2►
◄collocation_threshold30►
◄custom_stopwords►
◄special_words►
◄special_words_example{"IMPORTANT": {"size_multiplier": 3.0}, "key phrase": {"size_multiplier": 2.5}}►
◄preview_textFont Preview Sample►
◄enable_svg_exportfalse►
◄svg_embed_fontfalse►
◄relative_scaling0.8►
◄repeat_wordsfalse►
◄random_seed42►
◄text_file_path►
◄mask_placementinside_mask►

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.

Categoryimage/text

Inputs (44)

NameTypeDefaultDescription
textSTRINGword cloud text generation sample example—
widthINT800100–4096—
heightINT600100–4096—
max_wordsINT20010–1000—
min_font_sizeINT84–100—
max_font_sizeINT10010–500—
background_modeCOMBOsolid_color2 options: transparent, solid_color
background_colorSTRING#000000—
color_modeoptCOMBOrandom_colors8 options: single_color_hex, single_color_name, random_colors, cultural_set, emotional_set, color_harmony, +2
single_color_hexoptSTRING#FFFFFF—
single_color_nameoptCOMBOwhite50 options: white, black, red, green, blue, yellow, +44
cultural_color_setoptCOMBOred_white37 options: red_white, green_red, green_white_(crescent), blue_white, red,_gold/yellow,_green, red,_white,_black, +31
emotional_color_setoptCOMBOenergetic10 options: energetic, calming, professional, creative, warm_cozy, cool_modern, +4
color_harmony_setoptCOMBOblue_family_harmony10 options: blue_family_harmony, green_family_harmony, red_family_harmony, cyan_family_harmony, yellow_family_harmony, warm_harmony, +4
custom_color_rangeoptSTRING#FF0000,#00FF00,#0000FF—
matplotlib_colormapoptCOMBOviridisMatplotlib colormap for scientific color schemes
font_modeoptCOMBOsingle_font4 options: single_font, random_font_per_word, random_font_per_cloud, font_set
primary_fontoptCOMBOC059 BdIta45 options: C059 BdIta, C059 Bold, C059 Italic, C059 Roman, D050000L, DejaVuSans, +39
font_setoptSTRINGArial,Times New Roman,Courier New—
prefer_horizontaloptFLOAT0.50–1Ratio of horizontal vs vertical words
allow_verticaloptBOOLEANtrue—
marginoptINT50–50Margin between words and canvas edge
word_spacingoptFLOAT1.00.1–5Font scaling factor - higher values = larger fonts and more spacing
generation_modeoptCOMBOfrom_textGenerate from text or predefined word frequencies
word_frequenciesoptSTRING—
include_numbersoptBOOLEANfalse—
normalize_pluralsoptBOOLEANtrueCombine plural/singular words (cats+cat→cat) for cleaner clouds
text_caseoptCOMBOas_inputTransform text case before processing
collocationsoptBOOLEANtrueInclude word pairs/phrases
min_word_lengthoptINT21–10—
collocation_thresholdoptINT3010–100Min frequency for word pairs to become phrases (requires more text to see effect)
custom_stopwordsoptSTRING—
special_wordsoptSTRINGBoost word frequency/size using JSON. Note: Positioning not supported by WordCloud library
special_words_exampleoptSTRING{"IMPORTANT": {"size_multiplier": 3.0}, "key phrase": {"size_multiplier": 2.5}}Example: Boost word frequency to make them larger (positioning not supported)
preview_textoptSTRINGFont Preview SampleText for font preview
enable_svg_exportoptBOOLEANfalseGenerate SVG version as string output
svg_embed_fontoptBOOLEANfalseEmbed font in SVG (requires fontTools)
relative_scalingoptFLOAT0.80–1Balance frequency vs rank sizing: 0=uniform sizes, 1=high variation, 0.8=balanced
repeat_wordsoptBOOLEANfalseRepeat words to fill space
random_seedoptINT420–999999Random seed for reproducible results
text_file_pathoptSTRING—
mask_placementoptCOMBOinside_maskPlace words inside or outside mask area
input_imageoptIMAGEOptional background image to overlay word cloud on
mask_imageoptMASKOptional mask to control word placement area

Outputs (5)

NameTypeDescription
wordcloudIMAGE—
font_previewIMAGE—
color_previewIMAGE—
svg_exportSTRING—
used_wordsSTRING—