shiimizu / ComfyUI-TiledDiffusion

Tiled Diffusion, MultiDiffusion, Mixture of Diffusers, and optimized VAE
294 stars 21 forks source link

fix hook NoneType error on new version of ComfyUI #26

Closed marcojoao closed 2 months ago

marcojoao commented 4 months ago

On the new version of ComfyUI I got this error:

Traceback (most recent call last): File "/resources/repos/ComfyUI/nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/resources/repos/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/__init__.py", line 1, in <module> from .tiled_diffusion import NODE_CLASS_MAPPINGS as TD_NCM, NODE_DISPLAY_NAME_MAPPINGS as TD_NDCM File "/resources/repos/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/tiled_diffusion.py", line 571, in <module> hook_all() File "/resources/repos/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 161, in hook_all if key == hook.module_name or key.endswith(hook.module_name_path): AttributeError: 'NoneType' object has no attribute 'module_name'

So I just bypass the error if the hook is None.