Files
xiaden 315666c7b6 refactor: restructure into subpackages, add _shared layer, remove AI slop
- Split flat node modules into categorized subpackages (tagging, detect,
  edge, pose, segment, restore, compare, judge, transform, utility)
- Extract shared internals into _shared/ (bases, tensor, formatting)
- Centralize node registration via register_nodes() helper
- Clean up: remove dead is_scored return, unnecessary hasattr guard,
  inline imports
2026-07-05 08:59:48 +00:00

28 lines
1.2 KiB
Python

"""Neural lineart edge detection."""
from comfy_api.latest import io
from .._shared.bases import _ImageToImage
class ImgUtilsLineart(_ImageToImage):
@classmethod
def define_schema(cls) -> io.Schema:
return io.Schema(
node_id="ImgUtilsLineart", display_name="Imgutils Edge (Lineart)",
category="imgutils/edge",
description="Extract lineart edges using a neural lineart model.",
search_aliases=["edge", "lineart", "outline", "line", "sketch"],
inputs=[
io.Image.Input("image", tooltip="Input image to detect edges."),
io.Boolean.Input("coarse", default=False, tooltip="Use coarse model for deeper/richer lines."),
io.Int.Input("detect_resolution", default=512, min=128, max=2048, step=64, tooltip="Detection resolution."),
],
outputs=[io.Image.Output(display_name="image")],
)
@classmethod
def execute(cls, image, coarse, detect_resolution) -> io.NodeOutput:
from imgutils.edge import edge_image_with_lineart
return cls._run(image, edge_image_with_lineart, coarse=coarse, detect_resolution=detect_resolution)