ComfyUI  >  Nodes  >  comfyui-art-venture >  Number Scaler

ComfyUI Node: Number Scaler

Class Name

NumberScaler

Category
Art Venture/Utils
Author
sipherxyz (Account age: 1158 days)
Extension
comfyui-art-venture
Latest Updated
7/31/2024
Github Stars
0.1K

How to Install comfyui-art-venture

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

Number Scaler Description

Transform numerical values between ranges for normalization and scaling in creative projects.

Number Scaler:

The NumberScaler node is designed to transform a given numerical value from one range to another. This is particularly useful in scenarios where you need to normalize or scale values to fit within a specific range, such as adjusting the intensity of effects or parameters in your AI art projects. By providing a flexible and intuitive way to map values from an original range to a target range, the NumberScaler helps ensure that your inputs are appropriately scaled, leading to more consistent and predictable results in your creative workflows.

Number Scaler Input Parameters:

min

This parameter defines the minimum value of the original range from which the input value will be scaled. It sets the lower bound of the input range. The default value is 1.0, with a minimum of 0.0 and a maximum of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF). Adjusting this value will change the starting point of the input range.

max

This parameter specifies the maximum value of the original range from which the input value will be scaled. It sets the upper bound of the input range. The default value is 10.0, with a minimum of 0.0 and a maximum of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF). Adjusting this value will change the endpoint of the input range.

scale_to_min

This parameter defines the minimum value of the target range to which the input value will be scaled. It sets the lower bound of the output range. The default value is 0.0, with a minimum of 0.0 and a maximum of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF). Adjusting this value will change the starting point of the output range.

scale_to_max

This parameter specifies the maximum value of the target range to which the input value will be scaled. It sets the upper bound of the output range. The default value is 1.0, with a minimum of 0.0 and a maximum of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF). Adjusting this value will change the endpoint of the output range.

value

This parameter is the numerical value that you want to scale from the original range to the target range. The default value is 0.0, with a minimum of 0.0 and a maximum of 18,446,744,073,709,551,615 (0xFFFFFFFFFFFFFFFF). This is the value that will be transformed based on the specified ranges.

Number Scaler Output Parameters:

FLOAT

The output is a single floating-point number that represents the scaled value. This value is the result of mapping the input value from the original range defined by min and max to the target range defined by scale_to_min and scale_to_max. This scaled value can then be used in subsequent nodes or processes within your AI art project.

Number Scaler Usage Tips:

  • Ensure that the min and max values accurately represent the range of your input data to achieve correct scaling.
  • Use scale_to_min and scale_to_max to adjust the output range to fit the requirements of your specific application or effect.
  • Test with different value inputs to understand how changes in the input range affect the scaled output.

Number Scaler Common Errors and Solutions:

Division by zero error

  • Explanation: This error occurs if the min and max values are set to the same number, resulting in a division by zero during scaling.
  • Solution: Ensure that min and max are set to different values to define a valid range.

Invalid input range

  • Explanation: This error occurs if the input value is outside the range defined by min and max.
  • Solution: Verify that the input value falls within the specified min and max range to ensure proper scaling.

Invalid target range

  • Explanation: This error occurs if scale_to_min and scale_to_max are set to the same number, leading to an invalid target range.
  • Solution: Ensure that scale_to_min and scale_to_max are set to different values to define a valid target range.

Number Scaler Related Nodes

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