CultriX commited on
Commit
57644a4
1 Parent(s): 9609416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -8
app.py CHANGED
@@ -306,10 +306,23 @@ with gr.Blocks(theme=gr.themes.Soft(font=font), css=css, delete_cache=(60, 60))
306
  download_link = gr.File(label="Download Image")
307
  base64_output = gr.Textbox(label="Base64 Encoded Image")
308
 
309
- with gr.Row():
310
- randomize_seed = gr.Checkbox(True, label="Randomize seed")
311
- seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
312
- lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=3, step=0.01, value=0.95)
 
 
 
 
 
 
 
 
 
 
 
 
 
313
 
314
  gallery.select(
315
  update_selection,
@@ -325,12 +338,11 @@ with gr.Blocks(theme=gr.themes.Soft(font=font), css=css, delete_cache=(60, 60))
325
  remove_custom_lora,
326
  outputs=[custom_lora_info, custom_lora_button, gallery, selected_info, selected_index, custom_lora]
327
  )
328
- gr.on(
329
- triggers=[generate_button.click, prompt.submit],
330
- fn=run_lora,
331
  inputs=[prompt, input_image, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale],
332
  outputs=[result, seed, progress_bar]
333
  )
334
-
335
  app.queue()
336
  app.launch()
 
 
306
  download_link = gr.File(label="Download Image")
307
  base64_output = gr.Textbox(label="Base64 Encoded Image")
308
 
309
+ with gr.Row():
310
+ with gr.Accordion("Advanced Settings", open=False):
311
+ with gr.Row():
312
+ input_image = gr.Image(label="Input image", type="filepath")
313
+ image_strength = gr.Slider(label="Denoise Strength", info="Lower means more image influence", minimum=0.1, maximum=1.0, step=0.01, value=0.75)
314
+ with gr.Column():
315
+ with gr.Row():
316
+ cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, step=0.5, value=3.5)
317
+ steps = gr.Slider(label="Steps", minimum=1, maximum=50, step=1, value=28)
318
+
319
+ with gr.Row():
320
+ width = gr.Slider(label="Width", minimum=256, maximum=1536, step=64, value=1024)
321
+ height = gr.Slider(label="Height", minimum=256, maximum=1536, step=64, value=1024)
322
+
323
+ with gr.Row():
324
+ randomize_seed = gr.Checkbox(True, label="Randomize seed")
325
+ seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0)
326
 
327
  gallery.select(
328
  update_selection,
 
338
  remove_custom_lora,
339
  outputs=[custom_lora_info, custom_lora_button, gallery, selected_info, selected_index, custom_lora]
340
  )
341
+ generate_button.click(
342
+ run_lora,
 
343
  inputs=[prompt, input_image, image_strength, cfg_scale, steps, selected_index, randomize_seed, seed, width, height, lora_scale],
344
  outputs=[result, seed, progress_bar]
345
  )
 
346
  app.queue()
347
  app.launch()
348
+