Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
Duplicated from
rupeshs/fastsdcpu
Umairbdxn
/
fastsdcpu
like
1
Build error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
fastsdcpu
/
image_ops.py
rupeshs
added files
d7dfee6
over 2 years ago
Raw
Download with hf CLI
Copy download link
History
Blame
Contribute
Delete
Safe
262 Bytes
from
PIL
import
Image
def
resize_pil_image
(
pil_image: Image,
image_width,
image_height,
):
return
pil_image.convert(
"RGB"
).resize(
(
image_width,
image_height,
),
Image.Resampling.LANCZOS,
)