Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,8 @@ def infer(prompt, init_image):
|
|
| 29 |
num_inference_steps=50,
|
| 30 |
generator=generator)
|
| 31 |
|
| 32 |
-
torch.
|
|
|
|
| 33 |
|
| 34 |
res = pipe(alpha=1)
|
| 35 |
|
|
|
|
| 29 |
num_inference_steps=50,
|
| 30 |
generator=generator)
|
| 31 |
|
| 32 |
+
with torch.no_grad():
|
| 33 |
+
torch.cuda.empty_cache()
|
| 34 |
|
| 35 |
res = pipe(alpha=1)
|
| 36 |
|