Extensions/RuYi-Nodes
ComfyUI Extension

RuYi-Nodes

A collection of practical custom nodes for ComfyUI.

By RuYi-Xiao·Created 14 days ago·Updated 14 days ago· 3
RuYi-Xiao/RuYi-Nodes
Nodes3
On cloudLocal install
CategoryRuYi-Nodes/loaders, RuYi-Nodes/text
Stars3
Updated14 days ago
Readme

RuYi-Nodes

English | 简体中文

A lightweight collection of practical custom nodes for ComfyUI.
面向 ComfyUI 的轻量实用自定义节点合集。

RuYi-Nodes 的开发依靠 ChatGPT 辅助编程完成。
RuYi-Nodes was developed through ChatGPT-assisted coding.


English

RuYi-Nodes is a lightweight collection of practical ComfyUI custom nodes for workflow utilities, LoRA handling, text inspection, and other useful tools.

RuYi Multi-LoRA Loader

Highlights

  • Manage multiple LoRAs inside a single node.
  • Enable or disable each LoRA independently.
  • Independent MODEL / CLIP strengths in the full loader.
  • Reorder and delete LoRAs, or toggle all entries at once.
  • In-node preview thumbnails.
  • Searchable LoRA picker with separate Folder and Base model filters.
  • Per-node Show N LoRAs viewport control (3 by default, 0 = unlimited).
  • Optional trigger-word output with de-duplication across enabled LoRAs.
  • Per-LoRA Output trigger toggle controls whether that LoRA contributes trigger words to the STRING output.
  • Trigger Words preview with copy action.
  • Metadata-aware display for usage tips, notes, source links, base model and recommended weights.
  • English and Simplified Chinese localization.
  • No additional Python packages are required beyond the libraries already used by a normal ComfyUI installation.

Recommended companion: ComfyUI-Lora-Manager

RuYi-Nodes works independently for normal multi-LoRA loading.

For preview images, trigger words, base-model information, recommended weights, notes, usage tips and source links, ComfyUI-Lora-Manager is recommended. RuYi-Nodes reads the .metadata.json sidecar files generated by LoRA Manager.

Expected sidecar layout:

my_lora.safetensors
my_lora.metadata.json
my_lora.jpeg

LoRA metadata sidecar example

Currently, LoRA Manager's .metadata.json format is supported. If metadata is unavailable, normal LoRA loading still works.

Included nodes

| Node | Input | Output | Purpose | | --- | --- | --- | --- | | RuYi multi-Lora-loader | MODEL, CLIP | MODEL, CLIP, trigger_words | Load multiple LoRAs with independent MODEL and CLIP strengths. | | RuYi multi-Lora-loader (model only) | MODEL | MODEL, trigger_words | Load multiple LoRAs into MODEL only; useful for Krea2 / Flux-style workflows. | | RuYi text-preview | STRING | STRING | Display the complete input STRING after execution and pass it through unchanged. |

Installation

Option A — Git clone (recommended)

Open a terminal in ComfyUI/custom_nodes and run:

git clone https://github.com/RuYi-Xiao/RuYi-Nodes.git

Restart ComfyUI after installation.

To update later:

cd RuYi-Nodes
git pull

Option B — Manual ZIP installation

  1. Download the repository ZIP from GitHub.
  2. Extract it into your ComfyUI custom_nodes directory.
  3. Make sure the final directory is named RuYi-Nodes and contains __init__.py directly inside it.
  4. Restart ComfyUI.

After restarting ComfyUI, search for:

RuYi multi-Lora-loader
RuYi multi-Lora-loader (model only)
RuYi text-preview

Quick Start

  1. Add a RuYi multi-LoRA loader and connect MODEL / CLIP as required.
  2. Click Add LoRA and select your LoRAs.
  3. Adjust strengths and enable Output trigger where needed.
  4. Connect trigger_words to your prompt workflow if required.
  5. Use RuYi text-preview to inspect the final STRING.

LoRA Picker

Search and filter LoRAs by Folder or Base model, with previews when available.

RuYi LoRA Picker

Trigger-word output

Both LoRA loaders expose an optional trigger_words STRING output.

For each enabled LoRA, Output trigger determines whether its trigger words are included. Trigger words from all selected entries are combined and de-duplicated.

Leaving trigger_words unconnected is valid and does not affect LoRA loading.

A common prompt workflow is:

Main prompt STRING ───────────┐
                              ├─ STRING concatenate / combine ──> final prompt STRING
RuYi trigger_words STRING ───┘
                                                    │
                                                    └─> RuYi text-preview

Use RuYi text-preview to inspect the final merged prompt and trigger words.

Krea2 / model-only workflow

For Krea2-style workflows where LoRAs are applied to MODEL only, use:

MODEL / UNET
    │
    ▼
RuYi multi-Lora-loader (model only)
    │
    ▼
MODEL

Keep the text encoder / CLIP path separate unless your workflow specifically requires otherwise.

