amildravid4292 commited on
Commit
c3e0a2f
·
verified ·
1 Parent(s): 01405de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -308,7 +308,7 @@ class CustomImageDataset(Dataset):
308
  image = self.transform(image)
309
  return image
310
 
311
- @spaces.GPU(duration=200)
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=200)
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))