elismasilva commited on
Commit
2099bb6
·
1 Parent(s): 1a23072

testing Lightning

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -19,7 +19,8 @@ controlnet = ControlNetUnionModel.from_pretrained(
19
  ).to(device=device)
20
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16).to(device=device)
21
 
22
- model_id = "SG161222/RealVisXL_V5.0"
 
23
  pipe = StableDiffusionXLControlNetTileSRPipeline.from_pretrained(
24
  model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
25
  ).to(device)
@@ -254,6 +255,20 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(), title="MoD ControlNet Tile Upsc
254
  with gr.Column(scale=12, elem_id="examples_container"):
255
  gr.Examples(
256
  examples=[
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  [ "./examples/1.jpg",
258
  prompt.value,
259
  negative_prompt.value,
@@ -267,7 +282,7 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(), title="MoD ControlNet Tile Upsc
267
  4,
268
  1024,
269
  "Cosine"
270
- ],
271
  [ "./examples/2.jpg",
272
  prompt.value,
273
  negative_prompt.value,
@@ -342,7 +357,7 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(), title="MoD ControlNet Tile Upsc
342
  ],
343
  fn=predict,
344
  outputs=result,
345
- cache_examples=True,
346
  )
347
 
348
  max_tile_size.select(fn=set_maximum_resolution, inputs=[max_tile_size, resolution], outputs=resolution)
 
19
  ).to(device=device)
20
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16).to(device=device)
21
 
22
+ #model_id = "SG161222/RealVisXL_V5.0"
23
+ model_id = "SG161222/RealVisXL_V5.0_Lightning"
24
  pipe = StableDiffusionXLControlNetTileSRPipeline.from_pretrained(
25
  model_id, controlnet=controlnet, vae=vae, torch_dtype=torch.float16, use_safetensors=True, variant="fp16"
26
  ).to(device)
 
255
  with gr.Column(scale=12, elem_id="examples_container"):
256
  gr.Examples(
257
  examples=[
258
+ [ "./examples/1.jpg",
259
+ prompt.value,
260
+ negative_prompt.value,
261
+ 4096,
262
+ 0.0,
263
+ 18,
264
+ 0.35,
265
+ 1.0,
266
+ 0.3,
267
+ "LCM",
268
+ 4,
269
+ 1024,
270
+ "Cosine"
271
+ ],
272
  [ "./examples/1.jpg",
273
  prompt.value,
274
  negative_prompt.value,
 
282
  4,
283
  1024,
284
  "Cosine"
285
+ ],
286
  [ "./examples/2.jpg",
287
  prompt.value,
288
  negative_prompt.value,
 
357
  ],
358
  fn=predict,
359
  outputs=result,
360
+ cache_examples=False,
361
  )
362
 
363
  max_tile_size.select(fn=set_maximum_resolution, inputs=[max_tile_size, resolution], outputs=resolution)