Spaces:
Running
on
Zero
Running
on
Zero
amildravid4292
commited on
Commit
•
4812ff5
1
Parent(s):
ba1e7db
Update app.py
Browse files
app.py
CHANGED
@@ -311,7 +311,7 @@ class CustomImageDataset(Dataset):
|
|
311 |
image = self.transform(image)
|
312 |
return image
|
313 |
|
314 |
-
@spaces.GPU(duration=
|
315 |
def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
316 |
device = "cuda"
|
317 |
mean.to(device)
|
@@ -386,7 +386,7 @@ def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
|
386 |
return net
|
387 |
|
388 |
|
389 |
-
@spaces.GPU(duration=
|
390 |
def run_inversion(net, dict, pcs, epochs, weight_decay,lr):
|
391 |
init_image = dict["background"].convert("RGB").resize((512, 512))
|
392 |
mask = dict["layers"][0].convert("RGB").resize((512, 512))
|
|
|
311 |
image = self.transform(image)
|
312 |
return image
|
313 |
|
314 |
+
@spaces.GPU(duration=180)
|
315 |
def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
316 |
device = "cuda"
|
317 |
mean.to(device)
|
|
|
386 |
return net
|
387 |
|
388 |
|
389 |
+
@spaces.GPU(duration=180)
|
390 |
def run_inversion(net, dict, pcs, epochs, weight_decay,lr):
|
391 |
init_image = dict["background"].convert("RGB").resize((512, 512))
|
392 |
mask = dict["layers"][0].convert("RGB").resize((512, 512))
|