Giter Site home page Giter Site logo

comfyui-0246's People

Contributors

trung0246 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ka-de jags111

comfyui-0246's Issues

[FEATURE REQUEST] Support for Reroute (native and 3rd parties) nodes in Junction

The Junction node would be extremely useful if I could connect Reroute nodes to it. Especially rghtree Reroute nodes.

For example, in the following screenshots, I would like to replicate that stack of reversed rgthree Reroute nodes with a single Junction node, but I cannot:

Screenshot 2023-11-07 at 13 18 08

This really is the main use case that triggered my wish list for this node.

[EPIC] More nodes ideas.

  • Mirror
  • Junction Plus
  • Ability to keep expanding pin for Junction at the top.
  • Merge to merge Highway or Junction together.
  • Filter.
  • Extract to extract subset from Highway or Junction.
  • Dummy to ignore and skip some output of Junction by connecting to it and do nothing else.
  • Hold to temporary store data and pausing and display what being stored like certain node in another extension. Otherwise acts like Highway and Junction and will have two versions for this.
  • https://matrix.to/#/!OuWSIScDCZYsxVNVAk:matrix.org/$57yHREMzNiZABblnWstm_KLOk0ZotOloHJH5krGIeg0

You don't need to be hacky about PromptServer

Enjoyed your comment

# Hacky way to get the server instance in order to add new api endpoints
server_path = pathlib.Path(__file__).resolve().parent.parent.parent
sys.path.insert(0, str(server_path))

server = __import__("server")

server.PromptServer.instance.app.router.add_post("/0246-parse", parse_handler)

But I found this works:

from server import PromptServer

routes = PromptServer.instance.routes
@routes.post('/0246-parse')
async def parse_handler(request):
    # blah blah blah

And seems less likely to be broken by Comfy updates

[FEATURE REQUEST] Output automatically mirroring the input in Junction node

The current implementation, which allows the user to specify a subset output of the input, gives a massive amount of flexibility. It's great and I'm sure I'll use it in certain circumstances (for example to change the vertical arrangement of the outputs)

But, in most cases, it would be faster and easier to maintain if the Junction node would simply and automatically create an output for every input it receives. Mirroring the list of inputs.

Not sure if this is something that should be done in a separate node (Junction+ ?), or if it could be enabled or disabled via a menu option.

Error running node if Comfy not installed in a directory called "ComfyUI"

I'm running ComfyUI in a docker container, where it's installed in /app. Installing this node throws the following error:

comfyui-app-1  | Traceback (most recent call last):
comfyui-app-1  |   File "/app/nodes.py", line 1800, in load_custom_node
comfyui-app-1  |     module_spec.loader.exec_module(module)
comfyui-app-1  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
comfyui-app-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
comfyui-app-1  |   File "/app/custom_nodes/ComfyUI-0246/__init__.py", line 1, in <module>
comfyui-app-1  |     from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
comfyui-app-1  |   File "/app/custom_nodes/ComfyUI-0246/nodes.py", line 23, in <module>
comfyui-app-1  |     with utils0246.temp_dir(pathlib.Path(__file__).parent.parent.parent.parent.absolute() / "ComfyUI" / "custom_nodes"):
comfyui-app-1  |   File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
comfyui-app-1  |     return next(self.gen)
comfyui-app-1  |   File "/app/custom_nodes/ComfyUI-0246/utils.py", line 71, in temp_dir
comfyui-app-1  |     os.chdir(new_dir)
comfyui-app-1  | FileNotFoundError: [Errno 2] No such file or directory: '/ComfyUI/custom_nodes'
comfyui-app-1  |
comfyui-app-1  | Cannot import /app/custom_nodes/ComfyUI-0246 module for custom nodes: [Errno 2] No such file or directory: '/ComfyUI/custom_nodes'

I believe it's because of this line, which incorrectly assumes the installation directory name:

with utils0246.temp_dir(pathlib.Path(__file__).parent.parent.parent.parent.absolute() / "ComfyUI" / "custom_nodes"):

Perhaps instead, you could go up one fewer parents, and then you wouldn't need to know the name of the installation directory?

[FEATURE SUGGESTION] - Bidirectional Highway syntax

I finally started testing the Highway and Junction node in a serious way. (I also plan to test the other batch of new ones, which look seriously powerful).

Hence, I remembered one of the reasons why I had to postpone the adoption of either in the AP Workflow: #2.
Without the capability to reverse direction of in and out pins, my workflow would become an unsustainable mess.

That said, while testing the Highway node, I found myself in the situation of attempting to replicate a stack of reroute nodes:

Screenshot 2023-11-26 at 21 18 02

Writing down every label in both directions is a minor annoyance, but it gave me the idea for a tweak of the syntax (if possible).

Right now we write a query like >pinA, <pinA.
Could we write a query like <>pinA to shortcut the creation of two in and out pins with identical labels*?

Just a thought.

UPDATE
You have implemented the layout direction! I just didn't notice until now. But, just like for rgthree, when the layout is reversed, the pin labels disappear. Is that a technical limitation of ComfyUI? If so, this whole Issue is mostly pointless.

Uncaught TypeError: Cannot read properties of undefined (reading 'extra')

I just loaded up on a different browser to test some things with another node (tried Chrome and Brave), and I'm getting a client side error. Not sure why I'm not getting it in my usual browser (Safari), though. I haven't used ComfyUI in either of those browsers previously, so I'm not sure if that makes a difference.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'extra')
    at Object.error_flag [as pre] (nodes.js:120:17)
    at obj.<computed> [as loadGraphData] (nodes.js:52:16)
    at HTMLButtonElement.onclick (ui.js:789:17)

Turns out it's being thrown here:

if (!workflow.extra["0246.VERSION"]) {

Primitive Nodes

I'm using a primitive node to store a string for use in multiple steps.
I can set this as the input to both my base and refiner text encodes.
I don't seem able to add this to a highway or junction though.
Am I missing something, or is this not implemented/a bug?

image

Error using Webinterface without HTTPS/TLS: crypto.subtle is undefined

Adding a Highway Node to comfy workflow prevents new images from being added to the queue if the webinterface was not opened in a secure context (HTTPS).

Reproducable using commit #d9d8702 (2023-11-19) for ComfyUI and commit #b7d64ce (2023-11-16) for this extension.


Following error will be reported under Settings โžœ View Logs:

TypeError
can't access property "digest", crypto.subtle is undefined
randomSHA256@http://[HOSTNAME]:8188/extensions/ComfyUI-0246/js/nodes.js:41:21

There is no output in command line.


According to MDN: SubtleCrypto, the browser interface crypto.subtle is not usable from a website without TLS.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

So I tested this again using the webinterface behind a reverse proxy with TLS encryption, which prevented the error from being thrown.


For TLS support I found this related open Issue #1105 and Pull Request #1481 (not provided in aforementioned commit) in ComfyUI repository.

Even if these could solve the current problem, I don't think enabling TLS should be a requirement, especially if ComfyUI isn't exposed to the outside world. Maybe the usage of crypto.subtle for generating SHA-256 hashes should be replaced by a library. However, I'm not sure which one would be best for this. It's a shame that the Crypto API cannot be used for HTTP pages, even for such small use cases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.