Git Product home page Git Product logo

comfyui-floodgate's Introduction

ComfyUI Floodgate

This is an Extension for ComfyUI, which allows you to easily control the logic flow!

Motivation

While Hires. Fix (or similar workflows) can significantly improve the output, it also takes a longer time to process. Thus, many will simply run the base resolution until a good seed is found before enabling it. However, for ComfyUI this means connecting and disconnecting multiple nodes every single time...

Solution

Introducing, Floodgate!
Simply toggle between the logic flows. No more reconnecting multiple nodes!

How to Use

Connect the output of a node (eg. LATENT) to the source of the Floodgate node, then connect each path to the desired remaining workflow. Simply click on gate_open to toggle between the paths to take. The path not chosen will not be executed. Furthermore, since ComfyUI caches the intermediate results, opening the Floodgate will not require the precedent nodes to be processed again!

Features

  1. Connect any arbitrary types
    • (input/output types still have to match)
  2. Multiple Floodgates in one workflow
  3. Control each Floodgate individually

Note: The logic flow is parsed during the queuing stage, not the execution stage. As a result, the boolean value has to be already determined when you press Queue Prompt, such as from the toggle or a primitive node. If you use a node that outputs a boolean during execution, this will not work.

comfyui-floodgate's People

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

Watchers

 avatar  avatar  avatar

comfyui-floodgate's Issues

Functional requirements

I want to know if it's possible to customize options instead of just switching options?
For example, I can choose controlnet or ipadapter or more other possibilities, and I can make work choices in the node section

Reverse Floodgate

What I'd like to do is this. I'd like to generate an initial image. If I like it, then I want to use it. It I dont like it, then I want to generate an alternative initial image.

Can I have a reverse floodgate, that I can use in concert with some sort of image parker, where if the node value is true, it will use the image that has already been generated, but if the node value is false, it will draw from the pathway where it creates a new image?

This may not all fit into one node. I think I'd need a node that will serve up an image, whenever it is asked, and the image that it serves up will be replaced if a new image is created.

So lets say that we have a boolean value in our graph. This boolean value is the "create new initial image" value.

So lets say that node 1 creates an initial image. That image goes out to both node 2 and node 3. Node 1 is only activated if the boolean value for creating a new initial image is true.

Node 2 can recieve an image from node 1 optionally, otherwise it just hangs on to whatever image it has received in the past. It also has an image output to pass an image along. It's like the preview bridge node that already exists, but it wont break if it doesnt get served an image each time, unlike the existing preview image bridge.

Node 3 is the reverse floodgate. It takes that same boolean value that was used earlier to create an initial image. If the boolean is true that we are creating a new initial image, then it chooses the input from the initial image generator, or node 1. If the boolean for creating an initial image is false, then it takes the input from node 2, which is that special image preview bridge that doesnt have to get a new image each time.

This way, I can generate initial images until I like one, and then when I like it, I'll switch the reverse floodgate.

Why dont I just use the default behavior? Because my images are created with a dynamic prompt. And because the inputs that go into the initial image change with each generation, I cant shut that off. I need the reverse floodgate. (and the modified image preview bridge.

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.