1inkusFace commited on
Commit
9eb76c6
·
verified ·
1 Parent(s): d687be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -433,6 +433,7 @@ def generate_30(
433
  del processor5
434
  gc.collect()
435
  torch.cuda.empty_cache()
 
436
  #expanded = expand_prompt(captions)
437
  new_prompt = captions #prompt+' '+expanded
438
  print("-- ------------ --")
@@ -584,6 +585,7 @@ def generate_60(
584
  del processor5
585
  gc.collect()
586
  torch.cuda.empty_cache()
 
587
  #expanded = expand_prompt(captions)
588
  new_prompt = captions #prompt+' '+expanded
589
  print("-- ------------ --")
@@ -735,6 +737,7 @@ def generate_90(
735
  del processor5
736
  gc.collect()
737
  torch.cuda.empty_cache()
 
738
  #expanded = expand_prompt(captions)
739
  new_prompt = captions #prompt+' '+expanded
740
  print("-- ------------ --")
 
433
  del processor5
434
  gc.collect()
435
  torch.cuda.empty_cache()
436
+ torch.cuda.reset_peak_memory_stats()
437
  #expanded = expand_prompt(captions)
438
  new_prompt = captions #prompt+' '+expanded
439
  print("-- ------------ --")
 
585
  del processor5
586
  gc.collect()
587
  torch.cuda.empty_cache()
588
+ torch.cuda.reset_peak_memory_stats()
589
  #expanded = expand_prompt(captions)
590
  new_prompt = captions #prompt+' '+expanded
591
  print("-- ------------ --")
 
737
  del processor5
738
  gc.collect()
739
  torch.cuda.empty_cache()
740
+ torch.cuda.reset_peak_memory_stats()
741
  #expanded = expand_prompt(captions)
742
  new_prompt = captions #prompt+' '+expanded
743
  print("-- ------------ --")