Zongsheng commited on
Commit
88377f2
1 Parent(s): 8e0f09c

debug image channel

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -24,6 +24,7 @@ from basicsr.utils.download_util import load_file_from_url
24
  cfg_path = 'configs/sample/iddpm_ffhq512_swinir.yaml'
25
  configs = OmegaConf.load(cfg_path)
26
  configs.aligned = False
 
27
 
28
  # build the sampler for diffusion
29
  sampler_dist = DifIRSampler(configs)
@@ -118,7 +119,7 @@ demo = gr.Interface(
118
  gr.Checkbox(value=True, label="Background_Enhance"),
119
  gr.Checkbox(value=True, label="Face_Upsample"),
120
  gr.Number(value=2, label="Rescaling_Factor (up to 4)"),
121
- gr.Slider(1, 200, value=100, step=10, label='Realism-Fidelity Trade-off')
122
  ],
123
  outputs=[
124
  gr.Image(type="numpy", label="Output"),
@@ -128,10 +129,10 @@ demo = gr.Interface(
128
  description=description,
129
  article=article,
130
  examples=[
131
- ['./testdata/whole_imgs/00.jpg', True, True, 2, 100],
132
- ['./testdata/whole_imgs/01.jpg', True, True, 2, 100],
133
- ['./testdata/whole_imgs/04.jpg', True, True, 2, 100],
134
- ['./testdata/whole_imgs/05.jpg', True, True, 2, 100],
135
  ]
136
  )
137
 
 
24
  cfg_path = 'configs/sample/iddpm_ffhq512_swinir.yaml'
25
  configs = OmegaConf.load(cfg_path)
26
  configs.aligned = False
27
+ configs.diffusion.timestep_respacing = '200'
28
 
29
  # build the sampler for diffusion
30
  sampler_dist = DifIRSampler(configs)
 
119
  gr.Checkbox(value=True, label="Background_Enhance"),
120
  gr.Checkbox(value=True, label="Face_Upsample"),
121
  gr.Number(value=2, label="Rescaling_Factor (up to 4)"),
122
+ gr.Slider(1, 160, value=80, step=10, label='Realism-Fidelity Trade-off')
123
  ],
124
  outputs=[
125
  gr.Image(type="numpy", label="Output"),
 
129
  description=description,
130
  article=article,
131
  examples=[
132
+ ['./testdata/whole_imgs/00.jpg', True, True, 2, 80],
133
+ ['./testdata/whole_imgs/01.jpg', True, True, 2, 80],
134
+ ['./testdata/whole_imgs/04.jpg', True, True, 2, 80],
135
+ ['./testdata/whole_imgs/05.jpg', True, True, 2, 80],
136
  ]
137
  )
138