sn0w-scripts
A collection of nodes and improvements created for general ease and testing loras. These are just nodes I made and found useful, they should work with most other nodes. Most nodes that take in a prompt are made with booru tags in mind and might not work as expected with other prompts.
Get Started
Install
- Install ComfyUi.
- Clone this repo into
custom_nodes:git clone https://github.com/sn0w12/ComfyUI-Sn0w-Scripts - Start up ComfyUI.
Configuration
The sn0w-scripts project utilizes a configuration file named config.json to manage various settings that influence the behavior of the nodes. This configuration allows for a customizable experience and enables features to be toggled on or off as needed.
Important Note
Many of the nodes require these paths to be in your extra_model_paths.yaml (with your real directories of course).
- loras_xl: C:/path/XL
- loras_15: C:/path/1.5
Creating the Configuration File
To get started, create a config.json file in the root directory of the sn0w-scripts project, or simply change the name of config.json.example. Here's a basic example of what this file might look like:
{
"logging_level": "GENERAL",
"animagine_formatting": "TRUE",
"excluded_lora_folders": "character, concept",
"custom_lora_loaders": {
"name": "concept"
},
"custom_lora_loaders_xl": {
"name": "style",
"name": "pony/style"
},
"sort_characters_by_series": false
}
Configuration Options
Below is a table detailing the configuration options available in config.json, their possible values, and their default settings.
| Option | Description | Possible Values | Default |
|---|---|---|---|
logging_level |
Determines the verbosity of logs generated by the scripts. | NONE, GENERAL, ALL |
GENERAL |
animagine_formatting |
Enables or disables specific formatting rules for prompts, such as prioritizing certain tags. | TRUE, FALSE |
FALSE |
excluded_lora_folders |
Removes folders from custom lora loaders. Folders are seperated by comma. | any string |
None |
custom_lora_loaders(_xl) |
Creates custom lora loaders, filtering out all folders except ones in the config. | any string |
None |
Nodes
Find Resolution
An easy way to select a width and height.
Lora Selector
Automatically selects X amount of loras between two numbers.
ℹ️ See More Information
- Loras have to be formatted like the default kohya_ss outputs. (lora_name-000001)
- Select the first lora.
- Select the number of the highest lora you want to test.
- Select the amount of loras you want to test.
- Outputs list of loras like this: <lora:name:strength>
- Add default generation adds an extra "nothing" at the end of the list, used in Lora Tester to generate an image without the lora.
Lora Tester (XL)
Automatically generates X amount of images with provided loras.
Character Selector
Outputs a character name and prompt.
Prompt Combine
Combines multiple strings with a specified separator and optionally simplifies the result by removing redundant or incompatible tags.
ℹ️ See More Information
- If simplify is enabled, the simplification process identifies and removes redundant tags (e.g., when a tag is fully encompassed by another, more descriptive tag) and tags incompatible with factors such as facing away, covered eyes, etc. Any tags that are in parentheses will not be removed.
- Simplify will also move 1girl/ 1boy to the front of the prompt to be in line with animagine 3's tagging.
Lora Stacker
Outputs a list of loras for Lora Tester. Does not load any loras by itself.
Load Lora XL/1.5
Normal load lora but from another folder.
Load Lora Folder
Dynamically applies Lora models based on similarity to a provided prompt.
ℹ️ See More Information
- This node processes a given prompt to identify and apply the most similar Lora models of the tags found in the prompt.
- For each part of the prompt, the node calculates a distance between tags and available Lora model filenames. Models with a difference of under 5 are applied to the input
modelandclip.- Example folder input:
*master_folder, subfolder1:3, -excludefolder, subfolder2
*master_folderspecifies all paths must includemaster_folder.subfolder1:3indicates up to 3 models fromsubfolder1can be loaded.-excludefolderensures any path containingexcludefolderis ignored.subfolder2loads models from this subfolder without a numeric limit.- Note: You need the loras separated into XL and 1.5 as stated in the
Important Note.- Note: Loras need to be named very similarly to the tag, with at most 5 characters different. Words in the lora filename can be separated by spaces or underscores.
Get Font Size Node
Estimates the optimal font size for text to fit within an image based on Lora information.
Example Workflows
Lora Tester
Note: Uses ImagesGrid for making the actual grid from the image output.










