ford442 commited on
Commit
02c81e0
·
verified ·
1 Parent(s): 9e2b698

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -341,8 +341,8 @@ def generate_30(
341
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
342
  upload_to_ftp(sd_image_path)
343
  image_paths = save_image(rv_image)
344
- torch.cuda.empty_cache()
345
- gc.collect()
346
  torch.set_float32_matmul_precision("medium")
347
  with torch.no_grad():
348
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)
@@ -403,8 +403,8 @@ def generate_60(
403
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
404
  upload_to_ftp(sd_image_path)
405
  image_paths = save_image(rv_image)
406
- torch.cuda.empty_cache()
407
- gc.collect()
408
  torch.set_float32_matmul_precision("medium")
409
  with torch.no_grad():
410
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)
@@ -465,8 +465,8 @@ def generate_90(
465
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
466
  upload_to_ftp(sd_image_path)
467
  image_paths = save_image(rv_image)
468
- torch.cuda.empty_cache()
469
- gc.collect()
470
  torch.set_float32_matmul_precision("medium")
471
  with torch.no_grad():
472
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)
 
341
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
342
  upload_to_ftp(sd_image_path)
343
  image_paths = save_image(rv_image)
344
+ #torch.cuda.empty_cache()
345
+ #gc.collect()
346
  torch.set_float32_matmul_precision("medium")
347
  with torch.no_grad():
348
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)
 
403
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
404
  upload_to_ftp(sd_image_path)
405
  image_paths = save_image(rv_image)
406
+ #torch.cuda.empty_cache()
407
+ #gc.collect()
408
  torch.set_float32_matmul_precision("medium")
409
  with torch.no_grad():
410
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)
 
465
  rv_image.save(sd_image_path,optimize=False,compress_level=0)
466
  upload_to_ftp(sd_image_path)
467
  image_paths = save_image(rv_image)
468
+ #torch.cuda.empty_cache()
469
+ #gc.collect()
470
  torch.set_float32_matmul_precision("medium")
471
  with torch.no_grad():
472
  upscale = upscaler(rv_image, tiling=True, tile_width=256, tile_height=256)