Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup Error: Cannot import comfyui-inpaint-nodes module for custom nodes #8

Closed
camoody1 opened this issue Jan 30, 2024 · 8 comments
Closed

Comments

@camoody1
Copy link

I have installed your GitHub and downloaded the models you suggested. But when I restart Comfy, I get an error message about Fooocus Inpaint and when the workflow opens, your nodes are red saying that Comfy could not find them. If I look into Comfy Manager, it says that they are installed, but not able to be imported. Any ideas? Here is the error I see in the Comfy startup log:

Traceback (most recent call last):

File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\[nodes.py](https://nodes.py/)", line 1893, in load_custom_node

module_spec.loader.exec_module(module)

File "<frozen importlib._bootstrap_external>", line 940, in exec_module

File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed

File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-inpaint-nodes\__init__.py", line 6, in <module>

)[1].extend([".pt", ".pth", ".safetensors", ".patch"])

^^^^^^

AttributeError: 'set' object has no attribute 'extend'





Cannot import H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-inpaint-nodes module for custom nodes: 'set' object has no attribute 'extend'
@Acly
Copy link
Owner

Acly commented Jan 30, 2024

Probably caused by another custom node package which also registers an "inpaint" folder to models.

You can disable the other nodes, or try to modify comfyui-inpaint-nodes/__init__.py, line 6, replace extend with update

Let me know if it works or the name of the other custom nodes, then I can fix it

@camoody1
Copy link
Author

@Acly I have a custom node called "comfyui-art-venture" that has an inpaint folder in it. Is that what you're talking about? I'm guessing probably not. I don't really know how to determine which folders are registered to models. 🤷🏼‍♂️

@Acly
Copy link
Owner

Acly commented Jan 30, 2024

The contention is about the the inpaint folder in ComfyUI\models\inpaint
The other custom node would be one which also requires you to put files there. But it's not that easy to find out which one it is if you have a lot of them, just thought there's a chance you might know. If not, try the code change, if it works that's good enough.

@camoody1
Copy link
Author

@Acly I actually didn't have that folder even after installing your nodes. I had to create it myself. Does that tell you anything?

@camoody1
Copy link
Author

@Acly Okay. I changed the word from "extend" to "update" and, now, the nodes aren't red anymore. What does this mean for me going forward? What do I have to worry about because I made this change?

@Acly
Copy link
Owner

Acly commented Jan 30, 2024

Nothing to worry about. Some other nodes are also using the inpaint folder, maybe optionally, seems like you never made use of it. But they register certain file extensions. The inpaint nodes also register certain file extensions. With the change it should now include the extensions from both node packages.

@Acly
Copy link
Owner

Acly commented Jan 30, 2024

Should be fixed now, latest version should work without modification.

@Acly Acly closed this as completed Jan 30, 2024
@camoody1
Copy link
Author

Thank you for your quick responses. Have a great day. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants