Spaces:
Running
Running
salomonsky
commited on
Commit
•
450c3d6
1
Parent(s):
56eb604
Update app.py
Browse files
app.py
CHANGED
@@ -81,24 +81,22 @@ with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
|
81 |
output_res = ImageSlider(label="Flux / Upscaled")
|
82 |
with gr.Column(scale=2):
|
83 |
prompt = gr.Textbox(label="Descripción de imágen")
|
|
|
|
|
84 |
basemodel_choice = gr.Dropdown(label="Modelo", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV"], value="black-forest-labs/FLUX.1-schnell")
|
85 |
lora_model_choice = gr.Dropdown(label="LORA Realismo", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "XLabs-AI/flux-RealismLora"], value="XLabs-AI/flux-RealismLora")
|
86 |
process_lora = gr.Checkbox(label="Procesar LORA")
|
87 |
process_upscale = gr.Checkbox(label="Procesar Escalador")
|
88 |
upscale_factor = gr.Radio(label="Factor de Escala", choices=[2, 4, 8], value=2)
|
89 |
-
|
90 |
-
improved_prompt = gr.Textbox(label="Prompt Mejorado", interactive=False)
|
91 |
-
|
92 |
-
improve_btn = gr.Button("Mejora mi prompt")
|
93 |
improve_btn.click(fn=improve_prompt, inputs=[prompt], outputs=improved_prompt)
|
94 |
-
|
95 |
with gr.Accordion(label="Opciones Avanzadas", open=False):
|
96 |
width = gr.Slider(label="Ancho", minimum=512, maximum=1280, step=8, value=1280)
|
97 |
height = gr.Slider(label="Alto", minimum=512, maximum=1280, step=8, value=768)
|
98 |
scales = gr.Slider(label="Escalado", minimum=1, maximum=20, step=1, value=10)
|
99 |
-
steps = gr.Slider(label="Pasos", minimum=1, maximum
|
100 |
seed = gr.Number(label="Semilla", value=-1)
|
101 |
-
|
102 |
btn = gr.Button("Generar")
|
103 |
btn.click(fn=gen, inputs=[improved_prompt, basemodel_choice, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora], outputs=output_res)
|
104 |
-
demo.launch()
|
|
|
81 |
output_res = ImageSlider(label="Flux / Upscaled")
|
82 |
with gr.Column(scale=2):
|
83 |
prompt = gr.Textbox(label="Descripción de imágen")
|
84 |
+
improved_prompt = gr.Textbox(label="Prompt Mejorado", interactive=False)
|
85 |
+
improve_btn = gr.Button("Mejora mi prompt")
|
86 |
basemodel_choice = gr.Dropdown(label="Modelo", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV"], value="black-forest-labs/FLUX.1-schnell")
|
87 |
lora_model_choice = gr.Dropdown(label="LORA Realismo", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "XLabs-AI/flux-RealismLora"], value="XLabs-AI/flux-RealismLora")
|
88 |
process_lora = gr.Checkbox(label="Procesar LORA")
|
89 |
process_upscale = gr.Checkbox(label="Procesar Escalador")
|
90 |
upscale_factor = gr.Radio(label="Factor de Escala", choices=[2, 4, 8], value=2)
|
|
|
|
|
|
|
|
|
91 |
improve_btn.click(fn=improve_prompt, inputs=[prompt], outputs=improved_prompt)
|
92 |
+
|
93 |
with gr.Accordion(label="Opciones Avanzadas", open=False):
|
94 |
width = gr.Slider(label="Ancho", minimum=512, maximum=1280, step=8, value=1280)
|
95 |
height = gr.Slider(label="Alto", minimum=512, maximum=1280, step=8, value=768)
|
96 |
scales = gr.Slider(label="Escalado", minimum=1, maximum=20, step=1, value=10)
|
97 |
+
steps = gr.Slider(label="Pasos", minimum=1, maximum=100, step=1, value=20)
|
98 |
seed = gr.Number(label="Semilla", value=-1)
|
99 |
+
|
100 |
btn = gr.Button("Generar")
|
101 |
btn.click(fn=gen, inputs=[improved_prompt, basemodel_choice, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora], outputs=output_res)
|
102 |
+
demo.launch()
|