Giter VIP home page Giter VIP logo

Comments (5)

rhdunn avatar rhdunn commented on August 15, 2024

I've had a look at implementing this as a custom Python node and ran into issues with allowing any types on inputs that forward the actual type to the corresponding output type.

This makes it impossible to implement this functionality as an extension in a way that is usable in different contexts. (This is one of the reasons ImpactPack has fixed type inputs.)

Looking at the code, the RerouteNode class in the JavaScript is a special node type with graph/type checking. It is doing the forwarding in the code. The RerouteNNode classes could be implemented by either generalizing the RerouteNode class, or as a class that contains N RerouteNode instances.

from comfyui.

mcmonkey4eva avatar mcmonkey4eva commented on August 15, 2024

Yes that would definitely need to be implemented in JavaScript rather than Python for the current codebase.

It would potentially make more sense as an extension than in the core - but could you explain why you want this / what benefit it would bring to workflow usage?

from comfyui.

rhdunn avatar rhdunn commented on August 15, 2024

The things in the use cases I listed above are things I'm considering on grouping.

I've been organizing the through data in workflows into data buses that move through the workflow. For example:

sdxl-workflow

I'm looking at better ways of grouping these together. -- I'm not keen on the ImpactPack solution of a single pipe as you cannot easily add to the pipe or pull specific data off the pipe.

As a workaround I'm creating data-specific custom bus nodes for my workflow. For example:
latent-image-bus

Note: one potential issue is that the RerouteNode has an explicit check for the "Reroute" node when checking the connections, so it would be tricky implementing a generic solution as a plugin.

from comfyui.

rhdunn avatar rhdunn commented on August 15, 2024

For reference, I've created https://github.com/rhdunn/comfyui-bus-plugin which has a collection of these different node types that I'm finding useful in my own workflows. One advantage I've noticed with this approach is the ability to use the nodes as a grouped set of primitive nodes -- i.e. as an input group.

from comfyui.

ltdrdata avatar ltdrdata commented on August 15, 2024

Take a look at hits
https://github.com/Trung0246/ComfyUI-0246

from comfyui.

Related Issues (20)

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.