DamarJati commited on
Commit
98877fd
·
verified ·
1 Parent(s): 9b314cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -24,27 +24,28 @@ def controlnet_process(image, controlnet_type, model):
24
  with gr.Blocks(css= "style.css") as app:
25
  # Dropdown untuk memilih model di luar tab dengan lebar kecil
26
  with gr.Row():
27
- model_dropdown = gr.Dropdown(choices=models, label="Model", elem_id="model-dropdown", value="Model B", scale=0.3)
28
- vae_dropdown = gr.Dropdown(choices=vae, label="VAE", elem_id="vae-dropdown", value="VAE C", scale=0.3)
29
 
 
 
 
 
 
 
 
 
30
 
31
  # Tab untuk Text-to-Image
32
- with gr.Tab("Text-to-Image"):
33
- # Prompt dan Neg Prompt
34
- with gr.Row():
35
- with gr.Column(scale=1): # Scale 1 ensures full width
36
- prompt_input = gr.Textbox(label="Prompt", placeholder="Masukkan prompt teks", lines=2, elem_id="prompt-input")
37
- neg_prompt_input = gr.Textbox(label="Neg Prompt", placeholder="Masukkan negasi prompt", lines=2, elem_id="neg-prompt-input")
38
-
39
- generate_button = gr.Button("Generate", elem_id="generate-button", scale=0.13)
40
 
41
  with gr.Row():
42
  with gr.Column():
43
  # Konfigurasi
44
  scheduler_input = gr.Dropdown(choices=["Euler", "LMS", "DDIM"], label="Sampling method")
45
  num_steps_input = gr.Slider(minimum=1, maximum=100, step=1, label="Sampling steps", value=20)
46
- width_input = gr.Slider(minimum=64, maximum=2048, step=64, label="Width", value=512)
47
- height_input = gr.Slider(minimum=64, maximum=2048, step=64, label="Height", value=512)
48
  cfg_scale_input = gr.Slider(minimum=1, maximum=20, step=1, label="CFG Scale", value=7)
49
  seed_input = gr.Number(label="Seed", value=-1)
50
  num_images_input = gr.Slider(minimum=1, maximum=10, step=1, label="Batch size", value=1)
 
24
  with gr.Blocks(css= "style.css") as app:
25
  # Dropdown untuk memilih model di luar tab dengan lebar kecil
26
  with gr.Row():
27
+ model_dropdown = gr.Dropdown(choices=models, label="Model", value="Model B", scale=0.3)
28
+ vae_dropdown = gr.Dropdown(choices=vae, label="VAE", value="VAE C", scale=0.3)
29
 
30
+ # Prompt dan Neg Prompt
31
+ with gr.Row():
32
+ with gr.Column(scale=1): # Scale 1 ensures full width
33
+ prompt_input = gr.Textbox(label="Prompt", placeholder="Masukkan prompt teks", lines=2, elem_id="prompt-input")
34
+ neg_prompt_input = gr.Textbox(label="Neg Prompt", placeholder="Masukkan negasi prompt", lines=2, elem_id="neg-prompt-input")
35
+
36
+ generate_button = gr.Button("Generate", elem_id="generate-button", scale=0.13)
37
+
38
 
39
  # Tab untuk Text-to-Image
40
+ with gr.Tab("Text-to-Image")
 
 
 
 
 
 
 
41
 
42
  with gr.Row():
43
  with gr.Column():
44
  # Konfigurasi
45
  scheduler_input = gr.Dropdown(choices=["Euler", "LMS", "DDIM"], label="Sampling method")
46
  num_steps_input = gr.Slider(minimum=1, maximum=100, step=1, label="Sampling steps", value=20)
47
+ width_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Width", value=512)
48
+ height_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Height", value=512)
49
  cfg_scale_input = gr.Slider(minimum=1, maximum=20, step=1, label="CFG Scale", value=7)
50
  seed_input = gr.Number(label="Seed", value=-1)
51
  num_images_input = gr.Slider(minimum=1, maximum=10, step=1, label="Batch size", value=1)