ComfyUI > Nodes > WAS Node Suite > Random Number

ComfyUI Node: Random Number

Class Name

Random Number

Category
WAS Suite/Number
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Random Number Description

Generate various types of random numbers with flexibility, reproducibility, and seed setting for AI artists' creative projects.

Random Number:

The Random Number node is designed to generate random numbers based on specified parameters, providing flexibility in the type of random number generated, such as integers, floats, or boolean values. This node is particularly useful for AI artists who need to introduce randomness into their projects, whether for procedural generation, random sampling, or other creative applications. By allowing you to set a seed, the node ensures reproducibility, meaning you can generate the same sequence of random numbers if needed. This feature is essential for debugging and refining your creative processes.

Random Number Input Parameters:

number_type

This parameter determines the type of random number to generate. You can choose from three options: integer, float, or bool. Selecting integer will generate whole numbers within the specified range, float will produce decimal numbers, and bool will return a random boolean value (True or False). The choice of number type impacts the kind of randomness introduced into your project, allowing for varied applications.

minimum

This parameter sets the lower bound of the range from which the random number will be generated. It accepts a floating-point number, with a default value of 0. The minimum value can be as low as -18446744073709551615 and as high as 18446744073709551615. Setting this parameter appropriately ensures that the generated random number falls within a desired range, which is crucial for maintaining control over the randomness in your project.

maximum

This parameter sets the upper bound of the range from which the random number will be generated. Like the minimum parameter, it accepts a floating-point number, with a default value of 0. The maximum value can also range from -18446744073709551615 to 18446744073709551615. Properly setting this parameter ensures that the generated random number does not exceed the desired range, providing you with precise control over the randomness.

seed

The seed parameter is an integer that initializes the random number generator. It has a default value of 0 and can range from 0 to 0xffffffffffffffff. Setting a specific seed allows for reproducibility, meaning the same sequence of random numbers can be generated if the same seed is used again. This is particularly useful for debugging and refining your creative processes, as it ensures consistency in the randomness introduced.

Random Number Output Parameters:

NUMBER

This output provides the generated random number in the type specified by the number_type parameter. It can be an integer, float, or boolean value, depending on your selection. This output is the primary result of the node and can be used directly in your projects to introduce randomness.

FLOAT

This output provides the generated random number as a floating-point value, regardless of the number_type specified. This ensures that you always have access to a decimal representation of the random number, which can be useful for calculations and further processing.

INT

This output provides the generated random number as an integer value, regardless of the number_type specified. This ensures that you always have access to a whole number representation of the random number, which can be useful for indexing, counting, and other integer-specific operations.

Random Number Usage Tips:

  • To ensure reproducibility in your projects, always set a specific seed value. This allows you to generate the same sequence of random numbers if needed.
  • Use the minimum and maximum parameters to control the range of your random numbers, ensuring they fit within the desired bounds for your project.
  • Experiment with different number_type options to see how integers, floats, and booleans can introduce different kinds of randomness into your work.

Random Number Common Errors and Solutions:

No API key provided! A valid RANDOM.ORG API key is required to use True Random.org Number Generator

  • Explanation: This error occurs when an API key is not provided for the True Random.org Number Generator.
  • Solution: Ensure that you provide a valid RANDOM.ORG API key to use this feature. You can obtain an API key by signing up on the RANDOM.ORG website.

Seed too large for power noise; rescaled to: <seed_value>

  • Explanation: This warning indicates that the provided seed value is too large and has been rescaled to fit within the acceptable range.
  • Solution: Use a seed value within the range of 0 to 4294967293 to avoid this warning and ensure proper functionality.

Random Number Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.