rgthree-comfy

repository·main·Indexed 23 days ago

https://github.com/rgthree/rgthree-comfy

A 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.

Tokens
3.5K
Snippets
2
Records
27
Agent score
36%

What's inside rgthree-comfy

  1. Use Fast Muter and Fast Bypasser

    main
    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).
  2. Use Label for visual workflow organization

    main

    The Label node is a purely visual element for adding floating text to your workflow.

    Customization via Properties:

    • Text: Use the Title property. Supports \n for newlines. You can enter multiline text by using Shift + Enter in 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., #FFFFFF88 for 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.
  3. Use typed ComfyUI scripts in custom extensions

    main

    The rgthree-comfy package provides dummy TypeScript files that declare and export ComfyUI's internal script files. This allows you to access ComfyUI's core objects (like app) 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__.py script is responsible for rewriting these imports to the correct relative browser paths during the build process.

  4. Implement efficient workflows using Muting and Context Switches

    main

    To 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

    1. Feed context inputs into a Context Switch node in order of preference (e.g., Upscale Out context first, then a standard Base context).
    2. Place a Fast Muter in your workflow to toggle these context nodes.
    3. 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.
  5. Use Node Collector

    main

    The 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.

  6. Use the Link Fixer tool

    main

    If your workflows have missing connections or errors upon loading, you can use the built-in Link Fixer.

    1. Start ComfyUI.
    2. Navigate to http://127.0.0.1:8188/rgthree/link_fixer in your browser.
    3. 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-comfy settings to receive an alert automatically when loading a workflow with bad linking data.

  7. Use Mute / Bypass Repeater

    main

    The 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.
  8. Use Fast Groups Muter and Bypasser

    main

    The 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 by alphanumeric, graph position, or custom 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.
  9. Use Mute / Bypass Relay

    main

    The 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).
  10. Use Fast Actions Button

    main
    The 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 the Seed node) can perform additional actions like Randomize Each Time or Use Last Queued Seed. You can also assign a shortcut key in the node properties to trigger these actions without clicking.
  11. Queue Selected Output Nodes (rgthree)

    main

    To 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.
  12. Install rgthree-comfy

    main

    To install rgthree-comfy, you must have ComfyUI installed. Clone the repository directly into your custom_nodes directory:

    1. Navigate to your ComfyUI custom_nodes folder.
    2. Clone the repository using git.
    3. Restart ComfyUI.
    cd ComfyUI/custom_nodes
    git clone https://github.com/rgthree/rgthree-comfy.git