ComfyUI Node: M-LSD Lines

Class Name

M-LSDPreprocessor

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

M-LSD Lines Description

Extract line structures from images using MLSD model for AI artists to enhance creative projects with detailed line-based features.

M-LSD Lines:

The M-LSDPreprocessor node is designed to extract line structures from images, making it an essential tool for AI artists who need to identify and utilize line-based features in their creative projects. This node leverages the MLSD (Multi-Scale Line Segment Detector) model to detect and highlight lines within an image, which can be particularly useful for tasks such as sketching, edge detection, and enhancing the structural details of an image. By providing a clear and precise representation of lines, the M-LSDPreprocessor helps in creating more detailed and accurate artworks, facilitating better control over the artistic process.

M-LSD Lines Input Parameters:

score_threshold

The score_threshold parameter determines the minimum confidence score required for a line to be considered valid. This helps in filtering out less significant lines and focusing on the more prominent ones. The value ranges from 0.01 to 2.0, with a default value of 0.1. Lower values will include more lines, potentially adding noise, while higher values will result in fewer, more confident lines.

dist_threshold

The dist_threshold parameter sets the maximum allowable distance between points for them to be considered part of the same line. This helps in controlling the granularity of the line detection. The value ranges from 0.01 to 20.0, with a default value of 0.1. Smaller values will result in more segmented lines, while larger values will produce longer, more continuous lines.

M-LSD Lines Output Parameters:

IMAGE

The output is an IMAGE that contains the detected lines superimposed on the original image. This output is crucial for visualizing the line structures within the image, allowing you to see the detected lines clearly and use them in further artistic or analytical processes.

M-LSD Lines Usage Tips:

  • Adjust the score_threshold to balance between detecting more lines and reducing noise. A lower threshold will detect more lines but may include less significant ones.
  • Use the dist_threshold to control the continuity of the lines. For more detailed and segmented line detection, use a lower value; for smoother and longer lines, increase the threshold.

M-LSD Lines Common Errors and Solutions:

Model not found

  • Explanation: The MLSD model could not be loaded, possibly due to missing files or incorrect paths.
  • Solution: Ensure that the MLSD model files are correctly installed and the paths are properly set. Reinstall the model if necessary.

CUDA out of memory

  • Explanation: The model requires more GPU memory than is available.
  • Solution: Reduce the resolution of the input image or close other applications that are using GPU resources to free up memory.

Invalid input image

  • Explanation: The input image format is not supported or the image is corrupted.
  • Solution: Verify that the input image is in a supported format (e.g., JPEG, PNG) and is not corrupted. Try using a different image to see if the issue persists.

M-LSD 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.