patrickvonplaten commited on
Commit
fa6b193
1 Parent(s): 82d14ed
Files changed (1) hide show
  1. app.py +11 -19
app.py CHANGED
@@ -40,6 +40,8 @@ class Model:
40
 
41
  models = [
42
  Model("Stable Diffusion v1-4", "CompVis/stable-diffusion-v1-4"),
 
 
43
  ]
44
 
45
  MODELS = {m.name: m for m in models}
@@ -140,10 +142,10 @@ with gr.Blocks(css="style.css") as demo:
140
  f"""
141
  <div class="finetuned-diffusion-div">
142
  <div>
143
- <h1>Protogen Diffusion</h1>
144
  </div>
145
  <p>
146
- Demo for multiple fine-tuned Protogen Stable Diffusion models.
147
  </p>
148
  <p>
149
  Running on <b>{device}</b>
@@ -162,15 +164,6 @@ with gr.Blocks(css="style.css") as demo:
162
  choices=[m.name for m in models],
163
  value=models[0].name,
164
  )
165
- with gr.Box(visible=False) as custom_model_group:
166
- custom_model_path = gr.Textbox(
167
- label="Custom model path",
168
- placeholder="Path to model, e.g. darkstorm2150/Protogen_x3.4_Official_Release",
169
- interactive=True,
170
- )
171
- gr.HTML(
172
- "<div><font size='2'>Custom models have to be downloaded first, so give it some time.</font></div>"
173
- )
174
 
175
  with gr.Row():
176
  prompt = gr.Textbox(
@@ -183,14 +176,13 @@ with gr.Blocks(css="style.css") as demo:
183
  rounded=(False, True, True, False)
184
  )
185
 
186
- # image_out = gr.Image(height=512)
187
  low_res_image = gr.Gallery(
188
  label="512-pix image", show_label=False, elem_id="gallery"
189
- ).style(grid=[2], height="auto")
190
 
191
  up_res_image = gr.Gallery(
192
  label="1024-pix image", show_label=False, elem_id="gallery"
193
- ).style(grid=[2], height="auto")
194
 
195
  state_info = gr.Textbox(label="State", show_label=False, max_lines=2).style(
196
  container=False
@@ -235,9 +227,9 @@ with gr.Blocks(css="style.css") as demo:
235
 
236
  # ex = gr.Examples(
237
  # [
238
- # [models[0].name, "portrait of a beautiful alyx vance half life", 10, 50, "canvas frame, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), weird colors, blurry, (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy"],
239
  # ],
240
- # inputs=[model_name, prompt, guidance, steps, neg_prompt],
241
  # outputs=outputs,
242
  # fn=inference,
243
  # cache_examples=False,
@@ -247,10 +239,10 @@ with gr.Blocks(css="style.css") as demo:
247
  """
248
  <div style="border-top: 1px solid #303030;">
249
  <br>
250
- <p>Models by <a href="https://huggingface.co/darkstorm2150">@darkstorm2150</a> and others. ❤️</p>
251
  <p>This space uses the <a href="https://github.com/LuChengTHU/dpm-solver">DPM-Solver++</a> sampler by <a href="https://arxiv.org/abs/2206.00927">Cheng Lu, et al.</a>.</p>
252
- <p>Space by: Darkstorm (Victor Espinoza)<br>
253
- <a href="https://www.instagram.com/officialvictorespinoza/">Instagram</a>
254
  </div>
255
  """
256
  )
 
40
 
41
  models = [
42
  Model("Stable Diffusion v1-4", "CompVis/stable-diffusion-v1-4"),
43
+ # Model("Stable Diffusion v1-5", "runwayml/stable-diffusion-v1-5"),
44
+ Model("anything-v4.0", "andite/anything-v4.0"),
45
  ]
46
 
47
  MODELS = {m.name: m for m in models}
 
142
  f"""
143
  <div class="finetuned-diffusion-div">
144
  <div>
145
+ <h1>Stable Diffusion Latent Upscaler</h1>
146
  </div>
147
  <p>
148
+ Demo for Latent Diffusion Upscaling
149
  </p>
150
  <p>
151
  Running on <b>{device}</b>
 
164
  choices=[m.name for m in models],
165
  value=models[0].name,
166
  )
 
 
 
 
 
 
 
 
 
167
 
168
  with gr.Row():
169
  prompt = gr.Textbox(
 
176
  rounded=(False, True, True, False)
177
  )
178
 
 
179
  low_res_image = gr.Gallery(
180
  label="512-pix image", show_label=False, elem_id="gallery"
181
+ ).style(grid=[2], height=512)
182
 
183
  up_res_image = gr.Gallery(
184
  label="1024-pix image", show_label=False, elem_id="gallery"
185
+ ).style(grid=[2], height=1024)
186
 
187
  state_info = gr.Textbox(label="State", show_label=False, max_lines=2).style(
188
  container=False
 
227
 
228
  # ex = gr.Examples(
229
  # [
230
+ # [models[0].name, "a photo of an astronaut high resolution, unreal engine, ultra realistic", 7.5, 50, 33, ""]
231
  # ],
232
+ # inputs=[model_name, prompt, guidance, steps, seed, neg_prompt],
233
  # outputs=outputs,
234
  # fn=inference,
235
  # cache_examples=False,
 
239
  """
240
  <div style="border-top: 1px solid #303030;">
241
  <br>
242
+ <p>Models by 🤗 Hugging Face and others. ❤️</p>
243
  <p>This space uses the <a href="https://github.com/LuChengTHU/dpm-solver">DPM-Solver++</a> sampler by <a href="https://arxiv.org/abs/2206.00927">Cheng Lu, et al.</a>.</p>
244
+ <p>This is a Demo Space For:<br>
245
+ <a href="https://huggingface.co/stabilityai/sd-x2-latent-upscaler">Stability AI's Latent Upscaler</a>
246
  </div>
247
  """
248
  )