John6666 commited on
Commit
0acaa1c
1 Parent(s): d398175

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -15
app.py CHANGED
@@ -38,7 +38,7 @@ MAX_IMAGE_SIZE = 1216
38
 
39
  css = """
40
  #container { margin: 0 auto; !important; }
41
- #col-container { margin: 0 auto; !important; }
42
  #result { display: block; max-width: 520px; max-height: 520px; width: 520px; height: 520px; align: center; !important; }
43
  #model-info { text-align: center; !important; }
44
  """
@@ -65,12 +65,8 @@ with gr.Blocks(css=css, fill_width=True, elem_id="container") as demo:
65
  with gr.Row():
66
  seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0)
67
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
68
-
69
- with gr.Row():
70
  width = gr.Slider(label="Width", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024) # 832
71
  height = gr.Slider(label="Height", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024) # 1216
72
-
73
- with gr.Row():
74
  guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=30.0, step=0.1, value=7)
75
  num_inference_steps = gr.Slider(label="Number of inference steps", minimum=1, maximum=100, step=1, value=28)
76
 
@@ -120,16 +116,16 @@ with gr.Blocks(css=css, fill_width=True, elem_id="container") as demo:
120
  lora5_info = gr.Textbox(label="", info="Example of prompt:", value="", show_copy_button=True, interactive=False, visible=False)
121
  lora5_copy = gr.Button(value="Copy example to prompt", visible=False)
122
  lora5_md = gr.Markdown(value="", visible=False)
123
- with gr.Accordion("From URL", open=True, visible=True):
124
- with gr.Row():
125
- lora_search_civitai_query = gr.Textbox(label="Query", placeholder="oomuro sakurako...", lines=1)
126
- lora_search_civitai_basemodel = gr.CheckboxGroup(label="Search LoRA for", choices=["Pony", "SD 1.5", "SDXL 1.0"], value=["Pony", "SDXL 1.0"])
127
- lora_search_civitai_submit = gr.Button("Search on Civitai")
128
- lora_search_civitai_result = gr.Dropdown(label="Search Results", choices=[("", "")], value="", allow_custom_value=True, visible=False)
129
- lora_search_civitai_json = gr.JSON(value={}, visible=False)
130
- lora_search_civitai_desc = gr.Markdown(value="", visible=False)
131
- lora_download_url = gr.Textbox(label="URL", placeholder="http://...my_lora_url.safetensors", lines=1)
132
- lora_download = gr.Button("Get and set LoRA and apply to prompt")
133
 
134
  with gr.Row():
135
  recom_prompt = gr.Checkbox(label="Recommended prompt", value=True)
 
38
 
39
  css = """
40
  #container { margin: 0 auto; !important; }
41
+ #col-container { margin: 0 auto; align: center; !important; }
42
  #result { display: block; max-width: 520px; max-height: 520px; width: 520px; height: 520px; align: center; !important; }
43
  #model-info { text-align: center; !important; }
44
  """
 
65
  with gr.Row():
66
  seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0)
67
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
 
 
68
  width = gr.Slider(label="Width", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024) # 832
69
  height = gr.Slider(label="Height", minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024) # 1216
 
 
70
  guidance_scale = gr.Slider(label="Guidance scale", minimum=0.0, maximum=30.0, step=0.1, value=7)
71
  num_inference_steps = gr.Slider(label="Number of inference steps", minimum=1, maximum=100, step=1, value=28)
72
 
 
116
  lora5_info = gr.Textbox(label="", info="Example of prompt:", value="", show_copy_button=True, interactive=False, visible=False)
117
  lora5_copy = gr.Button(value="Copy example to prompt", visible=False)
118
  lora5_md = gr.Markdown(value="", visible=False)
119
+ with gr.Accordion("From URL", open=True, visible=True):
120
+ with gr.Row():
121
+ lora_search_civitai_query = gr.Textbox(label="Query", placeholder="oomuro sakurako...", lines=1)
122
+ lora_search_civitai_basemodel = gr.CheckboxGroup(label="Search LoRA for", choices=["Pony", "SD 1.5", "SDXL 1.0"], value=["Pony", "SDXL 1.0"])
123
+ lora_search_civitai_submit = gr.Button("Search on Civitai")
124
+ lora_search_civitai_result = gr.Dropdown(label="Search Results", choices=[("", "")], value="", allow_custom_value=True, visible=False)
125
+ lora_search_civitai_json = gr.JSON(value={}, visible=False)
126
+ lora_search_civitai_desc = gr.Markdown(value="", visible=False)
127
+ lora_download_url = gr.Textbox(label="URL", placeholder="http://...my_lora_url.safetensors", lines=1)
128
+ lora_download = gr.Button("Get and set LoRA and apply to prompt")
129
 
130
  with gr.Row():
131
  recom_prompt = gr.Checkbox(label="Recommended prompt", value=True)