Spaces:
Paused
Paused
Update api/ltx_server.py
Browse files- api/ltx_server.py +3 -3
api/ltx_server.py
CHANGED
|
@@ -488,7 +488,7 @@ class VideoService:
|
|
| 488 |
self.runtime_autocast_dtype = torch.bfloat16
|
| 489 |
|
| 490 |
LTXV_FORCE_BF16_ON_FP8 = 1
|
| 491 |
-
force_promote = os.getenv("LTXV_FORCE_BF16_ON_FP8", "0") == "1"
|
| 492 |
print(f"[DEBUG] FP8 detectado. force_promote={force_promote}")
|
| 493 |
if force_promote and hasattr(torch, "float8_e4m3fn"):
|
| 494 |
try:
|
|
@@ -973,8 +973,7 @@ class VideoService:
|
|
| 973 |
video_encode_tool_singleton.save_video_from_tensor(
|
| 974 |
pixel_tensor,
|
| 975 |
output_video_path,
|
| 976 |
-
fps=call_kwargs["frame_rate"]
|
| 977 |
-
progress_callback=progress_callback
|
| 978 |
)
|
| 979 |
|
| 980 |
try:
|
|
@@ -991,6 +990,7 @@ class VideoService:
|
|
| 991 |
if (total_partes>1):
|
| 992 |
final_vid = os.path.join(results_dir, f"concat_fim_{used_seed}.mp4")
|
| 993 |
#partes_mp4_fade = self._gerar_lista_com_transicoes(pasta=results_dir, video_paths=partes_mp4, crossfade_frames=8)
|
|
|
|
| 994 |
self._concat_mp4s_no_reencode(partes_mp4, final_vid)
|
| 995 |
else:
|
| 996 |
final_vid = partes_mp4[0]
|
|
|
|
| 488 |
self.runtime_autocast_dtype = torch.bfloat16
|
| 489 |
|
| 490 |
LTXV_FORCE_BF16_ON_FP8 = 1
|
| 491 |
+
force_promote = 1 #os.getenv("LTXV_FORCE_BF16_ON_FP8", "0") == "1"
|
| 492 |
print(f"[DEBUG] FP8 detectado. force_promote={force_promote}")
|
| 493 |
if force_promote and hasattr(torch, "float8_e4m3fn"):
|
| 494 |
try:
|
|
|
|
| 973 |
video_encode_tool_singleton.save_video_from_tensor(
|
| 974 |
pixel_tensor,
|
| 975 |
output_video_path,
|
| 976 |
+
fps=call_kwargs["frame_rate"]
|
|
|
|
| 977 |
)
|
| 978 |
|
| 979 |
try:
|
|
|
|
| 990 |
if (total_partes>1):
|
| 991 |
final_vid = os.path.join(results_dir, f"concat_fim_{used_seed}.mp4")
|
| 992 |
#partes_mp4_fade = self._gerar_lista_com_transicoes(pasta=results_dir, video_paths=partes_mp4, crossfade_frames=8)
|
| 993 |
+
final_vid = video_encode_tool_singleton.concatenate_videos(video_paths=partes_mp4, output_path="concate_fim.mp4", workspace_dir=results_dir)
|
| 994 |
self._concat_mp4s_no_reencode(partes_mp4, final_vid)
|
| 995 |
else:
|
| 996 |
final_vid = partes_mp4[0]
|