Update api/ltx_server_refactored.py
Browse files
api/ltx_server_refactored.py
CHANGED
|
@@ -355,7 +355,7 @@ class VideoService:
|
|
| 355 |
print("-" * 20 + " ERRO: _generate_single_chunk_low --------------------")
|
| 356 |
traceback.print_exc()
|
| 357 |
print("-" * 20 + " ----------------------------------------------")
|
| 358 |
-
|
| 359 |
finally:
|
| 360 |
torch.cuda.empty_cache()
|
| 361 |
torch.cuda.ipc_collect()
|
|
@@ -494,6 +494,7 @@ class VideoService:
|
|
| 494 |
print("-" * 20 + " ERRO: generate_narrative_low --------------------")
|
| 495 |
traceback.print_exc()
|
| 496 |
print("-" * 20 + " ----------------------------------------------")
|
|
|
|
| 497 |
finally:
|
| 498 |
torch.cuda.empty_cache()
|
| 499 |
torch.cuda.ipc_collect()
|
|
@@ -545,7 +546,10 @@ class VideoService:
|
|
| 545 |
torch.save(latents_cpu, tensor_path)
|
| 546 |
return video_path, tensor_path, used_seed
|
| 547 |
except Exception as e:
|
| 548 |
-
print(
|
|
|
|
|
|
|
|
|
|
| 549 |
finally:
|
| 550 |
torch.cuda.empty_cache()
|
| 551 |
torch.cuda.ipc_collect()
|
|
|
|
| 355 |
print("-" * 20 + " ERRO: _generate_single_chunk_low --------------------")
|
| 356 |
traceback.print_exc()
|
| 357 |
print("-" * 20 + " ----------------------------------------------")
|
| 358 |
+
return None
|
| 359 |
finally:
|
| 360 |
torch.cuda.empty_cache()
|
| 361 |
torch.cuda.ipc_collect()
|
|
|
|
| 494 |
print("-" * 20 + " ERRO: generate_narrative_low --------------------")
|
| 495 |
traceback.print_exc()
|
| 496 |
print("-" * 20 + " ----------------------------------------------")
|
| 497 |
+
return None, None, None
|
| 498 |
finally:
|
| 499 |
torch.cuda.empty_cache()
|
| 500 |
torch.cuda.ipc_collect()
|
|
|
|
| 546 |
torch.save(latents_cpu, tensor_path)
|
| 547 |
return video_path, tensor_path, used_seed
|
| 548 |
except Exception as e:
|
| 549 |
+
print("-" * 20 + " ERRO: generate_single_low --------------------")
|
| 550 |
+
traceback.print_exc()
|
| 551 |
+
print("-" * 20 + " ----------------------------------------------")
|
| 552 |
+
return None, None, None
|
| 553 |
finally:
|
| 554 |
torch.cuda.empty_cache()
|
| 555 |
torch.cuda.ipc_collect()
|