FastGUI / src /backend /annotators /lineart_control.py
clone3's picture
Upload 114 files
e3900a5 verified
raw
history blame contribute delete
406 Bytes
import numpy as np
from backend.annotators.control_interface import ControlInterface
from controlnet_aux import LineartDetector
from PIL import Image
class LineArtControl(ControlInterface):
def get_control_image(self, image: Image) -> Image:
processor = LineartDetector.from_pretrained("lllyasviel/Annotators")
control_image = processor(image)
return control_image