Giter Site home page Giter Site logo

comfyui-loopchain's Introduction

ComfyUI Loopchain

A collection of nodes which can be useful for animation in ComfyUI. The main focus of this extension is implementing a mechanism called loopchain.

A loopchain in this case is the chain of nodes only executed repeatly in the workflow. If a node chain contains a loop node from this extension, it will become a loop chain.

Example

TODO: Detailed explaination.

First, install https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.

Second, make a folder named heads inside of ComfyUI/inputs then put these two images into it.

Then load this workflow.

https://github.com/Fannovel16/ComfyUI-Loopchain/raw/main/demo.mp4

Nodes

  • EmptyLatentImageLoop
  • ImageStorageImport
  • ImageStorageExport
  • ImageStorageExportLoop
  • ImageStorageImport
  • ImageStorageExportLoop
  • ImageStorageReset
  • FolderToImageStorage (need a folder in input instead of an image)
  • LatentStorageImport
  • LatentStorageExportLoop
  • LatentStorageReset

comfyui-loopchain's People

Contributors

fannovel16 avatar picobyte 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  avatar  avatar

Watchers

 avatar  avatar

comfyui-loopchain's Issues

Can not use LatentStorageExportLoop

ComfyUI revision: 719fb2c81d716ce8edd7f1bdc7804ae160a71d3a. Short: 719fb2c

After LatentImportStorage done, I tried to use LatentStorageExportLoop, but the exception happened. The keys are the same.

Exception Info:

Error occurred when executing LatentStorageExportLoop:

expected Tensor as element 0 in argument 0, but got dict

  File "/home/…/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/home/…/ComfyUI/execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/home/…/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/home/…/ComfyUI/custom_nodes/ComfyUI-Loopchain/nodes/storages.py", line 199, in execute
    dataloader = DataLoader(torch.cat(GLOBAL_LATENT_STORAGE[key], dim=0), batch_size=batch_size)

Can you clarify?

I build custom workflow graphs for comfyui. As such your loopchain nodes are very attractive to me. I also use much of MEL's nodes. I can tell from you attributions in the code that this is somewhat of a derivative work. Between the two I am very close to having what I need, but I'm not quite there. I have played with your sample workflow and if I just do what you say to do, it does what you say it will do. But it leaves me dazed and confused.

I don't really "get" the key thing. If i try to reference a file folder I get the JavaScript emoji telling me that I'm stupid. Is there a way that I can have your node load frames from a specific folder, process them in the workflow and save them in another specified folder? The way your sample flow is set up, I can't even find the output frames in the comfy directory structure.

Where I really see potential for your system is using the loopchain sequence thingy. To that end I wonder if you could modify Mel's animation builder to accept a loopchain input, and do a pull request? That would make my life so much happier.

I'm aware that this is a sort of side project for you as you remain busy with the controlnet stuff, but If you could take a little time to perfect this, I will be eternally in your debt.

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.