Spaces:
Paused
Paused
Update api/ltx/ltx_aduc_pipeline.py
Browse files
api/ltx/ltx_aduc_pipeline.py
CHANGED
|
@@ -181,7 +181,7 @@ class LtxAducPipeline:
|
|
| 181 |
"""
|
| 182 |
# Só imprime o log se o nível de logging for DEBUG
|
| 183 |
if logging.getLogger().isEnabledFor(logging.INFO):
|
| 184 |
-
log_str = ["\n" + "="*
|
| 185 |
if not items:
|
| 186 |
log_str.append(" -> Lista de conditioning_items está vazia.")
|
| 187 |
else:
|
|
@@ -197,8 +197,11 @@ class LtxAducPipeline:
|
|
| 197 |
f"Strength = {item.conditioning_strength:.2f}"
|
| 198 |
)
|
| 199 |
else:
|
|
|
|
| 200 |
log_str.append(f" -> Item [{i}]: Não contém um tensor válido.")
|
| 201 |
-
|
|
|
|
|
|
|
| 202 |
|
| 203 |
# Usa o logger de debug para imprimir a mensagem completa
|
| 204 |
logging.info("\n".join(log_str))
|
|
@@ -252,12 +255,8 @@ class LtxAducPipeline:
|
|
| 252 |
# Loga os conditioning_items separadamente com a nossa função helper
|
| 253 |
conditioning_items_list = kwargs.get('conditioning_items')
|
| 254 |
self._log_conditioning_items(conditioning_items_list)
|
| 255 |
-
# --- Fim do Bloco de Logging ---
|
| 256 |
-
|
| 257 |
-
# 5. Adiciona os conditioning_items ao dicionário
|
| 258 |
pipeline_kwargs['conditioning_items'] = conditioning_items_list
|
| 259 |
|
| 260 |
-
# 6. Executa o pipeline com o dicionário completo
|
| 261 |
with torch.autocast(device_type=self.main_device.type, dtype=self.runtime_autocast_dtype, enabled="cuda" in self.main_device.type):
|
| 262 |
latents_raw = self.pipeline(**pipeline_kwargs).images
|
| 263 |
|
|
|
|
| 181 |
"""
|
| 182 |
# Só imprime o log se o nível de logging for DEBUG
|
| 183 |
if logging.getLogger().isEnabledFor(logging.INFO):
|
| 184 |
+
log_str = ["\n" + "="*10 + " INFO: Conditioning Items " + "="*10]
|
| 185 |
if not items:
|
| 186 |
log_str.append(" -> Lista de conditioning_items está vazia.")
|
| 187 |
else:
|
|
|
|
| 197 |
f"Strength = {item.conditioning_strength:.2f}"
|
| 198 |
)
|
| 199 |
else:
|
| 200 |
+
tt = str(itemvalue)
|
| 201 |
log_str.append(f" -> Item [{i}]: Não contém um tensor válido.")
|
| 202 |
+
log_str.append(f" {tt[:70]}")
|
| 203 |
+
|
| 204 |
+
log_str.append("="*40 + "\n")
|
| 205 |
|
| 206 |
# Usa o logger de debug para imprimir a mensagem completa
|
| 207 |
logging.info("\n".join(log_str))
|
|
|
|
| 255 |
# Loga os conditioning_items separadamente com a nossa função helper
|
| 256 |
conditioning_items_list = kwargs.get('conditioning_items')
|
| 257 |
self._log_conditioning_items(conditioning_items_list)
|
|
|
|
|
|
|
|
|
|
| 258 |
pipeline_kwargs['conditioning_items'] = conditioning_items_list
|
| 259 |
|
|
|
|
| 260 |
with torch.autocast(device_type=self.main_device.type, dtype=self.runtime_autocast_dtype, enabled="cuda" in self.main_device.type):
|
| 261 |
latents_raw = self.pipeline(**pipeline_kwargs).images
|
| 262 |
|