Spaces:
Paused
Paused
Update api/ltx_server_refactored.py
Browse files
api/ltx_server_refactored.py
CHANGED
|
@@ -263,10 +263,9 @@ class VideoService:
|
|
| 263 |
video_path = self._save_and_log_video(pixel_tensor_cpu, "low_res_video", FPS, temp_dir, results_dir, used_seed)
|
| 264 |
del pixel_tensor; gc.collect(); torch.cuda.empty_cache()
|
| 265 |
|
| 266 |
-
return
|
| 267 |
-
|
| 268 |
except Exception as e:
|
| 269 |
-
|
| 270 |
finally:
|
| 271 |
torch.cuda.empty_cache()
|
| 272 |
torch.cuda.ipc_collect()
|
|
@@ -317,7 +316,7 @@ class VideoService:
|
|
| 317 |
#ltx_configs_override["conditioning_items"] = current_conditions
|
| 318 |
|
| 319 |
|
| 320 |
-
|
| 321 |
prompt, negative_prompt, height,
|
| 322 |
width, duration, seed,
|
| 323 |
conditions_itens, ltx_configs_override,
|
|
|
|
| 263 |
video_path = self._save_and_log_video(pixel_tensor_cpu, "low_res_video", FPS, temp_dir, results_dir, used_seed)
|
| 264 |
del pixel_tensor; gc.collect(); torch.cuda.empty_cache()
|
| 265 |
|
| 266 |
+
return tensor_path
|
|
|
|
| 267 |
except Exception as e:
|
| 268 |
+
return None
|
| 269 |
finally:
|
| 270 |
torch.cuda.empty_cache()
|
| 271 |
torch.cuda.ipc_collect()
|
|
|
|
| 316 |
#ltx_configs_override["conditioning_items"] = current_conditions
|
| 317 |
|
| 318 |
|
| 319 |
+
tensor_path = self._generate_low(
|
| 320 |
prompt, negative_prompt, height,
|
| 321 |
width, duration, seed,
|
| 322 |
conditions_itens, ltx_configs_override,
|