Fabrice-TIERCELIN commited on
Commit
1cf8af1
1 Parent(s): c17ed86

Function for cache

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -1,6 +1,3 @@
1
- from diffusers import StableDiffusionXLInpaintPipeline
2
- from PIL import Image, ImageFilter
3
-
4
  import gradio as gr
5
  import numpy as np
6
  import time
@@ -9,6 +6,9 @@ import random
9
  import imageio
10
  import torch
11
 
 
 
 
12
  max_64_bit_int = 2**63 - 1
13
 
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -266,6 +266,7 @@ with gr.Blocks() as interface:
266
  ], scroll_to_output = True)
267
 
268
  gr.Examples(
 
269
  inputs = [
270
  source_img,
271
  prompt,
@@ -276,7 +277,6 @@ with gr.Blocks() as interface:
276
  image_guidance_scale,
277
  strength,
278
  denoising_steps,
279
- randomize_seed,
280
  seed,
281
  debug_mode
282
  ],
@@ -297,7 +297,6 @@ with gr.Blocks() as interface:
297
  1.1,
298
  0.99,
299
  1000,
300
- True,
301
  42,
302
  False
303
  ],
@@ -311,7 +310,6 @@ with gr.Blocks() as interface:
311
  1.5,
312
  0.99,
313
  1000,
314
- True,
315
  42,
316
  False
317
  ],
@@ -325,7 +323,6 @@ with gr.Blocks() as interface:
325
  1.1,
326
  0.99,
327
  1000,
328
- True,
329
  42,
330
  False
331
  ],
@@ -339,7 +336,6 @@ with gr.Blocks() as interface:
339
  1.5,
340
  0.5,
341
  1000,
342
- True,
343
  42,
344
  False
345
  ],
@@ -353,7 +349,6 @@ with gr.Blocks() as interface:
353
  1.1,
354
  0.99,
355
  1000,
356
- True,
357
  42,
358
  False
359
  ],
 
 
 
 
1
  import gradio as gr
2
  import numpy as np
3
  import time
 
6
  import imageio
7
  import torch
8
 
9
+ from diffusers import StableDiffusionXLInpaintPipeline
10
+ from PIL import Image, ImageFilter
11
+
12
  max_64_bit_int = 2**63 - 1
13
 
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
266
  ], scroll_to_output = True)
267
 
268
  gr.Examples(
269
+ fn = inpaint,
270
  inputs = [
271
  source_img,
272
  prompt,
 
277
  image_guidance_scale,
278
  strength,
279
  denoising_steps,
 
280
  seed,
281
  debug_mode
282
  ],
 
297
  1.1,
298
  0.99,
299
  1000,
 
300
  42,
301
  False
302
  ],
 
310
  1.5,
311
  0.99,
312
  1000,
 
313
  42,
314
  False
315
  ],
 
323
  1.1,
324
  0.99,
325
  1000,
 
326
  42,
327
  False
328
  ],
 
336
  1.5,
337
  0.5,
338
  1000,
 
339
  42,
340
  False
341
  ],
 
349
  1.1,
350
  0.99,
351
  1000,
 
352
  42,
353
  False
354
  ],