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