/ComfyUI-Custom-Scripts

Enhancements & experiments for ComfyUI, mostly focusing on UI features

Primary LanguageJavaScriptMIT LicenseMIT

ComfyUI-Custom-Scripts

⚠️ While these extensions work for the most part, i'm very busy at the moment and so unable to keep on top of everything here, thanks for your patience!

Installation

  1. Clone the repository: git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git
    to your ComfyUI custom_nodes directory

    The script will then automatically install all custom scripts and nodes.
    It will attempt to use symlinks and junctions to prevent having to copy files and keep them up to date.

  • For uninstallation:
    • Delete the cloned repo in custom_nodes
    • Ensure web/extensions/pysssss/CustomScripts has also been removed

Update

  1. Navigate to the cloned repo e.g. custom_nodes/ComfyUI-Custom-Scripts
  2. git pull

Features

Autocomplete

image
Provides embedding and custom word autocomplete. You can view embedding details by clicking on the info icon on the list.
Define your list of custom words via the settings.
image
You can quickly default to danbooru tags using the Load button, or load/manage other custom word lists.
image

Auto Arrange Graph

image
Adds a menu option to auto arrange the graph in order of execution, this makes very wide graphs!

Always Snap to Grid

image
Adds a setting to make moving nodes always snap to grid.

[Testing] "Better" Loader Lists

image
Adds custom Lora and Checkpoint loader nodes, these have the ability to show preview images, just place a png or jpg next to the file and it'll display in the list on hover (e.g. sdxl.safetensors and sdxl.png).
Optionally enable subfolders via the settings:
image
Adds an "examples" widget to load sample prompts, triggerwords, etc:
image
These should be stored in a folder matching the name of the model, e.g. if it is loras/add_detail.safetensors put your files in as loras/add_detail/*.txt
To quickly save a generated image as the preview to use for the model, you can right click on an image on a node, and select Save as Preview and choose the model to save the preview for:
image

Checkpoint/LoRA/Embedding Info

image image
Adds "View Info" menu option to view details about the selected LoRA or Checkpoint. To view embedding details, click the info button when using embedding autocomplete.

Constrain Image

Adds a node for resizing an image to a max & min size optionally cropping if required.

Custom Colors

image
Adds a custom color picker to nodes & groups

Favicon Status

image image
Adds a favicon and title to the window, favicon changes color while generating and the window title includes the number of prompts in the queue

Image Feed

image Adds a panel showing images that have been generated in the current session, you can control the direction that images are added and the position of the panel via the ComfyUI settings screen and the size of the panel and the images via the sliders at the top of the panel.
image

KSampler (Advanced) denoise helper

Provides a simple method to set custom denoise on the advanced sampler
image image

Math Expression

Allows for evaluating complex expressions using values from the graph. You can input INT, FLOAT, IMAGE and LATENT values.
image
Other nodes values can be referenced via the Node name for S&R via the Properties menu item on a node, or the node title.
Supported operators: + - * / (basic ops) // (floor division) ** (power) ^ (xor) % (mod)
Supported functions floor(num, dp?) floor(num) ceil(num) randomint(min,max)
If using a LATENT or IMAGE you can get the dimensions using a.width or a.height where a is the input name.

Node Finder

image
Adds a menu item for following/jumping to the executing node, and a menu to quickly go to a node of a specific type.

Preset Text

image
Adds a node that lets you save and use text presets (e.g. for your 'normal' negatives)

Quick Nodes

image
Adds various menu items to some nodes for quickly setting up common parts of graphs

Play Sound

image
Plays a sound when the node is executed, either after each prompt or only when the queue is empty for queuing multiple prompts.
You can customize the sound by replacing the mp3 file ComfyUI/custom_nodes/ComfyUI-Custom-Scripts/web/js/assets/notify.mp3

System Notification

image image

Sends a system notification via the browser when the node is executed, either after each prompt or only when the queue is empty for queuing multiple prompts.

[WIP] Repeater

image Node allows you to either create a list of N repeats of the input node, or create N outputs from the input node.
You can optionally decide if you want to reuse the input node, or create a new instance each time (e.g. a Checkpoint Loader would want to be re-used, but a random number would want to be unique) TODO: Type safety on the wildcard outputs to require match with input

Show Text

image
Takes input from a node that produces a string and displays it, useful for things like interrogator, prompt generators, etc.

Show Image on Menu

image
Shows the current generating image on the menu at the bottom, you can disable this via the settings menu.

String Function

image
Supports appending and replacing text
tidy_tags will add commas between parts when in append mode.
replace mode supports regex replace by using /your regex here/ and you can reference capturing groups using \number e.g. \1

Touch Support

Provides basic support for touch screen devices, its not perfect but better than nothing

Widget Defaults

image
Allows you to specify default values for widgets when adding new nodes, the values are configured via the settings menu
image

Workflows

Adds options to the menu for saving + loading workflows:
image

Workflow Images

image
Adds menu options for importing/exporting the graph as SVG and PNG showing a view of the nodes

(Testing) Reroute Primitive

image Provides a node that allows rerouting primitives.
The node can also be collapsed to a single point that you can drag around.
image
Warning: Don't use normal reroutes or primitives with these nodes, it isn't tested and this node replaces their functionality.



WD14 Tagger

Moved to: https://github.com/pythongosssss/ComfyUI-WD14-Tagger

Lock Nodes & Groups

This is now a standard feature of ComfyUI
Adds a lock option to nodes & groups that prevents you from moving them until unlocked