Download src/backend/annotators/pose_control.py from clone3/FastGUI: direct link, hf CLI and curl.
- Browser
- Download file 367 Bytes
-
https://huggingface.co/spaces/clone3/FastGUI/resolve/main/src/backend/annotators/pose_control.py
- Command line
-
hf download hf://spaces/clone3/FastGUI/src/backend/annotators/pose_control.py
-
curl -L -o pose_control.py https://huggingface.co/spaces/clone3/FastGUI/resolve/main/src/backend/annotators/pose_control.py
367 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 | |