Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ from omegaconf import OmegaConf
|
|
8 |
import subprocess
|
9 |
from tqdm import tqdm
|
10 |
import requests
|
|
|
11 |
|
12 |
def download_file(url, filename):
|
13 |
response = requests.get(url, stream=True)
|
@@ -57,6 +58,7 @@ load_state_dict(model, ckpt, strict=True)
|
|
57 |
model.freeze()
|
58 |
model.to("cuda")
|
59 |
|
|
|
60 |
@torch.no_grad()
|
61 |
def process(image, steps, t_max, t_min, color_fix_type):
|
62 |
image = Image.open(image).convert("RGB")
|
|
|
8 |
import subprocess
|
9 |
from tqdm import tqdm
|
10 |
import requests
|
11 |
+
import spaces
|
12 |
|
13 |
def download_file(url, filename):
|
14 |
response = requests.get(url, stream=True)
|
|
|
58 |
model.freeze()
|
59 |
model.to("cuda")
|
60 |
|
61 |
+
@spaces.GPU
|
62 |
@torch.no_grad()
|
63 |
def process(image, steps, t_max, t_min, color_fix_type):
|
64 |
image = Image.open(image).convert("RGB")
|