Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
thejagstudio
/
fastSD
like
3
Runtime error
App
Files
Files
Community
531e233
fastSD
/
image_ops.py
thejagstudio
Upload 61 files
510ee71
verified
5 months ago
raw
Copy download link
history
blame
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,
)