ComfyUI Node: Binary Lines

Class Name

BinaryPreprocessor

Category
ControlNet Preprocessors/Line Extractors
Author
Fannovel16 (Account age: 3127days)
Extension
ComfyUI's ControlNet Auxiliary Preprocessors
Latest Updated
2024-06-18
Github Stars
1.57K

How to Install ComfyUI's ControlNet Auxiliary Preprocessors

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

Binary Lines Description

Converts images to binary format for extracting line art or high-contrast features, with adjustable threshold for sensitivity control.

Binary Lines:

The BinaryPreprocessor node is designed to convert images into binary format, which is particularly useful for extracting line art or high-contrast features from an image. This node leverages a binary thresholding technique to distinguish between the foreground and background, making it easier to isolate specific elements within an image. By adjusting the threshold, you can control the sensitivity of the line extraction, allowing for fine-tuning based on the complexity and details of the input image. This node is ideal for artists looking to create clean, high-contrast line drawings from more complex images, providing a simplified and efficient way to preprocess images for further artistic manipulation or analysis.

Binary Lines Input Parameters:

bin_threshold

The bin_threshold parameter determines the threshold value used for binary conversion. Pixels with intensity values above this threshold are set to the maximum value (white), while those below are set to the minimum value (black). This parameter allows you to control the sensitivity of the binary conversion, with lower values capturing more details and higher values simplifying the image. The bin_threshold parameter ranges from 0 to 255, with a default value of 100. Adjusting this value can significantly impact the resulting binary image, making it crucial to experiment with different settings to achieve the desired effect.

Binary Lines Output Parameters:

IMAGE

The output of the BinaryPreprocessor node is an IMAGE that has been converted to binary format based on the specified threshold. This binary image highlights the high-contrast features and lines within the original image, making it easier to isolate and manipulate specific elements. The resulting image can be used for various artistic applications, such as creating line art, enhancing details, or serving as a base for further image processing techniques.

Binary Lines Usage Tips:

  • Experiment with different bin_threshold values to find the optimal setting for your specific image. Lower thresholds capture more details, while higher thresholds simplify the image.
  • Use the binary image output as a base layer for further artistic enhancements, such as adding color or texture overlays.
  • Combine the BinaryPreprocessor node with other preprocessing nodes to create more complex and refined image transformations.

Binary Lines Common Errors and Solutions:

"Invalid threshold value"

  • Explanation: The bin_threshold value provided is outside the acceptable range (0-255).
  • Solution: Ensure that the bin_threshold value is within the specified range. Adjust the value to be between 0 and 255.

"Image input not provided"

  • Explanation: The node requires an image input to perform the binary conversion.
  • Solution: Make sure to provide a valid image input to the node before executing the process.

"Resolution parameter missing"

  • Explanation: The resolution parameter is not provided, which is necessary for processing the image.
  • Solution: Ensure that the resolution parameter is included in the input parameters, with a default value of 512 if not specified.

Binary Lines Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI's ControlNet Auxiliary Preprocessors
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.