fastsdtest / backend /annotators /normal_control.py
bilegentile's picture
Upload folder using huggingface_hub
564df58 verified
raw
history blame contribute delete
379 Bytes
from backend.annotators.control_interface import ControlInterface
from controlnet_aux import NormalBaeDetector
from PIL import Image
class NormalControl(ControlInterface):
def get_control_image(self, image: Image) -> Image:
processor = NormalBaeDetector.from_pretrained("lllyasviel/Annotators")
control_image = processor(image)
return control_image