FastGUI / src /backend /annotators /mlsd_control.py
clone3's picture
Upload 114 files
e3900a5 verified
raw
history blame contribute delete
351 Bytes
from backend.annotators.control_interface import ControlInterface
from controlnet_aux import MLSDdetector
from PIL import Image
class MlsdControl(ControlInterface):
def get_control_image(self, image: Image) -> Image:
mlsd = MLSDdetector.from_pretrained("lllyasviel/ControlNet")
image = mlsd(image)
return image