Bobby commited on
Commit
7fba5e7
·
1 Parent(s): 7d5d252

no autocast

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -421,16 +421,15 @@ def process_image(
421
  print(prompt)
422
  print(f"\n-------------------------Preprocess done in: {preprocess_time:.2f} seconds-------------------------")
423
  start = time.time()
424
- with torch.cuda.amp.autocast(True):
425
- results = pipe(
426
- prompt=prompt,
427
- negative_prompt=negative_prompt,
428
- guidance_scale=guidance_scale,
429
- num_images_per_prompt=num_images,
430
- num_inference_steps=num_steps,
431
- generator=generator,
432
- image=control_image,
433
- ).images[0]
434
  print(f"\n-------------------------Inference done in: {time.time() - start:.2f} seconds-------------------------")
435
  # results.save(os.path.join("/data", "temp_image.jpg"))
436
  # torch.cuda.synchronize()
 
421
  print(prompt)
422
  print(f"\n-------------------------Preprocess done in: {preprocess_time:.2f} seconds-------------------------")
423
  start = time.time()
424
+ results = pipe(
425
+ prompt=prompt,
426
+ negative_prompt=negative_prompt,
427
+ guidance_scale=guidance_scale,
428
+ num_images_per_prompt=num_images,
429
+ num_inference_steps=num_steps,
430
+ generator=generator,
431
+ image=control_image,
432
+ ).images[0]
 
433
  print(f"\n-------------------------Inference done in: {time.time() - start:.2f} seconds-------------------------")
434
  # results.save(os.path.join("/data", "temp_image.jpg"))
435
  # torch.cuda.synchronize()