ComfyUI > Nodes > CRT-Nodes > Mask Empty Float (CRT)

ComfyUI Node: Mask Empty Float (CRT)

Class Name

MaskEmptyFloatNode

Category
CRT/Utils/Logic & Values
Author
CRT (Account age: 1707days)
Extension
CRT-Nodes
Latest Updated
2026-03-16
Github Stars
0.1K

How to Install CRT-Nodes

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

Mask Empty Float (CRT) Description

Evaluates a mask for non-zero values, returning a float if not empty, enabling conditional logic.

Mask Empty Float (CRT):

The MaskEmptyFloatNode is a utility node designed to evaluate a given mask and determine if it is empty, meaning all its values are zero. This node is particularly useful in scenarios where you need to make decisions based on the presence or absence of data within a mask. By providing a float value when the mask is not empty, it allows for conditional logic to be applied in workflows, enabling more dynamic and responsive processing. The primary function of this node is to check the mask and return a specified float value if the mask contains any non-zero elements, otherwise, it returns zero. This capability is essential for AI artists who need to automate processes based on the content of masks, ensuring that operations are only performed when necessary.

Mask Empty Float (CRT) Input Parameters:

mask

The mask parameter is a crucial input that represents the data to be evaluated. It is expected to be a tensor that can be processed to determine if it is empty or not. The mask is typically used to represent areas of interest or exclusion in an image or dataset. When the mask is entirely zero, it is considered empty, and the node will return a default value of zero. This parameter does not have specific minimum or maximum values as it is a binary representation of data presence.

value_if_non_empty

The value_if_non_empty parameter is a float that specifies the value to be returned if the mask is found to contain any non-zero elements. This allows for conditional logic based on the presence of data within the mask. The default value for this parameter is 1.0, with a minimum of 0.0 and a maximum of 1.0, adjustable in increments of 0.01. This flexibility enables you to define the significance of a non-empty mask in your workflow, tailoring the output to suit specific needs.

Mask Empty Float (CRT) Output Parameters:

float_output

The float_output is the result of the node's evaluation of the mask. It outputs a float value that is either 0.0 if the mask is empty or the specified value_if_non_empty if the mask contains any non-zero elements. This output is essential for driving subsequent logic in a workflow, allowing for decisions to be made based on the presence of data within the mask. The interpretation of this output is straightforward: a zero indicates no data, while a non-zero value signifies the presence of data, triggering further actions as defined by the workflow.

Mask Empty Float (CRT) Usage Tips:

  • Use the MaskEmptyFloatNode to streamline workflows by automatically determining when to apply certain operations based on the presence of data in a mask. This can help optimize processing time and resources by avoiding unnecessary computations.
  • Adjust the value_if_non_empty parameter to reflect the importance or weight of a non-empty mask in your specific application. This can be particularly useful in scenarios where different masks have varying levels of significance.

Mask Empty Float (CRT) Common Errors and Solutions:

Mask is not a tensor

  • Explanation: This error occurs when the input provided for the mask parameter is not a tensor, which is required for processing.
  • Solution: Ensure that the input mask is correctly formatted as a tensor before passing it to the node. You may need to convert or reshape your data accordingly.

Invalid value for value_if_non_empty

  • Explanation: This error arises when the value_if_non_empty parameter is set outside its allowed range of 0.0 to 1.0.
  • Solution: Verify that the value_if_non_empty is within the specified range and adjust it if necessary. Use increments of 0.01 to fine-tune the value as needed.

Mask Empty Float (CRT) Related Nodes

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

Mask Empty Float (CRT)