Spaces:
Running
on
Zero
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
Clone the repository:
git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git
to your ComfyUIcustom_nodes
directoryThe 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
- Delete the cloned repo in
Update
- Navigate to the cloned repo e.g.
custom_nodes/ComfyUI-Custom-Scripts
git pull
Features
Autocomplete
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.
You can quickly default to danbooru tags using the Load button, or load/manage other custom word lists.
Auto Arrange Graph
Adds a menu option to auto arrange the graph in order of execution, this makes very wide graphs!
Always Snap to Grid
Adds a setting to make moving nodes always snap to grid.
[Testing] "Better" Loader Lists
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:
Adds an "examples" widget to load sample prompts, triggerwords, etc:
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:
Checkpoint/LoRA/Embedding Info
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
Adds a custom color picker to nodes & groups
Favicon Status
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
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.
KSampler (Advanced) denoise helper
Provides a simple method to set custom denoise on the advanced sampler
Lock Nodes & Groups
Adds a lock option to nodes & groups that prevents you from moving them until unlocked
Math Expression
Allows for evaluating complex expressions using values from the graph. You can input INT
, FLOAT
, IMAGE
and LATENT
values.
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
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
Adds a node that lets you save and use text presets (e.g. for your 'normal' negatives)
Quick Nodes
Adds various menu items to some nodes for quickly setting up common parts of graphs
Play Sound
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 web/extensions/pysssss/CustomScripts/assets\notify.mp3
System Notification
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
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
Takes input from a node that produces a string and displays it, useful for things like interrogator, prompt generators, etc.
Show Image on Menu
Shows the current generating image on the menu at the bottom, you can disable this via the settings menu.
String Function
Supports appending and replacing texttidy_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
Allows you to specify default values for widgets when adding new nodes, the values are configured via the settings menu
Workflows
Adds options to the menu for saving + loading workflows:
Workflow Images
Adds menu options for importing/exporting the graph as SVG and PNG showing a view of the nodes
(Testing) Reroute Primitive
Provides a node that allows rerouting primitives.
The node can also be collapsed to a single point that you can drag around.
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
Link Render Mode
Allows you to control the rendering of the links between nodes between straight, linear & spline, e.g. Straight.
Changelog
2023-09-22
Minor
- β¨ Use Civitai image as preview
- π CTRL+Enter on autocomplete will no longer accept the suggestions as it is the shortcut for queuing a prompt.
- π Fix using numbers in widget defaults
- β¨ Support setting node properties (e.g. title, colors) via widget defaults
2023-09-13
New
- β¨ Ability to "send" an image to a Load Image node in either the current or a different workflow
Minor
- β¨ Add support for A1111 autocomplete CSV format
- β¨ Allow setting custom node for middle click to add node
2023-09-10
Minor
- π Fix rendering new lines in workflow image exports
2023-09-08
New
- β¨ Add Load + Save Text file nodes, you can configure the allowed directories in the
user/text_file_dirs.json
file
Minor
- π¨ Show autocomplete alias word on popup
- β¨ Add setting to disable middle click from adding a reroute node
- π¨ Add prompt for setting custom column count on image feed (click the column count label)
2023-09-07
New
- β¨ Support Unicode (e.g. Chinese) and word aliases in autocomplete.
2023-09-05
Minor
- π¨ Disable autocomplete on math node
- π Fix Show Text node always resizing on update
Minor
- π¨ Better adding of preview image to menu (thanks to @zeroeightysix)
- π¨ UX improvements for image feed (thanks to @birdddev)
- π Fix Math Expression expression not showing on updated ComfyUI
2023-08-30
Minor
- π¨ Allow jpeg lora/checkpoint preview images
- β¨ Save ShowText value to embedded image metadata
2023-08-29
Minor
- β¨ Option to auto insert
,
after autocomplete - π¨ Exclude arrow keys from triggering autocomplete
- π Split paths by
\
and/
on Windows for submenus
2023-08-28
New
- β¨ Add custom autocomplete word list setting
- β¨ Support autocomplete word priority sorting
- β¨ Support autocomplete matching anywhere in word rather than requiring starts with
2023-08-27
New
- β¨ Add Checkpoint info
- β¨ Add embedding autocomplete
- β¨ Add embedding info
Major
- β»οΈ Refactor LoRA info
2023-08-26
Minor
- π Fix using text widget values in Math Expression not casting to number
- π¨ Fix padding on lightbox next arrow
2023-08-25
Minor
- β»οΈ Support older versions of python
2023-08-24
Minor
- π Fix extracting links from LoRA info notes
2023-08-23
Major
- π¨ Update to use
WEB_DIRECTORY
feature instead of manual linking/copying web files
2023-08-22
New
- β¨ Math Expression now supports IMAGE and LATENT inputs, to access the dimensions use
a.width
,b.height
- π¨ Removed STRING output on Math Expression, now draws the result onto the node
2023-08-21
New
- β¨ Allow custom note (named {file}.txt) to show in LoRA info
- β¨ Query Civita API using the model hash to provide link
2023-08-20
New
- β¨ Add LoRA Info menu option for displaying LoRA metadata
Minor
- π Fix crash on preset text replacement (thanks to @sjuxax)
2023-08-19
New
- β¨ Add support for importing JPG files with embedded metadata (e.g. from Civitai)
Minor
- π Fix crash on graph arrange where LiteGraph sometimes stores links to deleted nodes
- π Fix a couple of rendering issues in workflow export
2023-08-18
New
- β¨ Add "example" widget to custom LoRA + Checkpoint loader allowing you to quickly view saved prompts, triggers, etc
- β¨ Add quick "Save as Preview" option on images to save generated images for models
2023-08-16
New
- β¨ Add repeater node for generating lists or quickly duplicating nodes
Minor
- π Support quick Add LoRA on custom Checkpoint Loader
- β¨ Support
randomint(min,max)
function in math node - π¨ Use relative imports to support proxied urls not on root path (thanks to @mcmonkey4eva)
2023-08-13
Minor
- β¨ Support
round
floor
ceil
functions in math node - π Fix floor division in math node
2023-08-12
New
- π¨ Image feed now uses a lightbox for showing images
Minor
- π¨ Better loader lists now supports images named
{name}.preview.png
2023-08-11
Minor
- β¨ Enable filter box on submenus
2023-08-05
Major
- π¨ The ComfyUI Lora Loader no longer has subfolders, due to compatibility issues you need to use my Lora Loader if you want subfolers, these can be enabled/disabled on the node via a setting (π Enable submenu in custom nodes)
New
- β¨ Add custom Checkpoint Loader supporting images & subfolders
- β¨ Add Play Sound node for notifying when a prompt is finished
Minor
- β¨ Quick Nodes supports new LoRA loader ("Add π LoRA")
- β»οΈ Disable link render mode if ComfyUI has native support
2023-08-04
Minor
- β¨ Always snap to grid now applies on node resize
- π Fix reroute primitive widget value not being restored on reload
- β¨ Workflows now reuse last filename from load & save - save must be done by the submenu
2023-08-02
New
- β¨ Add "Always snap to grid" setting that does the same as holding shift, aligning nodes to the grid
Minor
- π¨ No longer populates image feed when its closed
- π Allow lock/unlock of multiple selected nodes
2023-08-01
Minor
- π¨ Image feed now uses comfy theme variables for colors
- π Link render mode redraws graph on change of setting instead of requiring mouse move
2023-07-30
- π¨ Update to image feed to make more user friendly, change image size to column count, various other tweaks (thanks @DrJKL)
2023-07-30
Major
- π Fix issue with context menu (right click) not working for some users after Lora script updates
New
- β¨ Add "Custom" option to color menu for nodes & groups
Minor
- π Fix String Function values converted to unconnected inputs outputting the text "undefined"
2023-07-29
New
- β¨ Added Reroute Primitive combining the functionality of reroutes + primitives, also allowing collapsing to a single point.
- β¨ Add support for exporting workflow images as PNGs and optional embedding of metadata in PNG and SVG
Minor
- β¨ Remove new lines in Math Expression node
- β¨ String function is now an output node
- π Fix conflict between Lora Loader + Lora submenu causing the context menu to be have strangely (#23, #24)
- π¨ Rename "SVG -> Import/Export" to "Workflow Image" -> Import/Export
2023-07-27
New
- β¨ Added custom Lora Loader that includes image previews
Minor
- β¨ Add preview output to string function node
- π Updated missing/out of date parts of readme
- π Fix crash on show image on menu when set to not show (thanks @DrJKL)
- π Fix incorrect category (util vs utils) for math node (thanks @DrJKL)
2023-07-27
Minor
- β¨ Save Image Feed close state
- π Fix unlocked group size calculation
2023-07-21 + 22
Minor
- π Fix preset text incompatibility with Impact Pack (thanks @ltdrdata)
2023-07-13
New
- β¨ Add Math Expression node for evaluating expressions using values from the graph
Minor
- β¨ Add settings for image feed location + image order
2023-06-27
Minor
- π Fix unlocking group using incorrect size
- β¨ Save visibility of image feed
2023-06-18
Major Changes
- β¨ Added auto installation of scripts and
__init__
(thanks @TashaSkyUp) - β»οΈ Reworked folder structure
- π¨ Renamed a number of nodes to include
pysssss
to prevent name conflicts - π¨ Remove Latent Upscale By as it is now a built in node in ComfyUI
- π¨ Removed Anime Segmentation to own repo
New
- β¨ Add Link Render Mode setting to choose how links are rendered
- β¨ Add Constrain Image node for resizing nodes to a min/max resolution with optional cropping
- β¨ Add Show Image On Menu to include the latest image output on the menu
- β¨ Add KSamplerAdvanced simple denoise prompt for configuring the node using steps + denoise
- π¨ Add sizing options to Image Feed
Other
- β»οΈ Include canvas2svg for SVG export in assets to prevent downloading at runtime
- π¨ Add background color (using theme color) to exported SVG
- π Fix Manage Widget Defaults to work with new ComfyUI settings dialog
- π Increase Image Feed z-index to prevent node text overlapping