fastSD / backend /annotators /pose_control.py
thejagstudio's picture
Upload 61 files
510ee71 verified
raw
history blame contribute delete
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