Restored INPUT_IS_LIST = True to prevent ComfyUI from mapping the node in parallel when given multiple files, and added OUTPUT_IS_LIST with five values to properly unpack outputs to the downstream nodes. Also ensured that the return statement yields a tuple of lists.
23 lines
610 B
Python
23 lines
610 B
Python
import sys
|
|
import unittest.mock
|
|
|
|
# Mocking missing dependencies for syntax check
|
|
sys.modules['torch'] = unittest.mock.MagicMock()
|
|
sys.modules['comfy'] = unittest.mock.MagicMock()
|
|
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()
|
|
|
|
try:
|
|
import loop
|
|
print("Syntax is OK")
|
|
except Exception as e:
|
|
import traceback
|
|
traceback.print_exc()
|