Visit ComfyUI Online for ready-to-use ComfyUI environment
Apply scaling transformations to masks based on min/max float values for dynamic manipulation in AI workflows, ensuring precision and flexibility.
The ADE_MultivalScaledMask node is designed to apply scaling transformations to a given mask based on specified minimum and maximum float values. This node is particularly useful for AI artists who need to manipulate masks dynamically within their workflows, allowing for both absolute and relative scaling. By leveraging this node, you can ensure that your masks are adjusted to the desired range, enhancing the precision and flexibility of your artistic creations. The node automatically handles iterable inputs and ensures that the mask dimensions match the expected batch size, making it a robust tool for complex masking operations.
This parameter sets the minimum float value for scaling the mask. It can be a single float or an iterable of floats. If an iterable is provided, the node will ensure that the mask and the iterable match in length. The minimum value is 0.0, and the maximum value is not explicitly defined, but it should be within a reasonable range for your specific use case. The default value is typically set to a low float value to ensure proper scaling.
This parameter sets the maximum float value for scaling the mask. Similar to min_float_val
, it can be a single float or an iterable of floats. The node will adjust the mask dimensions to match the length of the iterable if provided. The minimum value is 0.0, and the maximum value is not explicitly defined, but it should be within a reasonable range for your specific use case. The default value is typically set to a high float value to ensure proper scaling.
This parameter determines the type of scaling to be applied to the mask. It accepts two options: ABSOLUTE
and RELATIVE
. ABSOLUTE
scaling will linearly convert the mask values to the new range defined by min_float_val
and max_float_val
, while RELATIVE
scaling will normalize the mask values to the new range. This parameter is crucial for defining how the mask values are adjusted and can significantly impact the final output.
This parameter is the input mask that will be scaled. It should be a tensor representing the mask you wish to transform. The node will ensure that the mask dimensions match the expected batch size and apply the specified scaling transformation.
The output is the scaled mask tensor. This tensor will have the same dimensions as the input mask but with values adjusted according to the specified min_float_val
, max_float_val
, and scaling
parameters. The scaled mask can then be used in subsequent nodes or processes within your workflow, providing a dynamically adjusted mask that meets your specific requirements.
min_float_val
and max_float_val
parameters are set appropriately for your specific use case to achieve the desired scaling effect.scaling
parameter to switch between absolute and relative scaling, depending on whether you need a linear conversion or normalization of the mask values.scaling '<value>' not recognized.
scaling
parameter.scaling
parameter is set to either ABSOLUTE
or RELATIVE
.ValueError: mask and float values must match in length.
TypeError: Expected float or iterable of floats for min_float_val and max_float_val.
min_float_val
or max_float_val
parameters are not provided as floats or iterables of floats.min_float_val
and max_float_val
parameters are correctly set as either single float values or iterables of floats.© Copyright 2024 RunComfy. All Rights Reserved.