No description
Find a file
2025-11-03 14:44:03 +01:00
images Added new nodes 2025-10-06 01:40:43 +02:00
.gitignore Ugh. The __pycache__. Added gitignore to handle this. 2025-09-28 00:00:13 +02:00
__init__.py Added new Nodes for my personal help. Documentation follow asap 2025-11-03 14:44:03 +01:00
db.json Added new Nodes for my personal help. Documentation follow asap 2025-11-03 14:44:03 +01:00
lora.py Initial commit 2025-09-25 19:55:31 +02:00
patterns.json Added new Nodes for my personal help. Documentation follow asap 2025-11-03 14:44:03 +01:00
prompt_expander.py Added new Nodes for my personal help. Documentation follow asap 2025-11-03 14:44:03 +01:00
README.md Update file README.md 2025-10-05 23:42:39 +00:00
utility.py Added new Nodes for my personal help. Documentation follow asap 2025-11-03 14:44:03 +01:00

comfyUI-viisUtilityNodes

What is this?

These ComfyUI Nodes were created by me based off of other Nodes to enhance some of my own workflows.

LoRA Nodes

Apply LoRA and extract path

Lora Node 1

Applies a LoRA to a Model and CLIP like a normal Node, but can also extract the path of the LoRA

Apply LoRA and extract name and trigger words

Lora Node 3

Applies a LoRA like you'd expect, but also extracts the name of the LoRA and it's triggerwords (if any).

Lora Info

Lora Node 2

If you can't be bothered with replacing all your LoRA Nodes with mine, this node will provide the extra information. Input needs to be the LoRA name or path.

Utility Nodes

Check List for null

List Check 1

This takes in a list and checks if it is null. Will return an empty List, if so or the full list, if it has items. This will prevent nodes further down to error if you encounter nullable lists in your workflow.

Check List for null and return first item

List Check 2

Sometimes you'd only want the first item of a list that is nullable. Will return an empty item or the first item in the list.

Prompt Expander

Prompt Expander

Now this node was made by me because I couldn't find any that fit my needs. What this Node does, it takes an input text with a script language that is similar to the wildcard one widely used in ComfyUI and uses functions (currently only var and exp) to expand a prompt into a full string. So you can easily program, say, a bunch of negative prompts to control your image generation.

Examples

$exp({red|green|blue}_shorts)

This will produce

red_shorts, green_shorts, blue_shorts

You can also use more than one bracket block

$exp({red|green|blue}_{shirt|trousers|hoodie})

This will result in

red_shirt, red_trousers, red_hoodie, green_shirt, green_trousers,
green_hoodie, blue_shirt, blue_trousers, blue_hoodie

And you can also define variables so you needn't write too many bracket blocks

$var(color={red|white|black|green|brown|orange|pink|blue|yellow})
$var(apparel={hoodie|pants})
$exp(${color}_${apparel}

This will produce

red_hoodie, red_pants, white_hoodie, white_pants, black_hoodie,
black_pants, green_hoodie, green_pants, brown_hoodie, brown_pants,
orange_hoodie, orange_pants, pink_hoodie, pink_pants, blue_hoodie,
blue_pants, yellow_hoodie, yellow_pants

And that's it so far. I also plan on adding more functions as I encounter new problems.

Prompt Cleaner

Prompt Cleaner

Now I'm pretty sure this Node has already been implemented somewhere, but since I was already on the go, this will clean up a List of Tags (String with ',' or a List of Strings). It will remove dupes, preferring higher weighted tags over lower weighted ones. It also prefers tags with '' in them over those without (can be toggled to invert). It can also sort the List alphabetically and can replace all ' ' with ''.

Tag Filter

Prompt Filter

This node will remove any tag from the source string that is present in the exclude String. It will recognize weighted tags as well.

Tag Extractor

Prompt Extractor

This will extract Tags from a prompt that fulfill rules specified in "patterns.json"

{
  "matches": [
    {
      "match": "face",
      "patterns": ["*face*", "*mask*","*horns","freckles","*_on_face","*_on_lips","*_on_nose","nose*","*makeup","*expression"]
    },
    {
      "match": "eyes",
      "patterns": ["*_eyes", "eye_*","*_iris","*_pupils"]
    },
    {
      "match": "hair",
      "patterns": ["*_hair", "hair_*","*ponytail*","*horns"]
    }
    ]
}

This will extract any tag that matches the pseudo-RegEx specified above (* will evaluate into .* when matching). This way, you can specify Lists of Tags that will also be used in other prompts further down a pipeline without either having to type them all by hand nor changing tags at several positions.