Dual-renderer rework of select rgthree-comfy features for ComfyUI Nodes 2.0 (Vue renderer) with legacy LiteGraph support.
rgthree-comfy's custom canvas-drawn widgets break under Nodes 2.0 (fields stack, properties won't open, dynamic widgets freeze. See rgthree-comfy issues #632, #714, #797). This plugin reimplements those features using DOM widgets and official extension hooks, which render natively in both renderers.
Condensed multi-LoRA loader:
- Add unlimited lora rows (
Add Lora), each with on/off toggle, lora chooser, and strength control (-/ value /+or type directly). - Node right-click menu: Show Strengths > Single Strength or Separate Model & Clip.
- Right-click a row: toggle, move up/down, remove.
- Header ALL ON / ALL OFF toggle.
- Muted/bypassed state persists across save/load (fixes rgthree #797).
Connect any nodes to its inputs. Each connected node appears as a toggle row. Click a row to mute (or bypass) that node. Right-click the node for Enable all / Disable all / Toggle all. Rows rebuild automatically as connections change, and follow through Reroute / Collector / Combiner passthrough nodes. Row labels and states follow source renames and mode changes live.
A passthrough fan-in: bundle many nodes behind a single * output. Downstream
nodes (e.g. a Fast Muter) see the collected nodes as their real connections.
A master switch: when its own mode (Always / Mute / Bypass) changes, it repeats that mode to every node connected to its inputs. If nothing is connected but it sits inside a group, it applies to the whole group.
Watches the mode of the nodes connected to its inputs and drives a connected Repeater with the result (all muted: MUTE, all bypassed: BYPASS, any active: ACTIVE). The mapping is configurable per mode via properties. With no inputs it acts as a plain mode forwarder.
Each time a prompt is queued, temporarily unmutes one randomly-chosen connected node (which must be muted) for the duration of the prompt, then mutes it back. All connected nodes must be muted for it to act.
Lists every group in the workflow as a toggle row. Clicking one mutes (or
bypasses) all nodes inside that group. The toggle reflects whether the group has
any active nodes. Right-click for Enable all / Disable all / Toggle
all. Set the matchTitle property to filter which groups appear. Row titles
and states follow group renames and member mode changes live.
Routes one of several any-type inputs to a single any output. Inputs form a
pool of any_01, any_02, ... that starts at five, grows as more sources
connect, and always keeps one free slot (it never shrinks below five). All
inputs are retyped to the connected type. The selection combo picks the
routing rule:
- Non-empty (default): the backend returns the first input that is not empty.
- Active source: at build time only the first input whose source node is active (not muted / not bypassed) is kept, so that one is routed.
Mute or bypass a source to switch which input wins in active source mode.
Compares two images with a wipe slider. Connect image_left and image_right.
On execution both sides are saved and displayed side-by-side with a draggable
divider. The left image shows fully by default. Hover over the stage to reveal
the handle and slide to compare. Multi-image batches get prev/next navigation.
The right image passes through as the IMAGE output.
These are always-on behaviors, not nodes:
- Auto-nest combo menus: model/VAE/clip combo dropdowns that list files
with subdirectory paths are split into folder submenus (folders show a folder
prefix), so long flat lists become navigable trees. Files without a path are
listed as-is. Dotfiles (names starting with
.— e.g..DS_Store,._*.safetensors) are excluded from file-list menus. In the legacy renderer, these dark menus also get a proper hover highlight (ComfyUI's dark menu CSS suppresses it) and the first folder no longer stays highlighted after opening.
cd ComfyUI/custom_nodes
git clone https://github.com/yusrmuttaqien/comfyui-comfort-plugin.git
# restart ComfyUINo build step needed. Built JS is committed in web/.
npm install
npm run build # outputs web/comfort.js + web/comfort.cssBuilt output is committed. Users clone-and-go.
- All custom widgets are DOM widgets (
node.addDOMWidget): legacy LiteGraph positions them directly. Nodes 2.0 mounts the same element viaWidgetDOM. - No
LGraphNode/LGraphCanvasprototype patching. Only official extension hooks (nodeCreated,getNodeMenuItems). The exceptions are build-time behavior: the Random Unmuter wrapsapp.queuePrompt/app.graphToPrompt(ComfyUI exposes no official queue/execute hook), and Any Router wrapsapp.graphToPromptto apply its routing rule when the prompt is built. - Per-node state lives in a
WeakMapkeyed by node instance (node instances are destroyed/recreated on tab switch and subgraph navigation). - Node sizing: the initial size is set once at first add (fixed for most
nodes, computed from content for Any Router). Loading a workflow restores
the saved size verbatim; no node ever auto-resizes on content changes.
User controls size by dragging; content scrolls via
overflow-y: autoif the node is too small. node.modeis intercepted per-instance (Object.defineProperty) soonModeChangefires: it delegates to the_state.modeaccessor in Nodes 2.0 and to a private field in legacy LiteGraph.- Live updates without polling: comfort nodes that display other nodes' or
groups' titles or modes install one-time property interceptors on those
sources (
Object.defineProperty); any change (UI rename/mute, workflow load, scripts) coalesces into a single animation-frame refresh of the affected nodes. Structural changes (group/node add or remove, drags) are picked up via per-graphon_change/add/removehooks. No timers.
See CHANGELOG.md.