ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Custom Nodes needs safe place

Open WASasquatch opened this issue 2 years ago • 4 comments

So custom Nodes are pretty awesome. Why I started using is to "easily" add the functionality I want that is a hassle with WebUI scripts/extensions.

However I found that the custom node handler wants to load up anything, and in subfolders too? Maybe custom Nodes should have a cache folder where one could route installs too so nodes don't need to install anything with internet. I tried adding a repo to use without installing globally and Comfy tried loading all the stuff up as nodes.. 😆

Clearly I could install repos to root and reference them but it doesn't sound as "module" like when part of it's functionality is required to be outside the custom nodes folder.

WASasquatch avatar Mar 18 '23 18:03 WASasquatch

it tries to import files that end in .py and folders (if they contain an init.py) in the custom_nodes directory.

comfyanonymous avatar Mar 18 '23 23:03 comfyanonymous

it tries to import files that end in .py and folders (if they contain an init.py) in the custom_nodes directory.

Maybe if a folder is the same name as a loaded node py, it ignores it so that the node can reserve it as a file for extended scripts that may utilize init to load up properly from node side?

WASasquatch avatar Mar 19 '23 01:03 WASasquatch

@WASasquatch Maybe we can turn this into a discussion? We can't stop people from downloading things, but we can probably add a warning on the registry for custom nodes that do download things on startup.

robinjhuang avatar Jul 03 '24 19:07 robinjhuang

Yeah definitely. This was more about the arbitrary loading of files as custom nodes when we should probably have a entry point, like in root of custom_nodes dir. I don't think this problem still exists though.

WASasquatch avatar Jul 03 '24 20:07 WASasquatch