Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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,
|