Fabrice-TIERCELIN commited on
Commit
f476dc7
1 Parent(s): 2ed773d

Searching a GPU...

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -234,7 +234,8 @@ def uncrop(
234
  process_width = process_width - (process_width % 8)
235
  process_height = process_height - (process_height % 8)
236
 
237
- progress(None, desc = "Processing...")
 
238
 
239
  output_image = uncrop_on_gpu(
240
  seed,
@@ -248,7 +249,8 @@ def uncrop(
248
  guidance_scale,
249
  image_guidance_scale,
250
  strength,
251
- denoising_steps
 
252
  )
253
 
254
  if limitation != "":
@@ -286,7 +288,9 @@ def uncrop_on_gpu(
286
  guidance_scale,
287
  image_guidance_scale,
288
  strength,
289
- denoising_steps):
 
 
290
  return pipe(
291
  seeds = [seed],
292
  width = process_width,
 
234
  process_width = process_width - (process_width % 8)
235
  process_height = process_height - (process_height % 8)
236
 
237
+ if torch.cuda.is_available():
238
+ progress(None, desc = "Searching a GPU...")
239
 
240
  output_image = uncrop_on_gpu(
241
  seed,
 
249
  guidance_scale,
250
  image_guidance_scale,
251
  strength,
252
+ denoising_steps,
253
+ progress
254
  )
255
 
256
  if limitation != "":
 
288
  guidance_scale,
289
  image_guidance_scale,
290
  strength,
291
+ denoising_steps,
292
+ progress):
293
+ progress(None, desc = "Processing...")
294
  return pipe(
295
  seeds = [seed],
296
  width = process_width,