Fabrice-TIERCELIN commited on
Commit
ccf7b17
·
verified ·
1 Parent(s): cd73211

Move examples

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -12,7 +12,8 @@ max_64_bit_int = 2**63 - 1
12
 
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
  floatType = torch.float16 if torch.cuda.is_available() else torch.float32
15
- pipe = StableDiffusionXLInpaintPipeline.from_pretrained("diffusers/stable-diffusion-xl-1.0-inpainting-0.1", torch_dtype = floatType)
 
16
  pipe = pipe.to(device)
17
 
18
  def noise_color(color, noise):
@@ -412,7 +413,7 @@ with gr.Blocks() as interface:
412
  ],
413
  examples = [
414
  [
415
- "Example1.webp",
416
  1024,
417
  1024,
418
  1024,
@@ -430,7 +431,7 @@ with gr.Blocks() as interface:
430
  False
431
  ],
432
  [
433
- "Example2.png",
434
  1024,
435
  1024,
436
  1024,
@@ -448,7 +449,7 @@ with gr.Blocks() as interface:
448
  False
449
  ],
450
  [
451
- "Example3.jpg",
452
  0,
453
  512,
454
  0,
 
12
 
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
  floatType = torch.float16 if torch.cuda.is_available() else torch.float32
15
+ variant = "fp16" if torch.cuda.is_available() else None
16
+ pipe = StableDiffusionXLInpaintPipeline.from_pretrained("diffusers/stable-diffusion-xl-1.0-inpainting-0.1", torch_dtype = floatType, variant = variant)
17
  pipe = pipe.to(device)
18
 
19
  def noise_color(color, noise):
 
413
  ],
414
  examples = [
415
  [
416
+ "./Examples/Example1.webp",
417
  1024,
418
  1024,
419
  1024,
 
431
  False
432
  ],
433
  [
434
+ "./Examples/Example2.png",
435
  1024,
436
  1024,
437
  1024,
 
449
  False
450
  ],
451
  [
452
+ "./Examples/Example3.jpg",
453
  0,
454
  512,
455
  0,