Vanisper commited on
Commit
6ddf196
·
1 Parent(s): 7903947

fix: 调整 model_sections 内容

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -126,7 +126,7 @@ class Demo:
126
  model_checkbox = gr.Checkbox(label=model_name, value=False)
127
  seed_infr = gr.Number(label="种子值", value=42753)
128
  slider_scale_infr = gr.Slider(-4, 4, label="滑块刻度", value=3, info="较大的滑块刻度会导致更强的编辑效果")
129
- self.model_sections.append((model_checkbox, seed_infr, slider_scale_infr))
130
 
131
  with gr.Row():
132
  self.start_noise_infr = gr.Slider(
@@ -297,10 +297,10 @@ class Demo:
297
  def inference(self, prompt, start_noise, model, pbar=gr.Progress(track_tqdm=True)):
298
  model_sections = self.model_sections
299
  print(111, model_sections)
300
- model_names = [section[0].value for section in model_sections if section[0].value]
301
- seed_list = [section[1].value for section in model_sections if section[0].value]
302
- scale_list = [section[2].value for section in model_sections if section[0].value]
303
- print(model_names, seed_list, scale_list)
304
 
305
  if self.current_model != model:
306
  if model=='SDXL Turbo':
 
126
  model_checkbox = gr.Checkbox(label=model_name, value=False)
127
  seed_infr = gr.Number(label="种子值", value=42753)
128
  slider_scale_infr = gr.Slider(-4, 4, label="滑块刻度", value=3, info="较大的滑块刻度会导致更强的编辑效果")
129
+ self.model_sections.append((model_checkbox.value, seed_infr, slider_scale_infr.value))
130
 
131
  with gr.Row():
132
  self.start_noise_infr = gr.Slider(
 
297
  def inference(self, prompt, start_noise, model, pbar=gr.Progress(track_tqdm=True)):
298
  model_sections = self.model_sections
299
  print(111, model_sections)
300
+ model_names = [section[0] for section in model_sections if section[0]]
301
+ seed_list = [section[1] for section in model_sections if section[0]]
302
+ scale_list = [section[2] for section in model_sections if section[0]]
303
+ print(222, model_names, seed_list, scale_list)
304
 
305
  if self.current_model != model:
306
  if model=='SDXL Turbo':