Anyline: The Ultimate SD Line Extraction Tool for ComfyUI & SD

Anyline is a highly efficient, accurate and detailed ControlNet line detection preprocessor that can precisely extract object edges, image details and textual content from most images. Users can input any type of image and quickly obtain line drawings with clear edges, ample detail preservation, and high text fidelity, which can then be used as input for conditional generation in Stable Diffusion. It is currently the best SD line extraction tool available.

Technical Details

The models and algorithms used in Anyline are based on the innovative achievements from the paper “Tiny and Efficient Model for the Edge Detection Generalization (TEED)“. The TEED preset in ComfyUI also originates from this work, signifying that it is a powerful visual algorithm (TEED is currently state-of-the-art).

Comparison with Other Line Extraction Preprocessors

Anyline uses a processing resolution of 1280px, so comparisons are made at this resolution. Compared to other commonly used line preprocessors, Anyline has significant advantages in contour accuracy, object details, material textures and font recognition (especially in large scenes). It also performs better at noise reduction in most scenes, resulting in cleaner image processing and fewer inaccuracies during generation.

Effects Overview

When combined with the Mistoline ControlNet model, Anyline forms a complete SDXL workflow that maximizes precise control and leverages the generative capabilities of the SDXL model. Anyline can also be used with SD1.5’s ControlNet in SD1.5 workflows, although it generally performs better in the Anyline+MistoLine setup within the SDXL workflow.

Note: The final result is highly dependent on the base model used. Please select an appropriate base model according to your needs.

ComfyUI Workflow

After installation, the Anyline preprocessor can be accessed in ComfyUI via search or right-click. The standard workflow using Anyline+Mistoline in SDXL is as follows. The ComfyUI workflow download link is provided above.

Usage in sd-webui-controlnet

Follow the instructions in Mikubill/sd-webui-controlnet#2907 to use Anyline in the sd-webui-controlnet plugin.

Limitations and Future Development

Anyline may encounter difficulties with images that exhibit camera-like blurs or soft focus, and may require iterations based on community feedback.

The developers also plan to contact the author of ComfyUI or the developer of ComfyUI-Controlnet to integrate Anyline into ComfyUI for easier future use.

Relevant Links

Categories: AI Tools
X