DataSet_Visualizer
See Your Captions as a Word Cloud and a Tag Network
- GraphsPaths
- GraphsImages
- Words List 1
- Words List 2
DataSet_Visualizer is the pack's showpiece: feed it your captions and it produces three charts about them - a word cloud of token frequency, a network graph of which tokens appear together, and a bar chart of the top tokens by frequency. Plus it hands you the images so you can preview or save them, and a couple of plain-text token lists as a bonus.
It answers a real question dataset prep people ask: what is my data actually full of? Before you train, you want to know if every caption is dominated by one tag, whether your trigger words actually appear consistently, and which tokens are co-occurring weirdly. This node makes that visible in a couple of queue runs instead of spreadsheet archaeology.
Inputs
- TextFileContents - the caption list (wired from a loader; it's
forceInput). - Seperator - how tokens are split:
comma,colon,space, orpipe. Match this to your caption style - comma is the standard for tag-style captions. - WordCloudTop - how many top tokens to plot in the word cloud (1–9999).
- NetworkGraphTop - how many top co-occurring token pairs to draw.
- FrequencyGraphTop - how many top tokens to show in the frequency bar chart.
- FrequencyForWordList - the minimum frequency for a token to be included in the output word lists.
Outputs
- GraphsPaths - the file paths of the three generated images (saved to ComfyUI's output folder as
wordcloud.png,network_graph.png,tag_frequency_table.png). - GraphsImages - the three images as IMAGE tensors, so you can drop them into PreviewImage or SaveImage right in the graph.
- Words List 1 and Words List 2 - the frequently-occurring tokens, joined by commas and newlines respectively.
How it works
Under the hood it's a real data-analysis stack: the token counting is done with collections.Counter, co-occurrences tracked in a networkx graph, the word cloud built with the wordcloud library, and the frequency chart drawn in matplotlib via a pandas frame. That's why this node is the reason the pack's requirements.txt is heavy - matplotlib, wordcloud, networkx, and pandas all have to install, and they're not tiny.
Installing
Pack standard, and this time the dependencies actually matter:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-DataSet.git
cd ComfyUI-DataSet && pip install -r requirements.txt
If wordcloud or matplotlib fails to build on your platform, you'll see the failure at install time - and it's the reason a fresh install of this pack can take a few minutes. Restart ComfyUI afterward.
Common issues
The separator choice changes everything, so a mismatch between Seperator and your actual caption format will produce nonsense frequencies - captions split on commas when you told it "space" is a mess. Start with comma for tag captions.
Also, the defaults on the Top widgets are 1, which is nearly useless - you'll want to bump WordCloudTop, NetworkGraphTop, and FrequencyGraphTop up to sensible values (50–200) or the charts will show almost nothing. It's a small trap that trips everyone on the first run. Set those, run, and you'll finally see what your dataset is made of.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| TextFileContents | STRING | — | |
| Seperator | COMBO | 4 options: comma, colon, space, pipe | |
| WordCloudTop | INT | 11–9999 | — |
| NetworkGraphTop | INT | 11–9999 | — |
| FrequencyGraphTop | INT | 11–9999 | — |
| FrequencyForWordList | INT | 11–9999 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| GraphsPaths | STRING | — |
| GraphsImages | IMAGE | — |
| Words List 1 | STRING | — |
| Words List 2 | STRING | — |