From 7f2395c1de8cfa9b5949facf225d6fedc9e8b4af Mon Sep 17 00:00:00 2001 From: ausboss <102309304+ausboss@users.noreply.github.com> Date: Fri, 11 Sep 2026 14:23:08 -0500 Subject: [PATCH] Add empty LoRA row insertion above and below --- CHANGELOG.md | 5 +++++ js/docs/AUSBOSS_NODES_LoraLoader.md | 6 +++++- js/lora_loader/index.js | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 266a367..1dc6a32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to ComfyUI-AusBoss are documented here. +## Unreleased + +- LoRA Loader: right-click a row to insert an empty LoRA slot above or + below it, preserving the order and settings of the existing stack. + ## 2.0.2 - 2026-09-10 - The LoRA loader validates the SHA-256 used in its fixed Civitai URL and diff --git a/js/docs/AUSBOSS_NODES_LoraLoader.md b/js/docs/AUSBOSS_NODES_LoraLoader.md index ad4d0a7..1f20b37 100644 --- a/js/docs/AUSBOSS_NODES_LoraLoader.md +++ b/js/docs/AUSBOSS_NODES_LoraLoader.md @@ -23,7 +23,11 @@ come out of one socket, ready to wire into a prompt. - **i**: Info card with the preview image, base model, file size and modified date, and trigger words for that LoRA. -Right-click a row to move, duplicate, or remove it. One strength drives both +Right-click a row to insert an empty LoRA above or below it, move, duplicate, +or remove it. Inserting keeps the existing rows and their settings in order; +the new slot uses the gear menu's default strength (initially 1). +The stack holds up to 64 rows. +One strength drives both model and CLIP by default; the gear menu's **Separate model / CLIP strength** switch shows a second box per row. The switch is per-node — new nodes always start unified — and an absorb that imports a row with unequal diff --git a/js/lora_loader/index.js b/js/lora_loader/index.js index 482c168..08dcd2b 100644 --- a/js/lora_loader/index.js +++ b/js/lora_loader/index.js @@ -1052,6 +1052,16 @@ function openRowMenu(state, index, event) { button.addEventListener("click", () => { closePopup(); action(); }); menu.append(button); }; + const insertEmpty = (position) => { + if (state.rows.length >= MAX_ROWS) return; + const strength = roundStrength(state.settings?.default_strength ?? 1); + const rows = state.rows.slice(); + rows.splice(position, 0, { ...newRow(), strength, strength_clip: strength }); + commitRows(state, rows, { structural: true }); + fitNode(state); + }; + item("Insert empty LoRA above", () => insertEmpty(index), state.rows.length >= MAX_ROWS); + item("Insert empty LoRA below", () => insertEmpty(index + 1), state.rows.length >= MAX_ROWS); item("Move up", () => commitRows(state, moveRow(state.rows, index, -1), { structural: true }), index === 0); item("Move down", () => commitRows(state, moveRow(state.rows, index, 1), { structural: true }), index === state.rows.length - 1);