OAOA commited on
Commit
42ca564
1 Parent(s): cbbaa86

Fix the bug of random seed.

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -52,7 +52,7 @@ def get_configs(num_steps=1, chopping_size=128, seed=12345):
52
  configs.model_start.ckpt_path = str(started_ckpt_path)
53
 
54
  configs.bs = 1
55
- configs.seed = 12345
56
  configs.basesr.chopping.pch_size = chopping_size
57
  if chopping_size == 128:
58
  configs.basesr.chopping.extra_bs = 8
@@ -65,7 +65,7 @@ def get_configs(num_steps=1, chopping_size=128, seed=12345):
65
 
66
  @spaces.GPU
67
  def predict(in_path, num_steps=1, chopping_size=128, seed=12345):
68
- configs = get_configs(num_steps=num_steps, chopping_size=chopping_size, seed=12345)
69
 
70
  sampler = InvSamplerSR(configs)
71
 
@@ -143,5 +143,5 @@ demo = gr.Interface(
143
  )
144
 
145
  demo.queue(max_size=5)
146
- demo.launch(share=True)
147
 
 
52
  configs.model_start.ckpt_path = str(started_ckpt_path)
53
 
54
  configs.bs = 1
55
+ configs.seed = seed
56
  configs.basesr.chopping.pch_size = chopping_size
57
  if chopping_size == 128:
58
  configs.basesr.chopping.extra_bs = 8
 
65
 
66
  @spaces.GPU
67
  def predict(in_path, num_steps=1, chopping_size=128, seed=12345):
68
+ configs = get_configs(num_steps=num_steps, chopping_size=chopping_size, seed=seed)
69
 
70
  sampler = InvSamplerSR(configs)
71
 
 
143
  )
144
 
145
  demo.queue(max_size=5)
146
+ demo.launch(share=False)
147