shiimizu / ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++
GNU General Public License v3.0
190 stars 14 forks source link

Empty module name #3

Closed rickcx closed 10 months ago

rickcx commented 1 year ago

Traceback (most recent call last): File "/home/bob/ComfyUI/nodes.py", line 1604, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes/init.py", line 69, in from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "/home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes/nodes.py", line 3, in from .modules.sd_hijack import model_hijack, list_optimizers File "/home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes/modules/sd_hijack.py", line 9, in from . import devices, shared, sd_hijack_unet, sd_hijack_optimizations, script_callbacks, errors File "/home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes/modules/sd_hijack_unet.py", line 129, in CondFunc('open_clip.transformer.ResidualAttentionBlock.init', lambda orig_func, *args, kwargs: kwargs.update({'act_layer': GELUHijack}) and False or origfunc(*args, **kwargs), lambda , *args, kwargs: kwargs.get('act_layer') is None or kwargs['act_layer'] == torch.nn.GELU) File "/home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes/modules/sd_hijack_utils.py", line 10, in new resolved_obj = importlib.import_module('.'.join(func_path[:i])) File "/home/bob/anaconda3/envs/ComfyUI/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1047, in _gcd_import File "", line 981, in _sanity_check ValueError: Empty module name

Cannot import /home/bob/ComfyUI/custom_nodes/ComfyUI_smZNodes module for custom nodes: Empty module name

shiimizu commented 1 year ago

Thanks for the stacktrace :) It should work now in the latest commit. The error also goes away by installing open-clip-torch.