ComfyUI Extension: comfyui-lopi999-nodes

Authored by LaVie024

Created

Updated

3 stars

Utility nodes for some randomness in your workflows, like random latent sizes. A few modifications to a few existing nodes, includes nodes for sampler and model parameters. Also includes two schedulers and four samplers that can be used with any KSampler node.

Custom Nodes (0)

    README

    comfyui-lopi999-nodes

    In general, this is a sort of "general purpose" node suite, with some unique nodes and some modified nodes. This suite adds two schedulers and four samplers to the default Comfy scheduler and sampler lists. The samplers added are extsig modifications to the Euler samplers, which cause them to spend more time in lower sigmas, increasing detail. The two schedulers are covered in more depth later in this README.

    Nodes

    Image Nodes

    Image Nodes

    These two nodes are based on the burn and HSV treatment functions provided by Krita. Good for some post-processing after generating an image.

    Logic Nodes

    Does Exist

    Does Exist

    Returns a boolean value based on whether or not a given output actually exists or not. Useful for adding some logic if a node is bypassed in a workflow.

    Invert Sign

    Invert Sign

    Takes an int and/or a float, and inverts their sign if the mode's condition is met.

    Round Float

    Round Float

    Receives a float, and rounds it to the given number of decimal places. Uses "standard" rounding, not banker's rounding or truncating.

    Random Nodes

    Random Boolean

    Random Boolean

    Straightforward and simple, just generates a True or a False randomly each time. Contains an int output with a selectable range of +n for some added modularity.

    Random Normal Distribution

    Random Normal Distribution

    All current random number generators for Comfy really only give uniform distributions. Why not normal distributions as well? Useful for a more "controlled" randomness in large batches.

    Random SDXL Latent Size

    Random SDXL Latent Size

    This node is sort of the one that started this collection of nodes. It is a fairly straightforward node based heavily on the Empty Latent Picker node from ComfyUI_essentials. Most of the functions are pretty self-explanitory. Landscape and portrait resolutions can either be included or excluded, and one can define what the minimum landscape and the maximum landscape resolutions should be.

    Schedulers

    Schedulers

    Adds two schedulers, Zipf Linear and Zeta. Zipf Linear is really designed to be good for a "flat" look, as it drops heavily down towards low sigmas after only a few steps. Zeta is meant to be a sort of "alternative" to Beta, they work on different distribution types, but overall Zeta appears to have good color depth.

    Both schedulers have a linear drift that goes from high to low x.

    String Nodes

    Advanced Text Switch

    Advanced Text Switch

    Take the text switch node, and use built-in multiline textboxes instead of text inputs, allow for easy randomization and concatenation, and you get the Advanced Text Switch node. Technically should have code to hide textboxes that aren't in use but I guess I wasn't able to get the whale to properly code that in. Otherwise, it is perfectly functional, helps trim down on node counts when using multiple text inputs, and allows for easy randomization. Perfect for switching around artist mixes at random if using Illu/NoobAI models.

    Concatenate With Prefix

    Concatenate With Prefix

    Most concatenation nodes only let you specify a delimiter. Why not a prefix as well? Effortlessly prefixes nodes as well as delimits, with the added ability to have a dynamic counter for the prefix.

    List Wildcard

    List Wildcard

    Intended to be a dead-simple wildcard node that just takes a separator and makes a list out of a given string, and randomly selects an item from the list.

    Parameters to String

    Parameters to String

    Takes some sampler parameters, and converts it into a string. Useful for the extra info input for the Prompt Saver Node if using more than one ksampler.

    Etc.

    Model Parameters

    Model Parameters This does require a bit of explaining. ComfyUI cannot output a tuple to a tuple input unless if both tuples are 1:1. If the tuple is different by even one element, it will refuse to work. I don't know why this is, but it means that there needs to be four outputs to this thing because loaders may expect to have a tuple that contains "None" for the model tuple and "Baked VAE" for the VAE tuple, while nodes like rgthree's context and SD Prompt Saver do not want those.

    This was about the best implementation I could come up with. It allows for both specifying what model a loader should load, and then saving it to metadata.

    SDXL Empty Latent Size Picker v2

    SDXL Empty Latent Size Picker v2 Credits to cubiq for this. Since the essentials suite is pretty much near-abandoned, I still wanted to make an adjustment to the original emtpy latent size picker node. This has much more resolutions to choose from, a resolution multiplier, and the ability to swap resolutions as just a convenience feature.

    Token Counter

    Token Counter Credits to pamparamm for the original code provided here. The current code for ppm's CLIP Token Counter has issues with... just giving a simple, straightforward output. This is based on the old code for that node, with two very slight modifications:

    1. String is now a forced input instead of a multiline string being built into the node
    2. The node can now output an int as well as a string, useful for manipulation if needed.

    NOTE: Only works for SD1.5 and SDXL CLIP outputs.