Update api/ltx_server.py
Browse files- api/ltx_server.py +3 -3
api/ltx_server.py
CHANGED
|
@@ -669,8 +669,8 @@ class VideoService:
|
|
| 669 |
#if total % 2 == 1: # ÍMPAR
|
| 670 |
# Ex: 11 → primeira 0..5, segunda 5..10
|
| 671 |
cut = total // 2
|
| 672 |
-
primeira = latents_brutos[:, :, :cut
|
| 673 |
-
segunda = latents_brutos[:, :, cut:, :, :]
|
| 674 |
|
| 675 |
|
| 676 |
return primeira, segunda
|
|
@@ -1076,7 +1076,7 @@ class VideoService:
|
|
| 1076 |
if (total_partes>1):
|
| 1077 |
final_vid = os.path.join(results_dir, f"concat.mp4")
|
| 1078 |
#partes_mp4_fade = self._gerar_lista_com_transicoes(pasta=results_dir, video_paths=partes_mp4, crossfade_frames=8)
|
| 1079 |
-
final_vid = video_encode_tool_singleton.concatenate_videos(video_paths=partes_mp4, output_path="concate.mp4", workspace_dir=results_dir, start=
|
| 1080 |
#self._concat_mp4s_no_reencode(partes_mp4, final_vid)
|
| 1081 |
else:
|
| 1082 |
final_vid = partes_mp4[0]
|
|
|
|
| 669 |
#if total % 2 == 1: # ÍMPAR
|
| 670 |
# Ex: 11 → primeira 0..5, segunda 5..10
|
| 671 |
cut = total // 2
|
| 672 |
+
primeira = latents_brutos[:, :, :cut, :, :].clone()
|
| 673 |
+
segunda = latents_brutos[:, :, cut:, :, :].clone()
|
| 674 |
|
| 675 |
|
| 676 |
return primeira, segunda
|
|
|
|
| 1076 |
if (total_partes>1):
|
| 1077 |
final_vid = os.path.join(results_dir, f"concat.mp4")
|
| 1078 |
#partes_mp4_fade = self._gerar_lista_com_transicoes(pasta=results_dir, video_paths=partes_mp4, crossfade_frames=8)
|
| 1079 |
+
final_vid = video_encode_tool_singleton.concatenate_videos(video_paths=partes_mp4, output_path="concate.mp4", workspace_dir=results_dir, start=4, overlap=4)
|
| 1080 |
#self._concat_mp4s_no_reencode(partes_mp4, final_vid)
|
| 1081 |
else:
|
| 1082 |
final_vid = partes_mp4[0]
|