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-lhyNodes > CSV RandomPicker

ComfyUI Node: CSV RandomPicker

Class Name

CSVRandomPicker

Category
lhyNodes/String
Author
lihaoyun6 (Account age: 3821days)
Extension
ComfyUI-lhyNodes
Latest Updated
2026-05-31
Github Stars
0.02K

How to Install ComfyUI-lhyNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-lhyNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-lhyNodes 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

CSV RandomPicker Description

Randomly select elements from CSV string for controlled sampling.

CSV RandomPicker:

The CSVRandomPicker node is designed to randomly select a specified number of elements from a given CSV (Comma-Separated Values) string. This node is particularly useful when you need to extract random samples from a list of items, such as words or phrases, provided in a CSV format. By utilizing a seed value, the node ensures that the selection process can be replicated, which is beneficial for scenarios where consistent results are required across different runs. The node's primary function is to facilitate the random selection of items, making it a valuable tool for tasks that involve random sampling or shuffling of data in a controlled manner.

CSV RandomPicker Input Parameters:

csv_string

The csv_string parameter is a multiline string input that contains the list of items you want to randomly select from, separated by a specified delimiter. This parameter allows you to input a series of words or phrases in CSV format, such as "apple,banana,cat,dog". The default value is "apple,banana,cat,dog", and it supports multiline input to accommodate longer lists.

count

The count parameter specifies the number of items to randomly select from the csv_string. It determines how many elements will be picked in each execution of the node. The default value is 1, with a minimum of 1 and a maximum of 1000. This parameter directly impacts the number of items returned by the node.

separator

The separator parameter defines the character used to separate items in the csv_string. By default, it is set to a comma (,), which is typical for CSV formats. This parameter allows you to customize the delimiter if your input string uses a different separator.

seed

The seed parameter is an integer that initializes the random number generator used for selecting items. It ensures that the selection process is repeatable, meaning the same seed will produce the same selection of items each time the node is executed. The default value is 0, with a range from 0 to 1125899906842624.

CSV RandomPicker Output Parameters:

STRING

The output of the CSVRandomPicker node is a single string that contains the randomly selected items from the csv_string, joined by the specified separator. This output provides the selected elements in a format that can be easily used in subsequent processes or nodes.

CSV RandomPicker Usage Tips:

  • To ensure consistent results across different runs, use the same seed value. This is particularly useful for debugging or when you need to reproduce specific outcomes.
  • If you have a large list of items and only need a few random selections, adjust the count parameter accordingly to avoid unnecessary processing and to focus on the desired number of outputs.

CSV RandomPicker Common Errors and Solutions:

"max_count" must be greater than "min_count"!

  • Explanation: This error occurs when the count parameter is set to a value greater than the number of available items in the csv_string.
  • Solution: Ensure that the count parameter does not exceed the number of items in your csv_string. Adjust the count to be less than or equal to the number of items available.

Empty output

  • Explanation: This issue arises when the csv_string is empty or only contains separators without any actual items.
  • Solution: Check that your csv_string contains valid items separated by the specified separator. Ensure there are no unintended spaces or empty entries.

CSV RandomPicker Related Nodes

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

CSV RandomPicker