1inkusFace commited on
Commit
90a7060
·
verified ·
1 Parent(s): c1dfbc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -410,7 +410,7 @@ def generate_30(
410
  del model5
411
  del processor5
412
  gc.collect()
413
- torch.cuda.clear_cache()
414
  expand_prompt(prompt)
415
  expand_prompt(caption)
416
  expanded = expand_prompt(caption_2)
@@ -421,7 +421,7 @@ def generate_30(
421
  del model
422
  del txt_tokenizer
423
  gc.collect()
424
- torch.cuda.clear_cache()
425
  global text_encoder_1
426
  global text_encoder_2
427
  pipe.text_encoder=text_encoder_1.to(device=device, dtype=torch.bfloat16)
 
410
  del model5
411
  del processor5
412
  gc.collect()
413
+ torch.cuda.empty_cache()
414
  expand_prompt(prompt)
415
  expand_prompt(caption)
416
  expanded = expand_prompt(caption_2)
 
421
  del model
422
  del txt_tokenizer
423
  gc.collect()
424
+ torch.cuda.empty_cache()
425
  global text_encoder_1
426
  global text_encoder_2
427
  pipe.text_encoder=text_encoder_1.to(device=device, dtype=torch.bfloat16)