ComfyUI > Nodes > ComfyUI 1hewNodes > Range Mapping

ComfyUI Node: Range Mapping

Class Name

1hew_RangeMapping

Category
1hewNodes/util
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

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

Range Mapping Description

Transforms a 0-1 normalized value to a specified range with adjustable precision for scaling tasks.

Range Mapping:

The 1hew_RangeMapping node is designed to transform a value within the normalized range of 0 to 1 into a specified range defined by minimum and maximum values. This node is particularly useful when you need to scale a normalized input to a different range, which is a common requirement in various computational and artistic applications. By allowing you to specify the precision of the output through rounding, it provides flexibility in how the mapped value is represented, ensuring that the output can be tailored to the specific needs of your project. This capability is essential for tasks that require precise control over value scaling, such as adjusting parameters in generative art or fine-tuning inputs for machine learning models.

Range Mapping Input Parameters:

value

The value parameter represents the input value that you wish to map from the normalized range of 0 to 1 to a new range defined by the min and max parameters. It accepts a floating-point number with a default value of 1.0, and it can be adjusted in increments of 0.001. The minimum and maximum allowable values for this parameter are 0.0 and 1.0, respectively. This parameter is crucial as it determines the initial position within the normalized range that will be transformed.

min

The min parameter defines the lower bound of the target range to which the value will be mapped. It accepts a floating-point number with a default value of 0.0. The parameter can be set to any value within the range of -0xFFFFFFFFFFFFFFFF to 0xFFFFFFFFFFFFFFFF, allowing for a wide range of possible mappings. This parameter is essential for setting the starting point of the new range, influencing the final mapped output.

max

The max parameter specifies the upper bound of the target range for the mapping process. Like the min parameter, it accepts a floating-point number and has a default value of 1.0. It shares the same range of possible values as the min parameter, from -0xFFFFFFFFFFFFFFFF to 0xFFFFFFFFFFFFFFFF. This parameter is critical for defining the endpoint of the new range, affecting the scaling of the input value.

rounding

The rounding parameter determines the number of decimal places to which the mapped value will be rounded. It accepts an integer with a default value of 3, and it can be adjusted between 0 and 10. This parameter is important for controlling the precision of the output, allowing you to tailor the level of detail in the mapped value to suit your specific requirements.

Range Mapping Output Parameters:

actual_value

The actual_value output represents the result of mapping the input value from the normalized range to the specified range defined by min and max. This output is a floating-point number that reflects the scaled position of the input within the new range. The precision of this value is determined by the rounding parameter, ensuring that the output meets the desired level of accuracy for your application.

int_value

The int_value output provides an integer representation of the actual_value. This output is particularly useful when an integer value is required for further processing or when working with systems that do not support floating-point numbers. It ensures that the mapped value can be easily integrated into a variety of workflows that require integer inputs.

Range Mapping Usage Tips:

  • To achieve precise control over the mapped output, adjust the rounding parameter to match the level of detail required for your project. A higher rounding value will provide more decimal places, while a lower value will result in a more rounded output.
  • When mapping values for visual applications, consider the impact of the min and max parameters on the overall appearance of the output. Experiment with different ranges to achieve the desired visual effect.

Range Mapping Common Errors and Solutions:

ValueError: Input value out of range

  • Explanation: This error occurs when the value parameter is set outside the allowable range of 0.0 to 1.0.
  • Solution: Ensure that the value parameter is within the specified range by adjusting it to a value between 0.0 and 1.0.

OverflowError: Min or Max value too large

  • Explanation: This error is triggered when the min or max parameters are set to values that exceed the allowable range.
  • Solution: Verify that the min and max parameters are within the range of -0xFFFFFFFFFFFFFFFF to 0xFFFFFFFFFFFFFFFF and adjust them accordingly.

Range Mapping Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI 1hewNodes
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.

Range Mapping