Spaces:
Sleeping
Sleeping
fix: 调整 model_sections 内容
Browse files
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]
|
301 |
-
seed_list = [section[1]
|
302 |
-
scale_list = [section[2]
|
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':
|