2023-11-25 18:45:16 -08:00
2023-11-25 04:12:14 -08:00
2023-11-25 03:46:33 -08:00
2023-11-05 18:22:14 -08:00
2023-11-05 18:21:50 -08:00
2023-11-25 18:36:22 -08:00
2023-11-25 18:45:16 -08:00
2023-11-25 03:46:33 -08:00
2023-11-25 03:46:33 -08:00

ComfyUI-0246

Random nodes for ComfyUI I made to solve my struggle with ComfyUI. Have varying quality.

Nodes list

  • Highway: yet another implementation but overkill version of pipe and reroute.
  • Junction: over-the-head data packing and unpacking sequentially.
  • JunctionBatch: if Junction and ComfyUI batching have a kid.
  • Loop: very hacky recursive repetiion by messing with ComfyUI internals.
  • Beautify: the beautification of data for easy troubleshooting.

Highway

More complex example of what could be done (using my personal workflow as example) with extensions like `use-everywhere`:

The query syntax goes as follow:

  • >name: input variable.
  • <name: output variable.
  • >`n!ce n@me`: input variable but with special character and spaces (except `, obviously).
  • !name: output variable, but also delete itself, preventing from being referenced further.
    • CURRENTLY BROKEN DUE TO HOW COMFYUI UPDATE THE NODES.
  • <name1; >name2; !name3: multiple input and outputs together.

For now Highway node is probably stable, as long as there's no cyclic connection.

  • Cyclic connection means that input and output of the same Highway node must not be connect, including indirect connection.
    • Else will be recursion error due to how ComfyUI execute nodes (trust me I tried).

Can probably have "nested Highway" but probably useless since the node have unlimited in-out pins.

Recommended with chrisgoringe/cg-use-everywhere since it allows more complex notes rerouting.

Demo workflow is in assets/workflow_highway.json.

Special thanks to @kijai for ConditioningMultiCombine node as which Highway node is based of.

TODO (may or may not get implemented)
  • Cyclic detection in JS (python probably not possible unless I figure out a way how to extract the node graph).
  • Node force update (for !name).

Junction

`_offset` is used to skip data ahead for specific type (since internally it's a sequence of data).

_offset is persistent and will retains information across linked Junction.

The offset syntax goes as follow:

  • type,1: type is the type (usually LATENT, MODEL, VAE, etc.) and 1 is the index being set.
  • type,+2: Same as above but instead of set offset, it increase the offset instead.
  • type,-2: Decrease offset.
  • type1, -1; type2, +2; type3, 4: Multiple offset.

Can automatically expand pins.

Inspired by /u/GianoBifronte ideas.

Demo workflow is in assets/workflow_junction.json.


Junction Batch

Basically same as `Junction` but batch as list instead for further processing.

Hopefully difference between batch and pluck are self explainatory in the workflow.

This node does not attempt to do something like Latent From Batch but instead aggregrate batch got from node.

Demo workflow is in assets/workflow_junction_batch.json.


Screenshot 2023-11-25 161238

The example above showcase that this node can turn node such as Plasma Noise into batch. It also allows executing multiple nodes together.

What's it looks like in action for simpler workflow.

https://github.com/Trung0246/ComfyUI-0246/assets/11626920/563b9a00-412a-49b6-b1c6-24c83887a4d3

Pros:

  • Can "loop" within a single prompt queue.

Cons:

  • Will mess up the workflow very easily if not careful.
  • Requires two Hold to sandwich the Loop node to be usable.

To reuse data from previous iteration, I guess there's extensions for that already.

Probably unstable as hell since I only tested for simple case.

Until the topological PRs from the ComfyUI repos got merged, this node will be kept around.


Beautify

Recursively display structural data information, especially useful when dealing with `Highway`, `Jucntion` and `JunctionBatch`.
  • basic: minimally shows as little as possible.
  • more: show everything from basic but also shows the content. Does not expand if it meet a object.
  • full: show everything as much as possible.
  • json: attempt to convert the input to json and display it. Will fail if the data cannot be converted.

TODO (may or may not get implemented)
  • Tutorial for Loop, Count, Hold, and Random.
  • Force Random to create same number everytime if loaded from json workflow.
  • More testing.
S
Description
No description provided
Readme MIT
7.4 MiB
Languages
JavaScript 63.9%
Python 36.1%