Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -250,6 +250,8 @@ list_ratios=[["None",[None,None]],
|
|
| 250 |
["1:4 (512 x 2048)",[512,2048]]]
|
| 251 |
|
| 252 |
def fonc_add_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
|
|
|
|
|
|
| 253 |
lp.append([txt_input,neg_input,width,height,steps,cfg,seed])
|
| 254 |
return gr.Dataset(samples=lp) , gr.Dropdown(choices=[["a",lp]], value=lp)
|
| 255 |
def fonc_del_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
|
@@ -277,7 +279,7 @@ def make_me():
|
|
| 277 |
cfg = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0, interactive = True)
|
| 278 |
seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1, interactive = True)
|
| 279 |
param_actu=[txt_input,neg_input,width,height,steps,cfg,seed]
|
| 280 |
-
list_param=gr.Dropdown(choices=[["a",
|
| 281 |
|
| 282 |
add_param=gr.Button("add to the list")
|
| 283 |
del_param=gr.Button("delete to the list")
|
|
|
|
| 250 |
["1:4 (512 x 2048)",[512,2048]]]
|
| 251 |
|
| 252 |
def fonc_add_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
| 253 |
+
if lp == ["","",0,0,0,0,-1]:
|
| 254 |
+
lp.remove(["","",0,0,0,0,-1])
|
| 255 |
lp.append([txt_input,neg_input,width,height,steps,cfg,seed])
|
| 256 |
return gr.Dataset(samples=lp) , gr.Dropdown(choices=[["a",lp]], value=lp)
|
| 257 |
def fonc_del_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
|
|
|
| 279 |
cfg = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0, interactive = True)
|
| 280 |
seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1, interactive = True)
|
| 281 |
param_actu=[txt_input,neg_input,width,height,steps,cfg,seed]
|
| 282 |
+
list_param=gr.Dropdown(choices=[["a",param_actu]], value=param_actu, visible=False)
|
| 283 |
|
| 284 |
add_param=gr.Button("add to the list")
|
| 285 |
del_param=gr.Button("delete to the list")
|