eeuuia commited on
Commit
bf29556
·
verified ·
1 Parent(s): b84d19a

Update api/seedvr/seedvr_aduc_pipeline.py

Browse files
Files changed (1) hide show
  1. api/seedvr/seedvr_aduc_pipeline.py +6 -6
api/seedvr/seedvr_aduc_pipeline.py CHANGED
@@ -17,14 +17,14 @@ import logging
17
  # --- IMPORTAÇÃO DOS MÓDulos Compartilhados ---
18
  # ==============================================================================
19
  try:
20
- from api.gpu_manager import gpu_manager
21
- from api.ltx_server_refactored_complete import video_generation_service
22
- from api.utils.debug_utils import log_function_io
23
  except ImportError:
24
  # Fallback para o decorador caso o import falhe
25
  def log_function_io(func):
26
  return func
27
- logging.critical("CRITICAL: Failed to import shared modules like gpu_manager or video_generation_service.", exc_info=True)
28
  # Em um cenário real, poderíamos querer sair aqui ou desativar o servidor.
29
  # Por enquanto, a aplicação pode tentar continuar sem o SeedVR.
30
  raise
@@ -151,7 +151,7 @@ class SeedAducPipeline:
151
  if gpu_manager.requires_memory_swap():
152
  logging.warning("[SWAP] Memory swapping is active. Moving LTX service to CPU to free VRAM for SeedVR.")
153
  if progress: progress(0.02, "🔄 Freeing VRAM for SeedVR...")
154
- video_generation_service.move_to_cpu()
155
 
156
  try:
157
  if progress: progress(0.05, "🎬 Extracting frames from video...")
@@ -211,7 +211,7 @@ class SeedAducPipeline:
211
  ltx_main_device = gpu_manager.get_ltx_device()
212
  ltx_vae_device = gpu_manager.get_ltx_vae_device()
213
  # Chama a função move_to_device com os dois dispositivos
214
- video_generation_service.move_to_device(
215
  main_device_str=str(ltx_main_device),
216
  vae_device_str=str(ltx_vae_device)
217
  )
 
17
  # --- IMPORTAÇÃO DOS MÓDulos Compartilhados ---
18
  # ==============================================================================
19
  try:
20
+ from manager.gpu_manager import gpu_manager
21
+ from api.ltx.ltx_server_refactored_complete import ltx_aduc_pipeline
22
+ from utils.debug_utils import log_function_io
23
  except ImportError:
24
  # Fallback para o decorador caso o import falhe
25
  def log_function_io(func):
26
  return func
27
+ logging.critical("CRITICAL: Failed to import shared modules like gpu_manager or ltx_aduc_pipeline.", exc_info=True)
28
  # Em um cenário real, poderíamos querer sair aqui ou desativar o servidor.
29
  # Por enquanto, a aplicação pode tentar continuar sem o SeedVR.
30
  raise
 
151
  if gpu_manager.requires_memory_swap():
152
  logging.warning("[SWAP] Memory swapping is active. Moving LTX service to CPU to free VRAM for SeedVR.")
153
  if progress: progress(0.02, "🔄 Freeing VRAM for SeedVR...")
154
+ ltx_aduc_pipeline.move_to_cpu()
155
 
156
  try:
157
  if progress: progress(0.05, "🎬 Extracting frames from video...")
 
211
  ltx_main_device = gpu_manager.get_ltx_device()
212
  ltx_vae_device = gpu_manager.get_ltx_vae_device()
213
  # Chama a função move_to_device com os dois dispositivos
214
+ ltx_aduc_pipeline.move_to_device(
215
  main_device_str=str(ltx_main_device),
216
  vae_device_str=str(ltx_vae_device)
217
  )