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 > 🤗 Dataset Select Rows

ComfyUI Node: 🤗 Dataset Select Rows

Class Name

HFDatasetSelect

Category
Hugging Face 🤗
Author
stablellama (Account age: 0days)
Extension
ComfyUI-huggingface_dataset
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

🤗 Dataset Select Rows Description

Selects rows by index or slice from a fully loaded Hugging Face dataset to create a smaller subset.

🤗 Dataset Select Rows:

HFDatasetSelect keeps specific rows from a fully loaded Hugging Face dataset, giving you a smaller dataset focused on the examples you want to work with. It uses the Hugging Face dataset’s select method, so it is useful for inspecting a few examples, creating a small test subset, or choosing a particular sequence of rows for an AI art workflow. It does not work with streaming datasets; the dataset must be fully loaded first.

🤗 Dataset Select Rows Input Parameters:

dataset

The Hugging Face dataset from which you want to keep rows. Connect the dataset output of the 🤗 Dataset Loader or another dataset node, not a list of individual rows. This input must be a fully loaded dataset with a select method; a streaming dataset cannot be used. No default, minimum, or maximum is specified for this input.

indices

A text expression specifying which row positions to keep. Enter individual zero-based row numbers separated by commas, such as 0, 2, 4; a slice such as 0:100; a stepped slice such as 0:100:2; or a combination separated by commas. In a slice, the stop position is excluded, and leaving it blank, as in 10:, continues to the end of the dataset. The order of the positions you specify determines the selection passed to the dataset. The default is 0:100. No minimum or maximum text length is specified, but every selected row number must be within the dataset’s range, and a slice step cannot be zero.

🤗 Dataset Select Rows Output Parameters:

dataset

A Hugging Face dataset containing only the rows specified by indices. You can connect it to another dataset node to continue working with the selected examples. The output is a dataset object, not an expanded list of its rows.

🤗 Dataset Select Rows Usage Tips:

  • Disable streaming on the 🤗 Dataset Loader before connecting its dataset to this node; selection requires a fully loaded dataset.
  • Use 0:10 to work with the first ten rows, or 0:100:2 to keep every other row among the first 100 positions.
  • Use 0, 5, 12 when you know the exact examples you want. Row numbering starts at zero, so 0 is the first row.
  • Check your dataset’s length before using the default 0:100 on a small dataset. If it has fewer than 100 rows, use an open-ended slice such as 0: instead.
  • Keep selections small when you only need a quick test subset; this makes subsequent work with that subset more manageable.

🤗 Dataset Select Rows Common Errors and Solutions:

This operation needs a fully-loaded (materialized) dataset, but the input is a streaming one (datasets.IterableDataset).

  • Explanation: The connected dataset is streaming, but this node needs to know the available row positions before selecting them.
  • Solution: Disable streaming on the Hugging Face Dataset Loader that created the dataset, then run the workflow again.

The value passed to this node is not a Hugging Face dataset (it has no 'select' method).

  • Explanation: The connected value cannot perform dataset row selection. This can happen if you connect a list of rows rather than the dataset itself.
  • Solution: Connect the dataset output of the 🤗 Dataset Loader or another dataset node.

Provide row indices, e.g. '0,2,4' or a slice like '0:100' or '0:100:2'.

  • Explanation: The indices field is empty or contains only commas and spaces.
  • Solution: Enter at least one row number or slice, such as 0 or 0:.

Bad row index '…': not an integer.

  • Explanation: An individual row entry contains text that is not a whole number.
  • Solution: Replace it with a numeric row position, and separate multiple positions with commas.

Bad row index '…' (part '…' is not an integer).

  • Explanation: The start, stop, or step in a slice is not a whole number.
  • Solution: Use a slice such as 0:100:2, or leave a slice component blank where appropriate, as in 10:.

Bad row slice '…': use 'start:stop[:step]'.

  • Explanation: A slice has too many colon-separated parts.
  • Solution: Use no more than a start, stop, and optional step, such as 0:100:2.

Bad row slice '…': step cannot be 0.

  • Explanation: A step of zero cannot advance through row positions.
  • Solution: Use a nonzero step, such as 0:100:2, or omit the step.

Row index … is out of range (dataset has … rows).

  • Explanation: At least one selected position is negative or beyond the last available row. A slice can also produce an invalid position; for example, the default 0:100 exceeds a dataset with fewer than 100 rows.
  • Solution: Choose positions from 0 through one less than the dataset’s row count. For a subset that runs to the end regardless of length, use an open-ended slice such as 0:.

🤗 Dataset Select Rows Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-huggingface_dataset
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.

🤗 Dataset Select Rows