Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-huggingface_dataset

ComfyUI Extension: ComfyUI-huggingface_dataset

Repo Name

ComfyUI-huggingface_dataset

Author
stablellama (Account age: 0 days)
Nodes
View all nodes(1)
Latest Updated
2026-11-03
Github Stars
0.01K

How to Install ComfyUI-huggingface_dataset

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

Run ComfyUI Online

ComfyUI-huggingface_dataset Description

ComfyUI-huggingface_dataset loads Hugging Face datasets from the Hub or local files, lets you filter and select records, then converts text, images, and rows into usable ComfyUI workflow inputs.

ComfyUI-huggingface_dataset Introduction

ComfyUI-huggingface_dataset brings datasets from Hugging Face into ComfyUI. A dataset is a collection of records, often arranged like a spreadsheet: each row is one item, and columns might contain text, labels, or images.

The extension lets you load a dataset, choose which records and columns you need, and then use those values in a ComfyUI workflow. For example, you can pull prompts from a text column, preview images from an image column, or filter a collection before working with it. This is especially useful when a dataset is too large to handle conveniently all at once.

The author also provides in-app node documentation, parameter tooltips, and example workflows that you can open through Workflow → Browse Templates under Hugging Face dataset.

How ComfyUI-huggingface_dataset Works

Think of the extension as a three-stage path from a collection of files or records to usable ComfyUI inputs:

  1. Load a source. The Load Hugging Face Dataset node opens a dataset from the Hugging Face Hub, a supported file, or a local dataset directory. You choose a split—such as train, validation, or test—if the source provides one.
  2. Shape the collection. Dataset nodes can keep a small number of rows, filter by a label, select columns, shuffle records, and more. At this stage, the dataset remains a dataset connection in the graph rather than a list of individual ComfyUI values.
  3. Convert what you need. 🤗 Dataset To Data List or 🤗 Dataset To LIST turns the selected records into values that other nodes can use.

For instance, to preview dataset images, you could connect:

Load Hugging Face Dataset → 🤗 Dataset Take → 🤗 Dataset To Data List (column=image) → Preview Image

The Take node limits how many images reach the conversion step. The conversion node changes dataset image cells into ComfyUI IMAGE values; connecting the loader directly to Preview Image would not do that.

You can choose between two loading approaches:

  • Full load (streaming off): The Hugging Face datasets library downloads and caches the selected split. This supports all of the extension’s dataset operations, but a large split can take time and storage.
  • Streaming (streaming on): Records are read as you iterate over them rather than downloading the whole split up front. This is useful when you only need a small portion of a large dataset. Some operations, including sorting and counting the entire dataset, are not available in this mode.

ComfyUI-huggingface_dataset Features

Load datasets from different sources

Load Hugging Face Dataset accepts several kinds of path:

