Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
db30da6
1
Parent(s):
065cd19
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import numpy as np
|
|
6 |
import math
|
7 |
import spaces
|
8 |
import torch
|
9 |
-
from PIL import Image
|
10 |
|
11 |
edit_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl_edit.safetensors")
|
12 |
normal_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl.safetensors")
|
@@ -35,7 +35,7 @@ def resize_image(image, resolution):
|
|
35 |
new_height = resolution
|
36 |
new_width = int((resolution / original_height) * original_width)
|
37 |
|
38 |
-
resized_img = image.resize((new_width, new_height),
|
39 |
return resized_img
|
40 |
|
41 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|
|
|
6 |
import math
|
7 |
import spaces
|
8 |
import torch
|
9 |
+
from PIL import Image, Resampling
|
10 |
|
11 |
edit_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl_edit.safetensors")
|
12 |
normal_file = hf_hub_download(repo_id="stabilityai/cosxl", filename="cosxl.safetensors")
|
|
|
35 |
new_height = resolution
|
36 |
new_width = int((resolution / original_height) * original_width)
|
37 |
|
38 |
+
resized_img = image.resize((new_width, new_height), Resampling.LANCZOS)
|
39 |
return resized_img
|
40 |
|
41 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|