rgthree-comfy
repository·main·Indexed 23 days ago
https://github.com/rgthree/rgthree-comfyA collection of utility nodes and workflow improvements for ComfyUI designed to make workflows cleaner, faster, and more intuitive. It includes specialized nodes such as Seed, Reroute, Bookmark, Context, Image Comparer, Power Lora Loader, Power Prompt, and various 'Fast' muter/bypasser tools for efficient workflow management and GPU resource optimization.
What's inside rgthree-comfy
- These nodes act as a 'control panel' or 'dashboard' for connected nodes. They collect all connected nodes into a single interface, allowing you to quickly toggle them between enabled and muted (for Fast Muter) or enabled and bypassed (for Fast Bypasser).
Use Label for visual workflow organization
mainThe Label node is a purely visual element for adding floating text to your workflow.
Customization via Properties:
- Text: Use the
Titleproperty. Supports\nfor newlines. You can enter multiline text by usingShift + Enterin the properties panel. - Styling: Adjust font size, font family, font color, text alignment, background color, padding, background border radius, and angle (in degrees).
- Colors: Use hexadecimal strings (e.g.,
#FFFFFF). You can add 7th and 8th characters for transparency (e.g.,#FFFFFF88for semi-transparent white).
Workflow Tips:
- Use ComfyUI's native "pin" option (right-click menu) to make the label stick to the workflow so clicks pass through it.
- Double-click the node to open the properties panel.
- Text: Use the
Use typed ComfyUI scripts in custom extensions
mainThe
rgthree-comfypackage provides dummy TypeScript files that declare and export ComfyUI's internal script files. This allows you to access ComfyUI's core objects (likeapp) with full type safety without needing to symlink to the actual implementation files.To use these types in your code located within the
comfyui/directory, import from the browser path/scripts/app.js. The__build__.pyscript is responsible for rewriting these imports to the correct relative browser paths during the build process.Implement efficient workflows using Muting and Context Switches
mainTo prevent wasted GPU cycles, use Muting in conjunction with Context Switch nodes.
The Logic of Muting: ComfyUI processes workflows by moving backwards from the output nodes. To stop a specific path from executing, you must mute the output node (or a node late in that path) rather than the starting node. If an output node is muted, the graph will not walk back into that path, saving resources.
Recommended Pattern: Context + Context Switch + Fast Muter
- Feed context inputs into a Context Switch node in order of preference (e.g.,
Upscale Outcontext first, then a standardBasecontext). - Place a Fast Muter in your workflow to toggle these context nodes.
- When you mute a high-priority context node (like
Upscale Out), the Context Switch will fall back to the next available context, and the nodes associated with the muted path will not be executed.
- Feed context inputs into a Context Switch node in order of preference (e.g.,
Use Node Collector
mainThe Node Collector is used to clean up 'noodles' (connections) in your workflow. It accepts any number of input nodes and passes them along to another node.
⚠️ Warning: It is recommended to only connect this to Fast Muter, Fast Bypasser, or Mute / Bypass Relay to avoid breaking workflow execution.
Use the Link Fixer tool
mainIf your workflows have missing connections or errors upon loading, you can use the built-in Link Fixer.
- Start ComfyUI.
- Navigate to
http://127.0.0.1:8188/rgthree/link_fixerin your browser. - Drop in an image or workflow JSON file to check for and fix bad links.
You can also enable a link fixer check in the
rgthree-comfysettings to receive an alert automatically when loading a workflow with bad linking data.Use Mute / Bypass Repeater
mainThe Mute / Bypass Repeater dispatches its mode (Mute, Bypass, or Active) to all connected input nodes. If the node is in a group and has no connected inputs, it will dispatch the mode change to all nodes in that group.
Usage Tips:
- Connect the output to a Fast Muter or Fast Bypasser to create a single-click dashboard for many nodes.
- Connect a Mute / Bypass Relay to its inputs to have the relay automatically dispatch mode changes to the repeater.
Use Fast Groups Muter and Bypasser
mainThe Fast Groups Muter is an input-less node that automatically collects all groups in your current workflow. It allows you to quickly mute or unmute all nodes within a group via a dashboard. The Fast Groups Bypasser performs the same function but sets connected nodes to 'Bypass' instead of 'Mute'.
You can customize group visibility and behavior via the node Properties (right-click the node and select "Properties" or "Properties Panel"):
matchColors: Only add groups that match specific colors (e.g.,red,pale_blue, or hex codes like#a4d399). Multiple values can be comma-delimited.matchTitle: Filter the list of toggles by a string match or regular expression.showNav: Adds/removes a quick navigation arrow to jump to the group (default:true).showAllGraphs: Shows groups from all [sub]graphs (default:true).sort: Sorts toggles byalphanumeric, graphposition, orcustom alphabet(default:position).customSortAlphabet: Defines a custom sorting order based on the beginning of group names (e.g.,sdxl,pro,sd,n,p).toggleRestriction: Restricts the number of enabled widgets to a maximum of one or always exactly one. Note that this is only enforced when clicking the toggle on this specific node.
Use Mute / Bypass Relay
mainThe Mute / Bypass Relay is an advanced node that relays the modes (Mute, Bypass, or Active) of its input nodes to a connected Mute / Bypass Repeater.
Default Behavior (when inputs are connected):
- When all connected input nodes are muted, the relay sets the repeater to mute.
- When all connected input nodes are bypassed, the relay sets the repeater to bypass.
- When any connected input nodes are active, the relay sets the repeater to active.
Advanced Configuration:
- If no inputs are connected, the relay sets the repeater to its mode when the relay's own mode is changed.
- You can configure an inverse relay via the
Properties(e.g., sending a MUTE signal when any input is active).
Use Fast Actions Button
mainThe Fast Actions Button allows you to semi-automate connected nodes or ComfyUI actions. When the button is pressed, it can mute, bypass, or enable connected nodes. Certain nodes (like theSeednode) can perform additional actions likeRandomize Each TimeorUse Last Queued Seed. You can also assign a shortcut key in the node properties to trigger these actions without clicking.Queue Selected Output Nodes (rgthree)
mainTo execute only specific paths in a workflow without running the entire graph, right-click on an output node and select
Queue Selected Output Nodes (rgthree).Usage Notes:
- You must select the specific output nodes you wish to execute.
- Only the paths connected to the selected output nodes are traversed; other selected nodes that are not part of those paths will be ignored.
- The entire workflow is serialized before being trimmed for the backend. This means certain nodes, such as seed random/increment/decrement nodes, may still run even if their output is not ultimately sent to the backend.
Install rgthree-comfy
mainTo install rgthree-comfy, you must have ComfyUI installed. Clone the repository directly into your
custom_nodesdirectory:- Navigate to your ComfyUI
custom_nodesfolder. - Clone the repository using git.
- Restart ComfyUI.
cd ComfyUI/custom_nodes git clone https://github.com/rgthree/rgthree-comfy.git- Navigate to your ComfyUI