fix: return primitives instead of single-item lists in AutoLoopCalculatorTTSBatch
The AutoLoopCalculatorTTSBatch node was returning its output variables wrapped in single-item lists (e.g., `[current_chunk_text]`) instead of as raw primitive values. This caused downstream nodes expecting raw types (like standard string replacement or string concatenation nodes) to crash, since Python lists do not have `.replace()` or `.join()` methods. The brackets were removed from the `return` statement so the node now properly outputs the exact primitive values.
This commit is contained in:
@@ -191,7 +191,7 @@ class AutoLoopCalculatorTTSBatch:
|
||||
_log(f" -> 📜 Texto a procesar: {current_chunk_text[:75]}...")
|
||||
_log(f"{'='*50}\n")
|
||||
|
||||
return ([current_chunk_text], [safe_index], [total_chunks], [current_name], ["\n".join(log_output)])
|
||||
return (current_chunk_text, safe_index, total_chunks, current_name, "\n".join(log_output))
|
||||
|
||||
@register_node
|
||||
class AutoLoopCalculatorLTX:
|
||||
|
||||
+8
-6
@@ -8,14 +8,16 @@ sys.modules['comfy.model_management'] = unittest.mock.MagicMock()
|
||||
sys.modules['folder_paths'] = unittest.mock.MagicMock()
|
||||
|
||||
# Mock internal import to prevent syntax error on register_node
|
||||
class DummyRegister:
|
||||
def __call__(self, cls):
|
||||
return cls
|
||||
|
||||
sys.modules['__main__'].register_node = DummyRegister()
|
||||
import types
|
||||
dummy_module = types.ModuleType("dummy")
|
||||
dummy_module.register_node = lambda c: c
|
||||
sys.modules[__package__ or '.'] = dummy_module
|
||||
|
||||
try:
|
||||
import loop
|
||||
with open('loop.py') as f:
|
||||
code = f.read()
|
||||
code = code.replace('from . import register_node', 'def register_node(c): return c')
|
||||
exec(code)
|
||||
print("Syntax is OK")
|
||||
except Exception as e:
|
||||
import traceback
|
||||
|
||||
Reference in New Issue
Block a user