fastSD / backend /annotators /mlsd_control.py
thejagstudio's picture
Upload 61 files
510ee71 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