ComfyUI Node: range

Class Name

Basic data handling: DataListRange

Category
Basic/Data 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 numerical sequences with customizable start, end, and step, like Python's `range()`.

range:

The DataListRange node is designed to generate a sequence of numbers, similar to Python's built-in range() function. This node is particularly useful for creating lists of integers that follow a specific pattern defined by the user. By specifying the starting point, ending point, and the step size, you can create a wide variety of numerical sequences. This functionality is beneficial for tasks that require iteration over a set of numbers or when you need to generate a predictable series of values for further processing. The node's ability to handle both positive and negative steps allows for flexible sequence generation, including counting up, counting down, and skipping numbers as needed.

range Input Parameters:

start

The start parameter defines the beginning of the sequence. It is an integer value that sets the first number in the generated list. By default, this value is set to 0. Adjusting the start value allows you to shift the entire sequence forward or backward on the number line. There is no explicit minimum or maximum value, but it should be within the range of typical integer values.

stop

The stop parameter specifies the endpoint of the sequence. The sequence will include numbers up to, but not including, this value. It is an integer and defaults to 10. The stop value determines the length of the sequence and is crucial for defining when the sequence should terminate.

step

The step parameter determines the increment between each number in the sequence. It is an optional integer parameter with a default value of 1. A positive step results in an ascending sequence, while a negative step creates a descending sequence. The step value must not be zero, as this would result in an infinite loop, and attempting to set it to zero will raise an error.

range Output Parameters:

INT

The output is a list of integers, represented as INT, which contains the sequence of numbers generated based on the specified start, stop, and step parameters. This list is the primary output of the node and can be used in subsequent operations that require a series of numbers.

range Usage Tips:

  • Use a positive step to create an ascending sequence and a negative step for a descending sequence.
  • Ensure that the start and stop values are set appropriately to avoid generating an empty list, especially when using a positive step with start greater than stop.
  • Remember that the stop value is exclusive, meaning the sequence will not include this number.

range Common Errors and Solutions:

Step cannot be zero

  • Explanation: The step parameter was set to zero, which is not allowed as it would create an infinite loop.
  • Solution: Ensure that the step parameter is set to a non-zero integer value to define the increment between numbers in the sequence.

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