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

Allow loading js extensions without copying to /web folder #1273

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

pythongosssss
Copy link
Collaborator

@pythongosssss pythongosssss commented Aug 20, 2023

Allows serving web content from the custom_nodes folder, meaning that custom nodes dont have to symlink/copy web files.
Also helps when people remove custom nodes, they often leave web files behind and have weird issues.

The supports = ["custom_nodes_from_web"] allows custom node authors to check if the current version of ComfyUI the user is running supports this feature or not, e.g. they couyld implement it something like this:

def should_install_js():
    return not hasattr(PromptServer.instance, "supports") or "custom_nodes_from_web" not in PromptServer.instance.supports

If there is a better mechanism for this, open to suggestions.

A simple test for this:

NODE_CLASS_MAPPINGS = {
}

WEB_DIRECTORY = "./somejs"

__all__ = ['WEB_DIRECTORY']

Then create somejs/hello.js in the custom_nodes folder with alert("hello")

@comfyanonymous comfyanonymous merged commit bc76b38 into comfyanonymous:master Aug 21, 2023
ssitu added a commit to ssitu/ComfyUI_NestedNodeBuilder that referenced this pull request Aug 25, 2023
Support the recently merged PR for loading web extension files from custom node directories: comfyanonymous/ComfyUI#1273
@pythongosssss pythongosssss deleted the custom-node-js branch September 3, 2023 12:53
shiimizu added a commit to shiimizu/ComfyUI_smZNodes that referenced this pull request Sep 7, 2023
* Fix generating the correct embeddings on Nvidia cards. Had to use autocast a certain way when encoding tokens.
* Support doing prompt-editing with the core conditioning nodes, ControlNet nodes, etc.
* Get the number of steps for prompt-editing more reliably by using the new `on prompt` event handler. See https://github.com/comfyanonymous/ComfyUI/pull/765/files
    * Only currently supports up to 1 level of linked nodes. So the number of steps should be on the sampler node or a node that links to the sampler's steps. This only matters for prompt-editing.
* Update to use the `WEB_DIRECTORY` feature instead of manually linking/copying web files. See comfyanonymous/ComfyUI#1273
* Fix CFGDenoiser issues because of comfyanonymous/ComfyUI@1c012d6
* New Settings node.
    * Various options backported from stable-diffusion-webui. Most notably, the RNG option, which works globally.
    * Right click the node for the "show/hide all descriptions" menu option.
* Move option to use CFGDenoiser to the Settings node.
* Update tokenization to match stable-diffusion-webui's v1.6.0 release.

Known issues:
* Multiple conds or conds combined with the ConditioningCombine node have no efect on CFGDenoiser. Only the first conditioning will be used.
LucianoCirino added a commit to LucianoCirino/efficiency-nodes-comfyui that referenced this pull request Sep 9, 2023
This change comes from changes made to ComfyUI from commmit comfyanonymous/ComfyUI#1273
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

Successfully merging this pull request may close these issues.

2 participants