Spaces:
Running
Running
Download src/backend/utils.py from rupeshs/fastsdcpu: direct link, hf CLI and curl.
- Browser
- Download file 413 Bytes
-
https://huggingface.co/spaces/rupeshs/fastsdcpu/resolve/main/src/backend/utils.py
- Command line
-
hf download hf://spaces/rupeshs/fastsdcpu/src/backend/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/rupeshs/fastsdcpu/resolve/main/src/backend/utils.py
413 Bytes
| from PIL import Image | |
| def get_blank_image( | |
| width: int, | |
| height: int, | |
| ) -> Image.Image: | |
| """ | |
| Create a blank image with the specified width and height. | |
| Args: | |
| width (int): The width of the image. | |
| height (int): The height of the image. | |
| Returns: | |
| Image.Image: A blank image with the specified dimensions. | |
| """ | |
| return Image.new("RGB", (width, height), (0, 0, 0)) | |