ModelsOther

Cyclist | ComfyUI custom nodes

Cyclist | ComfyUI custom nodes

Cyclist 🚴

Custom nodes for ComfyUI

This extension adds an ability to reuse generated results to cycle over them again and again. With this tool, you can automate whatever iterative loop action you have in mind: building grids, animating frame-by-frame, changing conditions every step, etc.

This is a mirror page. Main project page and most recent updates are here: https://github.com/Pos13/comfyui-cyclist.

Installation

Option 1: Use ComfyUI Manager.

Option 2:

  1. Download archive;

  2. Navigate to your “…/ComfyUI/custom_nodes/” folder;

  3. Unpack archive there, forming “_comfyui-cyclist_” folder.

Option 3:

  1. Install git;

  2. Navigate to your “…/ComfyUI/custom_nodes/” folder;

  3. Run git clone https://github.com/Pos13/comfyui-cyclist/ console command in it

General Usage

  1. Put a loading node where you want to provide a result from previous run;

    1. Optionally, connect a fallback input in case nothing is there to load yet (usually, at first iteration).

  2. Put a saving node in the end of your workflow.

  3. Put an Interrupt node if you want to stop generation when certain conditions are met.

  4. Done! Press “Queue Prompt“. And again. And again, maybe.

    1. Optionally, check “Extra options” and “Auto Queue” checkboxes to let ComfyUI infinitely repeat a workflow by itself.

    2. If you want to start a loop from scratch, press the “New Cycle” button introduced in this workflow. It will increment all filenames and loop IDs, if it can.

Cyclist | ComfyUI custom nodes

Check Known Issues at the github page to learn about non-obvious behaviour.

Nodes

Memorize Int/Float/String/Conditioning: These simple nodes save something in memory. Information is lost if you restart ComfyUI. Variables are exclusive to provided loop ID. You can store exactly one Int, one Float, one String and one Conditioning for every loop ID. Change ID to save a new variable of this type.

Recall Int/Float/String/Conditioning: These nodes are for loading information from memory. If nothing is there, fallback input is used instead. Fallback is optional.

Convert To: Takes any input and tries to output an int, float, boolean and string representation of it. Boolean and string can always be cast into, but incorrect int or float will raise an error.

Compare Anything: Takes two inputs of any kinds and a compare operation. Outputs True or False boolean value.

  • Integers are compared as usual.

  • Floats are compared with 1-09 is precision.

  • Strings are compared alphabetically.

  • Images and latents are compared by total pixel amount across whole batch.

  • Everything else is casted to string before comparison.

  • If types are different, it tries to cast inputs into the same type in this order: to boolean, to float, to string.

Int/Float Math: Just a handfull of arithmetic operations betwen two numbers.

Interrupt: Put this onto any link, output is unchanged “any_in” input. When this node is activated by workflow, it stops it if “stop” input is true. You can convert “stop” from widget to input with right-clicking the node.

Be aware where you put Interrupt node! You want it to prevent some heavy computing, so place it in the way of any thing required for such computing. Also, you can only place it after the nodes used to provide “any_in” or “stop” inputs, because ComfyUI will not execute a workflow with a loop.

The best place for Interrupt node is right after important “Reload/Recall” node.

Multiple Interrupt nodes are allowed, and sometimes wanted.

Save Image/Latent/Model (Override): This nodes work similarly to default Save Image/Latent/Model nodes, but filename remains the same, without counter.

  • Images are saved to your output folder.

  • Latents are saved to your output folder, creating “latent” subfolder.

  • Models are saved to your defaultmodels/checkpoints” folder.

Generation Timer: This node measures time spent on generation. Outputs floats.

  • Timer starts right before every generation, when workflow is checked.

  • Timer stops when the last “Save/Memorize” node in the workflow procs.

Mutiple Generation Timers can be used, but you better assign them to different loops.

Force Timer Stop: This node tells the timer to stop whenever any input is provided, no matter what. You can use it to measure time spent by certain blocks, not the whole workflow. But the start is always at generation start.

Force Timer Stop node is not necessary to use Generation Timer, as long as you have any “Save/Memorize” node.

Workflows

Civitai (always actual):

Example workflows from github page and github workflows folder (never changing). They incude:

  • Generate until image gets highly scored by ImageReward

  • Upscale for certain resolution, making just the right number of upscales

  • Upscale until megapixel count is met

  • Cut and place persons on the background

  • Apply LoRAs one by one

  • Make weird animal crossbreeds

  • Stack cats on each other

Also, check out my unrelated workflows.

Related Model

epiCRealismHelper
epiCRealismHelper
Liquid Colloid (tool lora)
Liquid Colloid (tool lora)
Edge_weaken_strengthen
Edge_weaken_strengthen
ComfyUI Catppuccin Mocha Color Palette
ComfyUI Catppuccin Mocha Color Palette
Controlnet HandRefiner
Controlnet HandRefiner
[LuisaP❤️]SDXL EYES INPAINTING [5MB]
[LuisaP❤️]SDXL EYES INPAINTING [5MB]

No comments

No comments...