ComfyUI Node: range

Class Name

Basic data handling: ListRange

Category
Basic/LIST
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

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

range Description

Generates customizable integer sequences for data processing, similar to Python's `range()`.

range:

The ListRange node is designed to generate a sequence of numbers in a list format, similar to Python's built-in range() function. This node is particularly useful for creating ordered sequences of integers, which can be utilized in various data processing tasks. By specifying the start, stop, and step parameters, you can customize the sequence to fit your specific needs, whether you're counting upwards, downwards, or skipping numbers in between. This flexibility makes the ListRange node a powerful tool for AI artists who need to automate repetitive tasks or generate structured data for creative projects.

range Input Parameters:

start

The start parameter defines the beginning of the sequence. It is an integer value that determines the first number in the generated list. By default, this parameter is set to 0, meaning the sequence will start from zero unless specified otherwise. Adjusting the start value allows you to begin the sequence from any integer, providing flexibility in generating custom ranges.

stop

The stop parameter specifies the end of the sequence. It is an integer value that indicates the point at which the sequence will terminate. The sequence will include numbers up to, but not including, this value. The default stop value is 10, but you can set it to any integer to control the length of the sequence. This parameter is crucial for defining the upper limit of your range.

step

The step parameter determines the increment between each number in the sequence. It is an optional integer value with a default of 1, meaning the sequence will increase by one with each step. You can modify the step to create sequences that skip numbers or count downwards by using a negative value. However, the step cannot be zero, as this would result in an infinite loop.

range Output Parameters:

LIST

The output of the ListRange node is a LIST containing the generated sequence of numbers. This list is a collection of integers that follow the specified start, stop, and step parameters. The output list can be used in various applications, such as iterating over elements, performing calculations, or serving as input for other nodes in your workflow. The flexibility of the output allows for seamless integration into different data processing tasks.

range Usage Tips:

  • Use the start and stop parameters to define the exact range of numbers you need for your project, ensuring that the sequence fits your specific requirements.
  • Adjust the step parameter to create sequences that skip numbers or count in reverse, providing more control over the generated list.
  • Remember that the stop value is exclusive, so if you need to include it in your sequence, adjust the stop parameter accordingly.

range Common Errors and Solutions:

Step cannot be zero

  • Explanation: This error occurs when the step parameter is set to zero, which would result in an infinite loop as the sequence cannot progress.
  • Solution: Ensure that the step parameter is set to a non-zero integer. Adjust the step value to a positive or negative integer depending on whether you want the sequence to count upwards or downwards.

range Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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.

range