EU-IA commited on
Commit
c5f25ff
·
verified ·
1 Parent(s): 2df73e9

Update deformes4D_engine.py

Browse files
Files changed (1) hide show
  1. deformes4D_engine.py +8 -18
deformes4D_engine.py CHANGED
@@ -153,11 +153,17 @@ class Deformes4DEngine:
153
  echo_frames: int,
154
  handler_strength: float,
155
  destination_convergence_strength: float,
156
- base_ltx_params: dict,
157
  video_resolution: int,
158
  use_continuity_director: bool,
159
  progress: gr.Progress = gr.Progress()):
160
 
 
 
 
 
 
 
 
161
  keyframe_paths = [item[0] if isinstance(item, tuple) else item for item in keyframes]
162
  video_clips_paths, story_history, audio_history = [], "", "This is the beginning of the film."
163
  target_resolution_tuple = (video_resolution, video_resolution)
@@ -175,7 +181,6 @@ class Deformes4DEngine:
175
  present_scene_desc = storyboard[i]
176
 
177
  is_first_fragment = previous_latents_path is None
178
- is_penultimate_fragment = (i == num_transitions_to_generate - 2)
179
 
180
  if is_first_fragment:
181
  transition_type = "start"
@@ -252,23 +257,8 @@ class Deformes4DEngine:
252
 
253
  previous_latents_path = new_full_latents_path
254
 
 
255
  latents_for_video = new_full_latents
256
-
257
- if is_first_fragment:
258
- if n_trim_latents > 0 and latents_for_video.shape[2] > n_trim_latents:
259
- latents_for_video = latents_for_video[:, :, :-n_trim_latents, :, :]
260
-
261
- elif is_penultimate_fragment:
262
- if echo_frames > 0 and latents_for_video.shape[2] > echo_frames:
263
- latents_for_video = latents_for_video[:, :, :echo_frames, :, :]
264
-
265
-
266
- if n_trim_latents > 0 and latents_for_video.shape[2] > n_trim_latents:
267
- latents_for_video = latents_for_video[:, :, :-n_trim_latents, :, :]
268
-
269
- else:
270
- if echo_frames > 0 and latents_for_video.shape[2] > echo_frames:
271
- latents_for_video = latents_for_video[:, :, :echo_frames, :, :]
272
 
273
  video_with_audio_path = self._generate_video_and_audio_from_latents(latents_for_video, audio_prompt, base_name)
274
  video_clips_paths.append(video_with_audio_path)
 
153
  echo_frames: int,
154
  handler_strength: float,
155
  destination_convergence_strength: float,
 
156
  video_resolution: int,
157
  use_continuity_director: bool,
158
  progress: gr.Progress = gr.Progress()):
159
 
160
+ base_ltx_params = {
161
+ "guidance_scale": 1.0,
162
+ "stg_scale": 0.0,
163
+ "rescaling_scale": 0.15,
164
+ "num_inference_steps": 7,
165
+ }
166
+
167
  keyframe_paths = [item[0] if isinstance(item, tuple) else item for item in keyframes]
168
  video_clips_paths, story_history, audio_history = [], "", "This is the beginning of the film."
169
  target_resolution_tuple = (video_resolution, video_resolution)
 
181
  present_scene_desc = storyboard[i]
182
 
183
  is_first_fragment = previous_latents_path is None
 
184
 
185
  if is_first_fragment:
186
  transition_type = "start"
 
257
 
258
  previous_latents_path = new_full_latents_path
259
 
260
+ # LÓGICA DE CORTE REMOVIDA - Usamos o tensor completo.
261
  latents_for_video = new_full_latents
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
 
263
  video_with_audio_path = self._generate_video_and_audio_from_latents(latents_for_video, audio_prompt, base_name)
264
  video_clips_paths.append(video_with_audio_path)