File size: 263 Bytes
d3fbdbe
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from controlnet_aux import OpenposeDetector
from PIL import Image


def init():
    global openpose
    openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')


def get_openpose(img: Image ):
    img_openpose = openpose(img)
    return img_openpose