Spaces:
Paused
Paused
Update api/ltx/ltx_aduc_manager.py
Browse files
api/ltx/ltx_aduc_manager.py
CHANGED
|
@@ -66,7 +66,7 @@ class LTXMainWorker(BaseWorker):
|
|
| 66 |
"""Worker especialista para o pipeline principal do LTX."""
|
| 67 |
def __init__(self, worker_id: int, device: torch.device, pipeline: LTXVideoPipeline):
|
| 68 |
super().__init__(worker_id, device, pipeline)
|
| 69 |
-
self.pipeline = self.model
|
| 70 |
self.autocast_dtype: torch.dtype = torch.float32
|
| 71 |
|
| 72 |
def _post_load_hook(self):
|
|
@@ -99,7 +99,7 @@ class VAEWorker(BaseWorker):
|
|
| 99 |
"""Worker especialista para o modelo VAE."""
|
| 100 |
def __init__(self, worker_id: int, device: torch.device, vae: CausalVideoAutoencoder):
|
| 101 |
super().__init__(worker_id, device, vae)
|
| 102 |
-
self.vae = self.model
|
| 103 |
|
| 104 |
def _post_load_hook(self):
|
| 105 |
self.vae.eval()
|
|
@@ -143,7 +143,6 @@ class LTXAducManager:
|
|
| 143 |
|
| 144 |
self._initialize_workers()
|
| 145 |
|
| 146 |
-
# Inicia threads consumidores para processar as filas
|
| 147 |
self.ltx_dispatcher = threading.Thread(target=self._dispatch_jobs, args=(self.ltx_job_queue, self.ltx_workers), daemon=True)
|
| 148 |
self.vae_dispatcher = threading.Thread(target=self._dispatch_jobs, args=(self.vae_job_queue, self.vae_workers), daemon=True)
|
| 149 |
self.health_monitor = threading.Thread(target=self._health_check_loop, daemon=True)
|
|
|
|
| 66 |
"""Worker especialista para o pipeline principal do LTX."""
|
| 67 |
def __init__(self, worker_id: int, device: torch.device, pipeline: LTXVideoPipeline):
|
| 68 |
super().__init__(worker_id, device, pipeline)
|
| 69 |
+
self.pipeline = self.model
|
| 70 |
self.autocast_dtype: torch.dtype = torch.float32
|
| 71 |
|
| 72 |
def _post_load_hook(self):
|
|
|
|
| 99 |
"""Worker especialista para o modelo VAE."""
|
| 100 |
def __init__(self, worker_id: int, device: torch.device, vae: CausalVideoAutoencoder):
|
| 101 |
super().__init__(worker_id, device, vae)
|
| 102 |
+
self.vae = self.model
|
| 103 |
|
| 104 |
def _post_load_hook(self):
|
| 105 |
self.vae.eval()
|
|
|
|
| 143 |
|
| 144 |
self._initialize_workers()
|
| 145 |
|
|
|
|
| 146 |
self.ltx_dispatcher = threading.Thread(target=self._dispatch_jobs, args=(self.ltx_job_queue, self.ltx_workers), daemon=True)
|
| 147 |
self.vae_dispatcher = threading.Thread(target=self._dispatch_jobs, args=(self.vae_job_queue, self.vae_workers), daemon=True)
|
| 148 |
self.health_monitor = threading.Thread(target=self._health_check_loop, daemon=True)
|