salomonsky commited on
Commit
5e03798
1 Parent(s): 56f793a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -25
app.py CHANGED
@@ -63,29 +63,31 @@ with gr.Blocks(css=CSS, js=JS, theme="Nymbo/Nymbo_Theme") as demo:
63
  with gr.Column(scale=1.5):
64
  output_res = ImageSlider(label="Flux / Upscaled")
65
  with gr.Column(scale=0.8):
66
- with gr.Group():
67
- prompt = gr.Textbox(label="Prompt")
68
- basemodel_choice = gr.Dropdown(label="Base Model", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV"], value="black-forest-labs/FLUX.1-schnell")
69
- lora_model_choice = gr.Dropdown(label="LORA Model", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "XLabs-AI/flux-RealismLora"])
70
- process_lora = gr.Checkbox(label="Process LORA", value=False)
71
- upscale_factor = gr.Radio(label="UpScale Factor", choices=[2, 4, 8], value=2, scale=2)
72
- process_upscale = gr.Checkbox(label="Process Upscale", value=False)
 
 
 
 
 
 
 
 
73
 
74
- with gr.Accordion(label="Advanced Options", open=False):
75
- width = gr.Slider(label="Width", minimum=512, maximum=1280, step=8, value=512)
76
- height = gr.Slider(label="Height", minimum=512, maximum=1280, step=8, value=512)
77
- scales = gr.Slider(label="Guidance", minimum=3.5, maximum=7, step=0.1, value=3.5)
78
- steps = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=24)
79
- seed = gr.Slider(label="Seeds", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
80
- submit_btn = gr.Button("Submit", scale=1)
81
- submit_btn.click(
82
- fn=lambda: None,
83
- inputs=None,
84
- outputs=[output_res],
85
- queue=False
86
- ).then(
87
- fn=gen,
88
- inputs=[prompt, basemodel_choice, lora_add, lora_word, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora],
89
- outputs=[output_res]
90
- )
91
- demo.launch()
 
63
  with gr.Column(scale=1.5):
64
  output_res = ImageSlider(label="Flux / Upscaled")
65
  with gr.Column(scale=0.8):
66
+ prompt = gr.Textbox(label="Prompt")
67
+ basemodel_choice = gr.Dropdown(label="Base Model", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV"], value="black-forest-labs/FLUX.1-schnell")
68
+ lora_model_choice = gr.Dropdown(label="LORA Model", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "Otro modelo LORA"])
69
+ process_lora = gr.Checkbox(label="Process LORA", value=True)
70
+ upscale_factor = gr.Radio(label="UpScale Factor", choices=[2, 4, 8], value=2, scale=2)
71
+ process_upscale = gr.Checkbox(label="Process Upscale", value=False)
72
+
73
+ with gr.Accordion(label="Advanced Options", open=False):
74
+ width = gr.Slider(label="Width", minimum=512, maximum=1280, step=8, value=512)
75
+ height = gr.Slider(label="Height", minimum=512, maximum=1280, step=8, value=512)
76
+ scales = gr.Slider(label="Guidance", minimum=3.5, maximum=7, step=0.1, value=3.5)
77
+ steps = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=24)
78
+ seed = gr.Slider(label="Seeds", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
79
+ lora_add = gr.Textbox(label="Add Flux LoRA", info="Modelo Lora", lines=1, value="XLabs-AI/flux-RealismLora")
80
+ lora_word = gr.Textbox(label="Add Flux LoRA Trigger Word", info="Add the Trigger Word", lines=1, value="")
81
 
82
+ submit_btn = gr.Button("Submit", scale=1)
83
+ submit_btn.click(
84
+ fn=lambda: None,
85
+ inputs=None,
86
+ outputs=[output_res],
87
+ queue=False
88
+ ).then(
89
+ fn=gen,
90
+ inputs=[prompt, basemodel_choice, lora_add, lora_word, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora],
91
+ outputs=[output_res]
92
+ )
93
+ demo.launch()