onediff icon indicating copy to clipboard operation
onediff copied to clipboard

Does not work with Tiled Diffusion, makes a new error when importing the nodes together

Open MathGB1 opened this issue 1 year ago • 1 comments

🐛 Describe the bug

On a clean install of comfyui, git clone Tiled Diffusion, and it works, the nodes are loaded and functional. On another clean install of comfyui, using a symbolic link on the custom nodes to the onediff comfy nodes also work. But now, doing another clean install, creating the symbolic link & git cloning Tiled Diffusion (https://github.com/shiimizu/ComfyUI-TiledDiffusion), the Tiled Diffusion nodes get an error when being imported.

Using OneFlow backend (Default) Traceback (most recent call last): File "/root/ComfyUI/nodes.py", line 1931, 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 "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/init.py", line 1, in from .tiled_diffusion import NODE_CLASS_MAPPINGS as TD_NCM, NODE_DISPLAY_NAME_MAPPINGS as TD_NDCM File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/tiled_diffusion.py", line 572, in hook_all() File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 155, in hook_all hook_calc_cond_uncond_batch(), File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 43, in hook_calc_cond_uncond_batch fn = inject_code(calc_cond_batch, payload, 'w') File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 214, in inject_code return write_to_file_and_return_fn(original_func, modified_source, mode) File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 248, in write_to_file_and_return_fn return copy_func(original_func, code=modified_function.code, update_wrapper=False) File "/root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 241, in copy_func g = types.FunctionType(code, globals, name=f.name, ValueError: hijacked_method requires closure of length 0, not 1

Cannot import /root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion module for custom nodes: hijacked_method requires closure of length 0, not 1

Import times for custom nodes: 0.0 seconds: /root/ComfyUI/custom_nodes/websocket_image_save.py 0.0 seconds (IMPORT FAILED): /root/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion 4.9 seconds: /root/ComfyUI/custom_nodes/onediff_comfy_nodes

Versions

what

MathGB1 avatar Jul 29 '24 04:07 MathGB1

image It looks like your ComfyUI-TiledDiffusion is not imported properly. You can try to reinstall onediff and ComfyUI-TiledDiffusion to solve the problem.

lijunliangTG avatar Jul 30 '24 03:07 lijunliangTG