fastsdtest / backend /annotators /pose_control.py
bilegentile's picture
Upload folder using huggingface_hub
564df58 verified
raw
history blame
357 Bytes
from backend.annotators.control_interface import ControlInterface
from controlnet_aux import OpenposeDetector
from PIL import Image
class PoseControl(ControlInterface):
def get_control_image(self, image: Image) -> Image:
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
image = openpose(image)
return image