Changelog

See CHANGELOG.md for version history.

License

RuYi-Nodes is released under the MIT License.


简体中文

RuYi-Nodes 是一组轻量、实用的 ComfyUI 自定义节点,主要用于工作流辅助、LoRA 管理、文本监视及其他实用功能。

RuYi 多 LoRA 加载器

主要功能

  • 在单个节点内管理多个 LoRA。
  • 每个 LoRA 可独立启用或停用。
  • 完整版加载器可分别设置 MODEL / CLIP 权重。
  • 支持上移、下移、删除以及全部开关。
  • 节点内显示 LoRA 预览图。
  • 可搜索的 LoRA 选择器,并分别提供文件夹基础模型筛选。
  • 每个节点独立设置显示 N 个 LoRA(默认 30 表示无限制展开)。
  • 可选的触发词 STRING 输出,并自动去重。
  • 每个 LoRA 的输出触发词开关独立决定其触发词是否加入输出。
  • 节点内显示触发词并提供复制按钮。
  • 可显示使用说明、附加备注、来源链接、基础模型与推荐权重等元数据。
  • 支持英文 / 简体中文本地化。
  • 除正常 ComfyUI 已使用的库外,不需要额外安装 Python 依赖。

推荐配套:ComfyUI-Lora-Manager

RuYi-Nodes 可独立完成正常的多 LoRA 加载。

如需预览图、触发词、基础模型信息、推荐权重、使用说明、附加备注和来源链接,推荐配合 ComfyUI-Lora-Manager 使用。RuYi-Nodes 会读取 LoRA Manager 生成的 .metadata.json sidecar 元数据文件。

预期的 sidecar 文件结构:

my_lora.safetensors
my_lora.metadata.json
my_lora.jpeg

LoRA 元数据文件示例

目前支持 LoRA Manager 使用的 .metadata.json 元数据格式。即使没有元数据,正常的 LoRA 加载仍可使用。

包含的节点

| 节点 | 输入 | 输出 | 用途 | | --- | --- | --- | --- | | RuYi multi-Lora-loader | MODELCLIP | MODELCLIPtrigger_words | 同时加载多个 LoRA,并分别控制 MODEL 与 CLIP 权重。 | | RuYi multi-Lora-loader(仅模型) | MODEL | MODELtrigger_words | 仅向 MODEL 加载多个 LoRA,适合 Krea2 / Flux 一类仅模型 LoRA 工作流。 | | RuYi 文本监视 | STRING | STRING | 执行后显示完整输入文本,并将 STRING 原样继续输出。 |

安装

方法 A — Git clone(推荐)

ComfyUI/custom_nodes 目录打开终端:

git clone https://github.com/RuYi-Xiao/RuYi-Nodes.git

安装完成后重启 ComfyUI。

以后更新只需:

cd RuYi-Nodes
git pull

方法 B — 手动下载 ZIP

  1. 在 GitHub 下载仓库 ZIP。
  2. 解压到 ComfyUI 的 custom_nodes 目录。
  3. 确认最终文件夹名称为 RuYi-Nodes,且 __init__.py 直接位于该目录内。
  4. 重启 ComfyUI。

重启后可以搜索:

RuYi multi-Lora-loader
RuYi multi-Lora-loader (model only)
RuYi 文本监视

快速开始

  1. 添加 RuYi 多 LoRA 加载器,并按需要连接 MODEL / CLIP
  2. 点击添加 LoRA选择模型。
  3. 调整权重,并按需要开启输出触发词
  4. 如需自动加入触发词,将 trigger_words 接入提示词流程。
  5. 可使用 RuYi 文本监视查看最终 STRING。

LoRA 选择器

可按文件夹基础模型搜索和筛选 LoRA,并在可用时显示预览图。

RuYi LoRA 选择器

触发词输出

两个 LoRA 加载器都会提供一个可选的 trigger_words STRING 输出。

对于每个已启用的 LoRA,输出触发词决定它的触发词是否加入最终 STRING。多个 LoRA 的触发词会合并并自动去重。

trigger_words 不连接任何节点也不会报错,也不会影响 LoRA 本身的加载。

一种常见连接方式:

主提示词 STRING ─────────────┐
                              ├─ STRING 合并节点 ──> 最终提示词 STRING
RuYi trigger_words STRING ───┘
                                           │
                                           └─> RuYi 文本监视

可使用 RuYi 文本监视检查最终合并后的提示词和 LoRA 触发词。

Krea2 / 仅模型工作流

对于 Krea2 一类只需要把 LoRA 应用到 MODEL 的工作流,建议使用:

MODEL / UNET
    │
    ▼
RuYi multi-Lora-loader(仅模型)
    │
    ▼
MODEL

文本编码器 / CLIP 路径保持独立,除非你的具体工作流另有要求。

更新记录

版本历史见 CHANGELOG.md

许可证

RuYi-Nodes 使用 MIT License 发布。