Spaces:
Running
Running
Remove unnecessary pipeline.to("cpu") calls in video generation functions
Browse files
app.py
CHANGED
|
@@ -224,7 +224,6 @@ def generate_video_from_text(
|
|
| 224 |
duration=5,
|
| 225 |
)
|
| 226 |
finally:
|
| 227 |
-
pipeline.to("cpu")
|
| 228 |
torch.cuda.empty_cache()
|
| 229 |
gc.collect()
|
| 230 |
|
|
@@ -322,7 +321,6 @@ def generate_video_from_image(
|
|
| 322 |
)
|
| 323 |
|
| 324 |
finally:
|
| 325 |
-
pipeline.to("cpu")
|
| 326 |
torch.cuda.empty_cache()
|
| 327 |
gc.collect()
|
| 328 |
|
|
|
|
| 224 |
duration=5,
|
| 225 |
)
|
| 226 |
finally:
|
|
|
|
| 227 |
torch.cuda.empty_cache()
|
| 228 |
gc.collect()
|
| 229 |
|
|
|
|
| 321 |
)
|
| 322 |
|
| 323 |
finally:
|
|
|
|
| 324 |
torch.cuda.empty_cache()
|
| 325 |
gc.collect()
|
| 326 |
|