-
Notifications
You must be signed in to change notification settings - Fork 33
Developing custom nodes from webui extensions
Johnwl edited this page Jul 14, 2023
·
35 revisions
You can implement ComfyUI custom nodes into other webui extensions. Upon startup, sd-webui-comfyui will scan the webui extensions and inject the nodes of enabled extensions into comfyui.
Here is the directory structure expected by the custom node scanner:
sd-webui-your-extension
├─ comfyui_custom_nodes
│ ├─ node1.py
│ ├─ node2.py
│ ...
├─ comfyui_custom_scripts
│ ├─ extensions
│ │ ├─ node2.js
│ │ ...
│ ├─ additional_scriptA.js
│ ├─ additional_scriptB.js
│ ...
├─ scripts
...
-
comfyui_custom_nodes/
contains python custom nodes. This is usually where the backend of the nodes is implemented. Here is an example from the comfyui repo. -
comfyui_custom_scripts/
contains any additional javascript code you want comfyui to statically serve -
comfyui_custom_scripts/extensions
contains js code for custom extensions. This is usually where you add your own custom ui elements. Here is an example from the comfyui repo
On the side of the web browser, if your extension directory is named "sd-webui-your-extension", then any file under comfyui_custom_scripts/
will appear at the path http://localhost:8188/webui_scripts/sd-webui-your-extension/