Download src/backend/annotators/softedge_control.py from clone3/FastGUI: direct link, hf CLI and curl.
- Browser
- Download file 387 Bytes
-
https://huggingface.co/spaces/clone3/FastGUI/resolve/main/src/backend/annotators/softedge_control.py
- Command line
-
hf download hf://spaces/clone3/FastGUI/src/backend/annotators/softedge_control.py
-
curl -L -o softedge_control.py https://huggingface.co/spaces/clone3/FastGUI/resolve/main/src/backend/annotators/softedge_control.py
387 Bytes
| from backend.annotators.control_interface import ControlInterface | |
| from controlnet_aux import PidiNetDetector | |
| from PIL import Image | |
| class SoftEdgeControl(ControlInterface): | |
| def get_control_image(self, image: Image) -> Image: | |
| processor = PidiNetDetector.from_pretrained("lllyasviel/Annotators") | |
| control_image = processor(image) | |
| return control_image | |