euiia commited on
Commit
4d26de3
·
verified ·
1 Parent(s): 6714ca4

Update aduc_orchestrator.py

Browse files
Files changed (1) hide show
  1. aduc_orchestrator.py +3 -17
aduc_orchestrator.py CHANGED
@@ -51,10 +51,6 @@ class AducOrchestrator:
51
  logger.info("Maestro ADUC está no pódio. Músicos (especialistas) prontos.")
52
 
53
  def process_image_for_story(self, image_path: str, size: int, filename: str = None) -> str:
54
- """
55
- Pré-processa uma imagem de referência: converte para RGB, redimensiona para um
56
- quadrado e salva no diretório de trabalho.
57
- """
58
  img = Image.open(image_path).convert("RGB")
59
  img_square = ImageOps.fit(img, (size, size), Image.Resampling.LANCZOS)
60
 
@@ -84,11 +80,7 @@ class AducOrchestrator:
84
  return selected_paths
85
 
86
  def task_generate_keyframes(self, storyboard, initial_ref_path, global_prompt, keyframe_resolution, progress_callback_factory=None):
87
- """
88
- Delega a tarefa de geração de keyframes para o ImageSpecialist.
89
- """
90
  logger.info(f"Ato 1, Cena 2: Direção de Arte. Delegando ao Especialista de Imagem.")
91
-
92
  general_ref_paths = self.director.get_state("processed_ref_paths", [])
93
 
94
  final_keyframes = self.painter.generate_keyframes_from_storyboard(
@@ -118,14 +110,12 @@ class AducOrchestrator:
118
  logger.info("AducOrchestrator: Delegando a produção do filme completo ao Deformes4DEngine.")
119
  storyboard = self.director.get_state("storyboard", [])
120
 
121
- # A chamada para o motor agora usa os novos parâmetros de controle de chunk.
122
- # Os parâmetros antigos (seconds_per_fragment, trim_chunks, echo_chunks) são passados
123
- # com valores fictícios, pois a função no motor agora os espera.
124
  for update in self.editor.generate_full_movie(
125
  keyframes=keyframes,
126
  global_prompt=global_prompt,
127
  storyboard=storyboard,
128
- # Novos parâmetros de controle
129
  n_chunks_to_generate=n_chunks_to_generate,
130
  video_end_chunk=video_end_chunk,
131
  eco_start_chunk=eco_start_chunk,
@@ -136,11 +126,7 @@ class AducOrchestrator:
136
  destination_convergence_strength=destination_convergence_strength,
137
  video_resolution=video_resolution,
138
  use_continuity_director=use_continuity_director,
139
- progress=progress,
140
- # Parâmetros antigos que a assinatura de generate_full_movie ainda espera (com valores fictícios)
141
- seconds_per_fragment=0,
142
- trim_chunks=0,
143
- echo_chunks=0
144
  ):
145
  if "fragment_path" in update and update["fragment_path"]:
146
  yield {"fragment_path": update["fragment_path"]}
 
51
  logger.info("Maestro ADUC está no pódio. Músicos (especialistas) prontos.")
52
 
53
  def process_image_for_story(self, image_path: str, size: int, filename: str = None) -> str:
 
 
 
 
54
  img = Image.open(image_path).convert("RGB")
55
  img_square = ImageOps.fit(img, (size, size), Image.Resampling.LANCZOS)
56
 
 
80
  return selected_paths
81
 
82
  def task_generate_keyframes(self, storyboard, initial_ref_path, global_prompt, keyframe_resolution, progress_callback_factory=None):
 
 
 
83
  logger.info(f"Ato 1, Cena 2: Direção de Arte. Delegando ao Especialista de Imagem.")
 
84
  general_ref_paths = self.director.get_state("processed_ref_paths", [])
85
 
86
  final_keyframes = self.painter.generate_keyframes_from_storyboard(
 
110
  logger.info("AducOrchestrator: Delegando a produção do filme completo ao Deformes4DEngine.")
111
  storyboard = self.director.get_state("storyboard", [])
112
 
113
+ # --- CHAMADA ATUALIZADA PARA O MOTOR COM OS NOVOS PARÂMETROS ---
 
 
114
  for update in self.editor.generate_full_movie(
115
  keyframes=keyframes,
116
  global_prompt=global_prompt,
117
  storyboard=storyboard,
118
+ # Novos parâmetros de controle dinâmicos
119
  n_chunks_to_generate=n_chunks_to_generate,
120
  video_end_chunk=video_end_chunk,
121
  eco_start_chunk=eco_start_chunk,
 
126
  destination_convergence_strength=destination_convergence_strength,
127
  video_resolution=video_resolution,
128
  use_continuity_director=use_continuity_director,
129
+ progress=progress
 
 
 
 
130
  ):
131
  if "fragment_path" in update and update["fragment_path"]:
132
  yield {"fragment_path": update["fragment_path"]}