fastsdtest / backend /annotators /mlsd_control.py
bilegentile's picture
Upload folder using huggingface_hub
564df58 verified
raw
history blame contribute delete
341 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