Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
a7253cf
1
Parent(s):
db30da6
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), Resampling.LANCZOS)
|
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
|
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), Image.Resampling.LANCZOS)
|
39 |
return resized_img
|
40 |
|
41 |
EDMEulerScheduler.set_timesteps = set_timesteps_patched
|