euiia commited on
Commit
7ad5344
·
verified ·
1 Parent(s): fd9e113

Update aduc_orchestrator.py

Browse files
Files changed (1) hide show
  1. aduc_orchestrator.py +6 -12
aduc_orchestrator.py CHANGED
@@ -2,7 +2,7 @@
2
  #
3
  # Copyright (C) August 4, 2025 Carlos Rodrigues dos Santos
4
  #
5
- # Version: 2.0.0
6
  #
7
  # This file contains the core ADUC (Automated Discovery and Orchestration of Complex tasks)
8
  # orchestrator, known as the "Maestro" (Γ). Its responsibility is to manage the high-level
@@ -12,7 +12,6 @@
12
  # "Director" component. It does not perform AI inference itself but acts as the central conductor.
13
 
14
  import os
15
- import time
16
  import logging
17
  from typing import List, Dict, Any, Generator, Tuple
18
 
@@ -179,7 +178,6 @@ class AducOrchestrator:
179
  logger.info("Maestro: Delegating production of the original movie to Deformes4DEngine.")
180
  storyboard = self.director.get_state("storyboard", [])
181
 
182
- # The engine will now handle the full generation and return the final paths
183
  result = self.editor.generate_original_movie(
184
  keyframes=keyframes,
185
  global_prompt=global_prompt,
@@ -190,7 +188,6 @@ class AducOrchestrator:
190
  destination_convergence_strength=destination_convergence_strength,
191
  video_resolution=video_resolution,
192
  use_continuity_director=use_continuity_director,
193
- # New LTX pipeline parameters
194
  guidance_scale=guidance_scale,
195
  stg_scale=stg_scale,
196
  num_inference_steps=inference_steps,
@@ -208,7 +205,6 @@ class AducOrchestrator:
208
  """
209
  logger.info(f"Maestro: Delegating latent upscaling task for {len(latent_paths)} fragments.")
210
 
211
- # This is a generator function to allow for UI updates
212
  for update in self.editor.upscale_latents_and_create_video(
213
  latent_paths=latent_paths,
214
  chunk_size=chunk_size,
@@ -216,28 +212,27 @@ class AducOrchestrator:
216
  ):
217
  if "final_path" in update and update["final_path"]:
218
  self.director.update_state("final_video_path", update["final_path"])
219
- yield update["final_path"]
220
  break
221
 
222
  logger.info("Maestro: Latent upscaling complete.")
223
 
224
- def task_run_hd_mastering(self, source_video_path: str, model_version: str, steps: int, progress: gr.Progress) -> Generator[Dict[str, Any], None, None]:
225
  """
226
  Orchestrates the HD mastering task.
227
  """
228
  logger.info(f"Maestro: Delegating HD mastering task using SeedVR {model_version}.")
229
 
230
- # We'll need a new method in the editor to handle this
231
  for update in self.editor.master_video_hd(
232
  source_video_path=source_video_path,
233
  model_version=model_version,
234
  steps=steps,
235
- prompt=self.director.get_state("storyboard", ["A cinematic high-quality movie."])[0],
236
  progress=progress
237
  ):
238
  if "final_path" in update and update["final_path"]:
239
  self.director.update_state("final_video_path", update["final_path"])
240
- yield update["final_path"]
241
  break
242
 
243
  logger.info("Maestro: HD mastering complete.")
@@ -248,7 +243,6 @@ class AducOrchestrator:
248
  """
249
  logger.info(f"Maestro: Delegating audio generation task.")
250
 
251
- # Another new method in the editor
252
  for update in self.editor.generate_audio_for_final_video(
253
  source_video_path=source_video_path,
254
  audio_prompt=audio_prompt,
@@ -256,7 +250,7 @@ class AducOrchestrator:
256
  ):
257
  if "final_path" in update and update["final_path"]:
258
  self.director.update_state("final_video_path", update["final_path"])
259
- yield update["final_path"]
260
  break
261
 
262
  logger.info("Maestro: Audio generation complete.")
 
2
  #
3
  # Copyright (C) August 4, 2025 Carlos Rodrigues dos Santos
4
  #
5
+ # Version: 2.0.2
6
  #
7
  # This file contains the core ADUC (Automated Discovery and Orchestration of Complex tasks)
8
  # orchestrator, known as the "Maestro" (Γ). Its responsibility is to manage the high-level
 
12
  # "Director" component. It does not perform AI inference itself but acts as the central conductor.
13
 
14
  import os
 
15
  import logging
16
  from typing import List, Dict, Any, Generator, Tuple
17
 
 
178
  logger.info("Maestro: Delegating production of the original movie to Deformes4DEngine.")
179
  storyboard = self.director.get_state("storyboard", [])
180
 
 
181
  result = self.editor.generate_original_movie(
182
  keyframes=keyframes,
183
  global_prompt=global_prompt,
 
188
  destination_convergence_strength=destination_convergence_strength,
189
  video_resolution=video_resolution,
190
  use_continuity_director=use_continuity_director,
 
191
  guidance_scale=guidance_scale,
192
  stg_scale=stg_scale,
193
  num_inference_steps=inference_steps,
 
205
  """
206
  logger.info(f"Maestro: Delegating latent upscaling task for {len(latent_paths)} fragments.")
207
 
 
208
  for update in self.editor.upscale_latents_and_create_video(
209
  latent_paths=latent_paths,
210
  chunk_size=chunk_size,
 
212
  ):
213
  if "final_path" in update and update["final_path"]:
214
  self.director.update_state("final_video_path", update["final_path"])
215
+ yield update
216
  break
217
 
218
  logger.info("Maestro: Latent upscaling complete.")
219
 
220
+ def task_run_hd_mastering(self, source_video_path: str, model_version: str, steps: int, prompt: str, progress: gr.Progress) -> Generator[Dict[str, Any], None, None]:
221
  """
222
  Orchestrates the HD mastering task.
223
  """
224
  logger.info(f"Maestro: Delegating HD mastering task using SeedVR {model_version}.")
225
 
 
226
  for update in self.editor.master_video_hd(
227
  source_video_path=source_video_path,
228
  model_version=model_version,
229
  steps=steps,
230
+ prompt=prompt,
231
  progress=progress
232
  ):
233
  if "final_path" in update and update["final_path"]:
234
  self.director.update_state("final_video_path", update["final_path"])
235
+ yield update
236
  break
237
 
238
  logger.info("Maestro: HD mastering complete.")
 
243
  """
244
  logger.info(f"Maestro: Delegating audio generation task.")
245
 
 
246
  for update in self.editor.generate_audio_for_final_video(
247
  source_video_path=source_video_path,
248
  audio_prompt=audio_prompt,
 
250
  ):
251
  if "final_path" in update and update["final_path"]:
252
  self.director.update_state("final_video_path", update["final_path"])
253
+ yield update
254
  break
255
 
256
  logger.info("Maestro: Audio generation complete.")