SourceExample or guidance
Hugging Face Hub datasetUse its repository ID, such as stanfordnlp/imdb. Leave loader at auto.
Local or remote fileSupported formats include CSV, TSV, JSON, JSONL, Parquet, Arrow, and text. Paths can also use globs such as data/*.parquet, or remote https:// and hf:// URLs.
Local dataset directoryPoint to a directory in Hugging Face dataset format.

The loader’s main settings are:

SettingWhat it changes
loaderauto infers a file format from its extension. You can instead choose hub, csv, json, parquet, arrow, or text.
splitSelects the part of the dataset to open. The dropdown refreshes when you change source-related settings or use Force reload.
configSelects a named subset when a Hub dataset offers several; for example, nyu-mll/glue with config mrpc.
revisionSelects a particular Hub tag, branch, or commit. Leave it empty if you do not need a specific revision.
streamingSwitches between a fully loaded split and lazy, record-by-record access.

When available splits can be discovered, the dropdown lists them and favors train, then validation, then test as a default. If the extension cannot check the source—for example, while offline—it shows fallback choices and checks your selection when the workflow runs.

Force reload refreshes the split choices and tells ComfyUI to fetch the dataset again on the next run. Use it if a source has changed but your workflow still appears to use the previous data.

Shape a dataset before converting it

You can chain these nodes between the loader and a conversion node:

NodeWhat you can use it forStreaming support
🤗 Dataset ShuffleReorder rows randomly; set a seed when you want a repeatable order.Yes
🤗 Dataset SkipIgnore the first n rows.Yes
🤗 Dataset TakeKeep only the first n rows.Yes
🤗 Dataset SortOrder rows by a chosen column.Full load only
🤗 Dataset ShardKeep one numbered portion out of num_shards portions.Yes
🤗 Dataset Select RowsKeep specified row numbers or ranges, such as 0,2,4 or 0:100.Full load only
🤗 Dataset Select ColumnsKeep only named columns.Yes
🤗 Dataset Remove ColumnsDrop named columns you do not need.Yes
🤗 Dataset Rename ColumnGive a column a different name for later nodes.Yes
🤗 Dataset FlattenExpand nested data into top-level columns.Full load only
🤗 Dataset FilterKeep rows that meet a condition.Yes
🤗 Dataset Map ColumnAdd or replace a column with a constant, a copy of another column, or a row index.Yes
🤗 Dataset Train/Test SplitRandomly divide records into separate train and test outputs.Full load only
🤗 Dataset UniqueGet the distinct values in a column as a Data List.Full load only
🤗 Dataset CountGet the total number of rows as an integer.Full load only

Filter supports comparisons such as ==, !=, <, and >=; text checks such as contains, starts with, and ends with; membership checks using in or not in with comma-separated values; and is null or is not null. For example, column=label, operator===, value=1 keeps rows whose label equals 1.

A typical workflow for choosing material before processing it is:

flowchart LR
    A[Load Hugging Face Dataset<br/>path=stanfordnlp/imdb] --> B[🤗 Dataset Filter<br/>column=label, operator===, value=1]
    B --> C[🤗 Dataset Take<br/>n=20]
    C --> D[🤗 Dataset To Data List]

Convert rows into ComfyUI-friendly values

Both conversion nodes work with fully loaded and streaming datasets:

  • 🤗 Dataset To Data List exposes records as a ComfyUI Data List, with one item per row. If you set column=image, each item is an image instead of a whole row.
  • 🤗 Dataset To LIST produces one LIST value containing all selected rows. Set column=text, for example, to get a list of text values rather than a list of row records.

Each has a limit setting: -1 means all available rows. For a large source, set a smaller limit—or use 🤗 Dataset Take first—so you do not convert more records than you intend.

A whole row is represented as a dictionary: its column names act as keys. The optional Basic data handling pack can help you inspect and process these results. For example, use Data List → get item to pick one row, then DICT → get with key=text to read that row’s text. Connecting a Data List to a compatible per-row Basic node lets ComfyUI apply it to each record.

Dataset image cells are converted to single-image ComfyUI IMAGE values for nodes such as Preview Image and Save Image. If an image has transparency, the extension also makes a separate mask available through a virtual column such as image_mask. You can select that column or retrieve it from a whole row. Images without transparency do not get a virtual mask column.

Start from an example workflow

Open Workflow → Browse Templates and look under Hugging Face dataset for:

  • imdb_filter_to_data_list — keeps positive IMDb reviews and converts them to a Data List.
  • imdb_map_select_to_list — adds a row index, keeps review text, and produces a LIST of strings.
  • imdb_streaming_skip_take — demonstrates choosing a small set of records in streaming mode without a full download.

What's New with ComfyUI-huggingface_dataset

For workflows created with version 1.x: the loader no longer has a rows output or a limit setting. Previously, it converted rows on every run even when no other node needed them. The current design leaves the dataset unconverted until you explicitly add a conversion node, giving you more control over how much data enters the rest of your workflow.

To update an older workflow, connect the loader’s dataset output to 🤗 Dataset To Data List. Use 🤗 Dataset Take or the conversion node’s limit if you only want some rows.

The loader’s Force reload button also refreshes split choices, replacing the separate manual Refresh splits action described for the older interface.

Troubleshooting ComfyUI-huggingface_dataset

My workflow cannot load a dataset

  1. Check that path points to the intended Hub dataset, file, or directory.
  2. For a Hub dataset, check your network connection. If it has multiple subsets, set the required config.
  3. Check that split exists for that source. Changing path, config, revision, or loader refreshes the dropdown; Force reload refreshes it again.
  4. If ComfyUI reports that the Hugging Face datasets package is missing, the environment running ComfyUI needs that dependency. It is normally supplied when the extension is installed through a supported manager or registry.

I changed the source, but the result looks unchanged

Click Force reload, then run the workflow again. ComfyUI may otherwise reuse the loader’s cached output.

A dataset node says it needs a fully loaded dataset

Turn off streaming in Load Hugging Face Dataset and run again. Sort, Select Rows, Flatten, Train/Test Split, Unique, and Count require a fully loaded dataset.

An image cannot be connected to Preview Image

Make sure the image passes through 🤗 Dataset To Data List or 🤗 Dataset To LIST with the appropriate image column selected. The loader’s dataset output is not itself a ComfyUI IMAGE.

If the dataset stores images as JPEG XL (.jxl) and they fail to decode, JPEG XL support requires the optional Pillow JPEG XL plugin. The ComfyUI startup log reports JPEG XL image support: enabled or disabled.

Frequently asked questions

Do I need to download an entire dataset to use a few records?
Not necessarily. Enable streaming, use 🤗 Dataset Take or another supported selection node, and set a sensible conversion limit.

Why can’t I count rows with 🤗 Dataset Count while streaming?
Streaming provides records as they are read, rather than a fully loaded collection with a known length. Turn off streaming if you need this node.

What is the difference between Data List and LIST?
A Data List provides items in a form that ComfyUI can process one by one through compatible nodes. A LIST holds the selected items together as one list value. Choose the shape expected by your next node.

Does this extension include image-generation models?
No. It loads and prepares dataset content for workflows; your other ComfyUI nodes determine how that content is used.

Learn More about ComfyUI-huggingface_dataset

You can also hover over an extension node and open its help panel, or find its page in ComfyUI’s Node Library, for guidance on that node’s settings.

ComfyUI-huggingface_dataset Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-huggingface_dataset detailed guide | ComfyUI