colbyford commited on
Commit
05ee044
1 Parent(s): 6fbe4fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -57,7 +57,7 @@ async def gen(prompt, basemodel, width, height, scales, steps, seed, upscale_fac
57
  upscale_image.save("upscale_image.jpg", format="JPEG")
58
  return [image_path, "upscale_image.jpg"]
59
  else:
60
- print("Error: La ruta de la imagen escalada es None")
61
  return [image_path, image_path]
62
  else:
63
  return [image_path, image_path]
@@ -72,20 +72,20 @@ with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
72
  with gr.Column(scale=3):
73
  output_res = ImageSlider(label="Flux / Upscaled")
74
  with gr.Column(scale=2):
75
- prompt = gr.Textbox(label="Descripción de imágen")
76
- basemodel_choice = gr.Dropdown(label="Modelo", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV", "enhanceaiteam/Flux-uncensored", "Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro", "Shakker-Labs/FLUX.1-dev-LoRA-add-details", "city96/FLUX.1-dev-gguf"], value="black-forest-labs/FLUX.1-schnell")
77
- lora_model_choice = gr.Dropdown(label="LORA", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "XLabs-AI/flux-RealismLora", "enhanceaiteam/Flux-uncensored"], value="XLabs-AI/flux-RealismLora")
78
- process_lora = gr.Checkbox(label="Procesar LORA")
79
- process_upscale = gr.Checkbox(label="Procesar Escalador")
80
- upscale_factor = gr.Radio(label="Factor de Escala", choices=[2, 4, 8], value=2)
81
 
82
- with gr.Accordion(label="Opciones Avanzadas", open=False):
83
- width = gr.Slider(label="Ancho", minimum=512, maximum=1280, step=8, value=1280)
84
- height = gr.Slider(label="Alto", minimum=512, maximum=1280, step=8, value=768)
85
- scales = gr.Slider(label="Escalado", minimum=1, maximum=20, step=1, value=8)
86
- steps = gr.Slider(label="Pasos", minimum=1, maximum=100, step=1, value=8)
87
- seed = gr.Number(label="Semilla", value=-1)
88
 
89
- btn = gr.Button("Generar")
90
  btn.click(fn=gen, inputs=[prompt, basemodel_choice, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora], outputs=output_res,)
91
  demo.launch()
 
57
  upscale_image.save("upscale_image.jpg", format="JPEG")
58
  return [image_path, "upscale_image.jpg"]
59
  else:
60
+ print("Error: The scaled image path is None")
61
  return [image_path, image_path]
62
  else:
63
  return [image_path, image_path]
 
72
  with gr.Column(scale=3):
73
  output_res = ImageSlider(label="Flux / Upscaled")
74
  with gr.Column(scale=2):
75
+ prompt = gr.Textbox(label="Image Description")
76
+ basemodel_choice = gr.Dropdown(label="Model", choices=["black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-DEV", "enhanceaiteam/Flux-uncensored", "Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro", "Shakker-Labs/FLUX.1-dev-LoRA-add-details", "city96/FLUX.1-dev-gguf"], value="black-forest-labs/FLUX.1-schnell")
77
+ lora_model_choice = gr.Dropdown(label="LoRA", choices=["Shakker-Labs/FLUX.1-dev-LoRA-add-details", "XLabs-AI/flux-RealismLora", "enhanceaiteam/Flux-uncensored"], value="XLabs-AI/flux-RealismLora")
78
+ process_lora = gr.Checkbox(label="LoRA Process")
79
+ process_upscale = gr.Checkbox(label="Scale Process")
80
+ upscale_factor = gr.Radio(label="Scaling Factor", choices=[2, 4, 8], value=2)
81
 
82
+ with gr.Accordion(label="Advanced Options", open=False):
83
+ width = gr.Slider(label="Width", minimum=512, maximum=1280, step=8, value=1280)
84
+ height = gr.Slider(label="Height", minimum=512, maximum=1280, step=8, value=768)
85
+ scales = gr.Slider(label="Scale", minimum=1, maximum=20, step=1, value=8)
86
+ steps = gr.Slider(label="Steps", minimum=1, maximum=100, step=1, value=8)
87
+ seed = gr.Number(label="Seed", value=-1)
88
 
89
+ btn = gr.Button("Generate")
90
  btn.click(fn=gen, inputs=[prompt, basemodel_choice, width, height, scales, steps, seed, upscale_factor, process_upscale, lora_model_choice, process_lora], outputs=output_res,)
91
  demo.launch()