ComfyUI > Nodes > comfyui-adaptiveprompts > Random Integers 4

ComfyUI Node: Random Integers 4

Class Name

RandomIntegers

Category
Math
Author
Alectriciti (Account age: 5005days)
Extension
comfyui-adaptiveprompts
Latest Updated
2025-11-05
Github Stars
0.05K

How to Install comfyui-adaptiveprompts

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

Random Integers 4 Description

Generate set of 4 random integers within specified range for variability and randomness, with reproducible sequences.

Random Integers 4:

The RandomIntegers node is designed to generate a set of four random integers within a specified range, providing a simple yet powerful tool for introducing variability and randomness into your projects. This node is particularly useful in scenarios where you need to create diverse outputs or simulate random events, as it allows you to define the minimum and maximum bounds for the generated integers. By utilizing a seed value, the node ensures that the sequence of random numbers can be reproduced, which is essential for maintaining consistency across different runs or sessions. This feature is especially beneficial for AI artists who want to experiment with randomness while still having the ability to recreate specific outcomes.

Random Integers 4 Input Parameters:

min_value

The min_value parameter specifies the lower bound of the range from which the random integers will be generated. It determines the smallest possible integer that can be produced by the node. The default value is 0, and it can be adjusted to any integer value to suit your needs. By setting an appropriate min_value, you can control the starting point of the random number generation, ensuring that all generated numbers are equal to or greater than this value.

max_value

The max_value parameter defines the upper bound of the range for the random integers. It sets the largest possible integer that can be generated by the node. The default value is 10, but you can modify it to any integer to fit your requirements. This parameter is crucial for controlling the extent of the random number range, allowing you to limit the maximum value of the generated integers.

seed

The seed parameter is an integer that initializes the random number generator, ensuring that the sequence of random numbers is reproducible. The default value is 0, and it can range from 0 to 0xffffffffffffffff. By using a specific seed, you can generate the same set of random integers across different runs, which is useful for testing and consistency. Adjusting the seed value will result in a different sequence of random numbers, providing flexibility in generating varied outputs.

Random Integers 4 Output Parameters:

value1

value1 is the first random integer generated by the node. It falls within the specified range defined by min_value and max_value. This output is part of the set of four integers produced, each contributing to the overall randomness and variability of the node's output.

value2

value2 is the second random integer generated by the node. Like value1, it is constrained by the min_value and max_value parameters. This output adds to the diversity of the generated integers, providing another element of randomness.

value3

value3 is the third random integer in the sequence. It is also generated within the bounds set by min_value and max_value. This output further enhances the variability of the node's results, offering additional randomization.

value4

value4 is the fourth and final random integer produced by the node. It adheres to the range specified by min_value and max_value, completing the set of four random integers. This output ensures a comprehensive range of random values, suitable for various applications.

Random Integers 4 Usage Tips:

  • To ensure reproducibility of results, use a fixed seed value when generating random integers. This allows you to recreate the same sequence of numbers in future runs.
  • Experiment with different min_value and max_value settings to explore a wide range of random integer outputs, which can be particularly useful for testing and creative exploration.
  • If you need a completely different set of random integers, simply change the seed value to generate a new sequence.

Random Integers 4 Common Errors and Solutions:

ValueError: min_value must be less than or equal to max_value

  • Explanation: This error occurs when the min_value is set higher than the max_value, which is not a valid range for generating random integers.
  • Solution: Ensure that the min_value is less than or equal to the max_value to define a valid range for random number generation.

TypeError: Seed must be an integer

  • Explanation: This error arises when a non-integer value is provided for the seed parameter, which requires an integer input.
  • Solution: Verify that the seed parameter is set to an integer value within the specified range to avoid this error.

Random Integers 4 Related Nodes

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