Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -308,7 +308,7 @@ class CustomImageDataset(Dataset):
|
|
308 |
image = self.transform(image)
|
309 |
return image
|
310 |
|
311 |
-
@spaces.GPU(duration=
|
312 |
def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
313 |
device = "cuda"
|
314 |
mean.to(device)
|
@@ -383,7 +383,7 @@ def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
|
383 |
return net
|
384 |
|
385 |
|
386 |
-
@spaces.GPU(duration=
|
387 |
def run_inversion(net, dict, pcs, epochs, weight_decay,lr):
|
388 |
init_image = dict["background"].convert("RGB").resize((512, 512))
|
389 |
mask = dict["layers"][0].convert("RGB").resize((512, 512))
|
|
|
308 |
image = self.transform(image)
|
309 |
return image
|
310 |
|
311 |
+
@spaces.GPU(duration=400)
|
312 |
def invert(image, mask, pcs=10000, epochs=400, weight_decay = 1e-10, lr=1e-1):
|
313 |
device = "cuda"
|
314 |
mean.to(device)
|
|
|
383 |
return net
|
384 |
|
385 |
|
386 |
+
@spaces.GPU(duration=400)
|
387 |
def run_inversion(net, dict, pcs, epochs, weight_decay,lr):
|
388 |
init_image = dict["background"].convert("RGB").resize((512, 512))
|
389 |
mask = dict["layers"][0].convert("RGB").resize((512, 512))
|