Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate random integers within specified range for AI artists, with various modes and batch processing support.
The 0246.RandomInt
node is designed to generate random integers within a specified range, providing a versatile tool for AI artists who need to introduce randomness into their workflows. This node can handle various modes of operation, including keeping previous values, forcing new values, or using usual random generation methods. It supports batch processing, allowing you to generate multiple random integers at once, and can be seeded for reproducibility. The node ensures that the generated integers are within the defined minimum and maximum bounds, making it a reliable component for tasks requiring randomization.
This parameter accepts a string that defines the mode of random integer generation. The default value is "rand,0", and it does not support multiline input. This string can include specific instructions for how the random integers should be generated or manipulated.
This integer parameter sets the minimum value for the random integers. It has a default value of 0 and can range from -9007199254740991 to 9007199254740991. Setting this value ensures that no generated integer will be less than this minimum.
This integer parameter sets the maximum value for the random integers. It has a default value of 9007199254740991 and can range from -9007199254740991 to 9007199254740991. This ensures that no generated integer will exceed this maximum.
This integer parameter determines the number of random integers to generate in one batch. The default value is 2, with a minimum of 1 and a maximum limited by the system's maximum integer size. This allows for efficient batch processing of random integers.
This parameter is a list that defines the mode of operation for the random integer generation. The available options are "usual", "keep", and "force". Each mode dictates how the node handles the generation and storage of random integers, providing flexibility in its operation.
This optional integer parameter sets the seed for the random number generator, ensuring reproducibility of the generated integers. The default value is 0, with a range from -1125899906842624 to 1125899906842624. Using a seed allows for consistent results across different runs.
This hidden parameter is a unique identifier for the node instance, used internally to track and manage the state of the random number generation.
This output parameter returns a list of randomly generated integers. The integers are within the specified minimum and maximum bounds and are generated according to the defined mode and batch size. This output can be used directly in your workflow to introduce randomness where needed.
seed
parameter when you need consistent random integers across different runs.batch_size
parameter to generate multiple random integers at once, which can be useful for batch processing tasks.mode
settings to understand how "usual", "keep", and "force" affect the random integer generation and choose the one that best fits your needs.min
parameter is less than or equal to the max
parameter.<value>
".val
parameter string.val
parameter string for any typos or unsupported values and correct them.seed
parameter is within the range of -1125899906842624 to 1125899906842624.© Copyright 2024 RunComfy. All Rights Reserved.