ComfyUI > Nodes > Akatz Custom Nodes > Scheduled Binary Comparison | Akatz

ComfyUI Node: Scheduled Binary Comparison | Akatz

Class Name

AK_ScheduledBinaryComparison

Category
💜Akatz Nodes/Image
Author
akatz-ai (Account age: 358days)
Extension
Akatz Custom Nodes
Latest Updated
2025-04-05
Github Stars
0.03K

How to Install Akatz Custom Nodes

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

Scheduled Binary Comparison | Akatz Description

Perform binary threshold operation on batch images with flexible epsilon schedule for conditional transformations.

Scheduled Binary Comparison | Akatz:

The AK_ScheduledBinaryComparison node is designed to perform a binary threshold operation on a batch of images based on a specified comparison schedule. This node is particularly useful for AI artists who want to apply a conditional transformation to images, where each image in a batch is compared against a threshold value that can vary per image. The node allows for flexibility by incorporating an optional epsilon schedule, which provides a margin of error for the comparison, making it possible to account for slight variations in image data. This feature is beneficial when working with images that may not precisely meet the threshold but are close enough to be considered equivalent. By using this node, you can effectively manage and manipulate image data in a batch processing context, ensuring that each image is evaluated according to its specific criteria.

Scheduled Binary Comparison | Akatz Input Parameters:

images

The images parameter represents the batch of images that you want to process. Each image in the batch will be evaluated against the corresponding threshold value from the comparison_schedule. This parameter is crucial as it determines the data set on which the binary comparison will be applied. There are no specific minimum or maximum values for this parameter, as it depends on the size and format of the images you are working with.

comparison_schedule

The comparison_schedule is a list of threshold values that correspond to each image in the batch. This parameter dictates the threshold against which each image will be compared. If the list is shorter than the batch size, the last value will be repeated to match the batch size. This ensures that every image has a corresponding threshold value, allowing for a consistent comparison process.

epsilon_schedule

The epsilon_schedule is an optional list that provides a margin of error for the comparison. If use_epsilon is set to true, this schedule allows for a more flexible comparison by considering images that are within a certain range of the threshold as meeting the condition. If not provided, a default epsilon value of 0.1 is used. This parameter is particularly useful when dealing with images that may have slight variations that should not disqualify them from meeting the threshold.

use_epsilon

The use_epsilon parameter is a boolean that determines whether the epsilon margin should be applied during the comparison. By default, this is set to true, allowing for a more forgiving comparison that accounts for minor discrepancies in image data. If set to false, the comparison will be strict, requiring images to meet or exceed the threshold exactly.

Scheduled Binary Comparison | Akatz Output Parameters:

images

The output images parameter is a batch of images that have been processed through the binary threshold operation. Each image in the output batch is transformed into a binary format, where pixels meeting the threshold condition are set to 1.0, and those that do not are set to 0.0. This binary representation is useful for further image processing tasks, such as masking or segmentation, where clear distinctions between different regions of an image are required.

Scheduled Binary Comparison | Akatz Usage Tips:

  • Ensure that the comparison_schedule list is appropriately sized to match the batch of images you are processing. If the list is too short, the last value will be repeated, which may not be ideal for all use cases.
  • Utilize the epsilon_schedule to allow for slight variations in image data, especially when working with images that may not precisely meet the threshold but are close enough to be considered equivalent.
  • Consider setting use_epsilon to false if you require a strict comparison without any margin for error, ensuring that only images that exactly meet or exceed the threshold are processed.

Scheduled Binary Comparison | Akatz Common Errors and Solutions:

Mismatched Batch Size

  • Explanation: The comparison_schedule or epsilon_schedule list does not match the batch size of the images.
  • Solution: Ensure that both the comparison_schedule and epsilon_schedule lists are either equal to or longer than the batch size of the images. If they are shorter, the last value will be repeated, but it's best to provide a complete list for clarity.

Invalid Image Data Type

  • Explanation: The images parameter contains data that is not in the expected format or data type.
  • Solution: Verify that the images parameter is a batch of images in a compatible format and data type, such as a tensor with the appropriate dimensions and data type for processing.

Epsilon Schedule Not Provided

  • Explanation: The epsilon_schedule is not provided, and use_epsilon is set to true.
  • Solution: If you want to use an epsilon margin, provide an epsilon_schedule list. If not, ensure that use_epsilon is set to false to avoid unnecessary processing.

Scheduled Binary Comparison | Akatz Related Nodes

Go back to the extension to check out more related nodes.
Akatz Custom 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 Playground, enabling artists to harness the latest AI tools to create incredible art.