Marage commited on
Commit
dfd24e8
·
verified ·
1 Parent(s): 314e848

Update Demos/sub_demos/demo_nifty.py

Browse files
Files changed (1) hide show
  1. Demos/sub_demos/demo_nifty.py +2 -2
Demos/sub_demos/demo_nifty.py CHANGED
@@ -54,7 +54,7 @@ def get_file_path(img_input):
54
  return img_input
55
 
56
  # Functions
57
- @spaces.GPU
58
  def Nifty_gradio_interface_complete(im1,im2=None,rs=1.,T=100,k=10,patchsize=16,stride=4,width=256,height=256,octaves=4,renoise=.9,warmup=0,memory=True,seed=None,noise=None,spotsize=1/4,blend=False,blend_alpha=0.5,save=True,blend_map=None, manual_noise_seed:int=0):
59
  global force_stop_loop
60
  force_stop_loop = False
@@ -119,7 +119,7 @@ def clear_cuda_cache():
119
  def get_synthesized_image(synth):
120
  return (synth[0].permute(1, 2, 0).cpu().numpy() * .5 + .5).clip(0, 1).astype(np.float32)
121
 
122
-
123
  def get_nn_distance_map_and_novel_areas(synth, P_exmpl1,P_exmpl2, P_synth, patchsize, H, W):
124
  global force_stop_loop
125
 
 
54
  return img_input
55
 
56
  # Functions
57
+ @spaces.GPU(duration=30)
58
  def Nifty_gradio_interface_complete(im1,im2=None,rs=1.,T=100,k=10,patchsize=16,stride=4,width=256,height=256,octaves=4,renoise=.9,warmup=0,memory=True,seed=None,noise=None,spotsize=1/4,blend=False,blend_alpha=0.5,save=True,blend_map=None, manual_noise_seed:int=0):
59
  global force_stop_loop
60
  force_stop_loop = False
 
119
  def get_synthesized_image(synth):
120
  return (synth[0].permute(1, 2, 0).cpu().numpy() * .5 + .5).clip(0, 1).astype(np.float32)
121
 
122
+ @spaces.GPU
123
  def get_nn_distance_map_and_novel_areas(synth, P_exmpl1,P_exmpl2, P_synth, patchsize, H, W):
124
  global force_stop_loop
125