ovi054 commited on
Commit
7d45cea
·
verified ·
1 Parent(s): 9497fb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -25,6 +25,7 @@ def generate(prompt, width=832, height=832, num_inference_steps=30, lora_id=None
25
  pipe.unload_lora_weights()
26
  pipe.load_lora_weights(lora_id.strip())
27
  pipe.to("cuda")
 
28
  try:
29
  output = pipe(
30
  prompt=prompt,
 
25
  pipe.unload_lora_weights()
26
  pipe.load_lora_weights(lora_id.strip())
27
  pipe.to("cuda")
28
+ torch.cuda.empty_cache()
29
  try:
30
  output = pipe(
31
  prompt=prompt,