ComfyUI > Nodes > latent-tools > LTNumberRangeUniform

ComfyUI Node: LTNumberRangeUniform

Class Name

LTNumberRangeUniform

Category
LatentTools
Author
Machines-of-Disruption (Account age: 80days)
Extension
latent-tools
Latest Updated
2026-02-07
Github Stars
0.03K

How to Install latent-tools

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

LTNumberRangeUniform Description

Randomizes a parameter using a uniform distribution for dynamic variability within a set range.

LTNumberRangeUniform:

The LTNumberRangeUniform node is designed to randomize a parameter using a uniform distribution, which means it generates a random floating-point number that is equally likely to fall anywhere between a specified minimum and maximum value. This node is particularly useful in scenarios where you need to introduce variability or randomness into a parameter, ensuring that each possible value within the defined range has an equal chance of being selected. By leveraging a uniform distribution, this node can help create more dynamic and varied outputs, which can be beneficial in artistic applications where unpredictability and diversity are desired. The node's functionality is encapsulated in the param_range_uniform method, which takes in a seed value to ensure reproducibility of the randomization process, allowing for consistent results across different runs if the same seed is used.

LTNumberRangeUniform Input Parameters:

min_value

The min_value parameter defines the lower bound of the range from which the random number will be generated. It determines the smallest possible value that can be selected by the node. The parameter accepts floating-point numbers with a default value of 0.0, and it can range from -1,000,000 to 1,000,000. Adjusting this parameter allows you to control the starting point of the randomization range, which can significantly impact the variability and scope of the generated outputs.

max_value

The max_value parameter sets the upper bound of the range for the random number generation. It specifies the largest possible value that can be selected by the node. Like min_value, this parameter accepts floating-point numbers and has a default value of 1.0, with a permissible range from -1,000,000 to 1,000,000. By modifying this parameter, you can control the endpoint of the randomization range, influencing the extent and diversity of the generated values.

seed

The seed parameter is an integer that initializes the random number generator, ensuring that the sequence of random numbers is reproducible. This means that using the same seed value will produce the same sequence of random numbers, which is crucial for consistency in applications where repeatability is important. The default value is 0, and it can range from 0 to 0xffffffffffffffff. This parameter is particularly useful when you need to recreate specific randomization results for testing or iterative design processes.

LTNumberRangeUniform Output Parameters:

FLOAT

The FLOAT output is the primary result of the node, representing the randomly generated floating-point number within the specified range. This output is crucial as it provides the actual value that can be used in subsequent processes or nodes, allowing for dynamic and varied input into your artistic or computational workflows.

INT

The INT output is the integer representation of the generated floating-point number. This output is useful when you need a whole number for further processing or when integrating with systems that require integer inputs. It provides a straightforward way to convert the random float into an integer, ensuring compatibility with various applications.

STRING

The STRING output is a string representation of the generated floating-point number, rounded to five decimal places. This output is particularly helpful for logging, debugging, or displaying the generated value in a human-readable format. It allows you to easily document or communicate the results of the randomization process.

LTNumberRangeUniform Usage Tips:

  • To ensure consistent results across different runs, use the same seed value when you want to reproduce specific randomization outcomes.
  • Adjust the min_value and max_value parameters to control the range and variability of the generated numbers, tailoring the randomness to suit your specific artistic or computational needs.

LTNumberRangeUniform Common Errors and Solutions:

ValueError: min_value must be less than max_value

  • Explanation: This error occurs when the min_value is set to a value greater than or equal to max_value, which is not allowed as it would result in an invalid range.
  • Solution: Ensure that min_value is always less than 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 to ensure proper initialization of the random number generator.

LTNumberRangeUniform Related Nodes

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

LTNumberRangeUniform