File size: 357 Bytes
510ee71
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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