Compare commits

...
2 Commits
Author SHA1 Message Date
ketle-manandClaude Sonnet 5.5 3fa7147f9c release: v0.8.4 - ComfyUI v0.40 native Load LoRA nodes (Model / Text Encoder), help update
- docs: help (helpGen20/21/29, helpSidepanel15 in en/ja/zh + index.html), README, DEVLOG
- bump version to 0.8.4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 13:14:42 +09:00
ketle-manandClaude Sonnet 5.5 5078dd7660 feat: support ComfyUI v0.40 native LoRA stack nodes (LoadLoraModel / LoadLoraTextEncoder)
The new nodes take a DynamicGroup of rows, sent in API format as flat keys
"loras.<row>.lora_name|strength|enabled". Previously they were not detected, and
the generic lora_name writers would have produced invalid keys.

- detect them in analyzeWorkflow (is_lora_stack)
- add comfyEditor.applyLoraStack: writes every stack node together (Model node gets
  the model strength, Text Encoder node the clip strength)
- wire it into GenerateUI Single/Stack apply, bypass toggle, Lab, Models "Apply" and
  the LoRA batch
- extract the LoRAs in Metadata tab / I tab (API format)

UI-format workflows are not covered: frontend 1.55.17 has no DynamicGroup widget,
so such nodes carry no widgets_values yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 12:45:12 +09:00
14 changed files with 194 additions and 24 deletions
+1
View File
@@ -2,6 +2,7 @@
Condensed version-by-version index of DEVLOG.md (each line: version + one-line summary of what changed and why). Full rationale, code details, and "How to apply" lessons live in the excluded DEVLOG.md itself; this index exists so graphify can extract a queryable semantic node per release without feeding the full log to the local Ollama model. Regenerate with `python tools/generate_doc_index.py devlog` whenever DEVLOG.md changes.
- **v0.8.4(2026-10-14)** — ComfyUI v0.40.0 対応: ネイティブ LoRA スタックノード(`LoadLoraModel` / `LoadLoraTextEncoder`)
- **v0.8.3(2026-10-13)** — GenerateUI: シードモード「Workflow」を追加(改善候補メモ 2-A)
- **v0.8.2(2026-10-12)** — Gallery: セマンティック検索(Gemini Embedding 2 / EmbeddingGemma 2)
- **v0.8.1(2026-10-11)** — バグ修正
+33
View File
@@ -2,6 +2,39 @@
---
## v0.8.4(2026-10-14)
### ComfyUI v0.40.0 対応: ネイティブ LoRA スタックノード(`LoadLoraModel` / `LoadLoraTextEncoder`)
ComfyUI v0.40.0 の変更点を確認し、影響のあった LoRA 検出・編集を対応させた(コミット 5078dd7)。
**背景・調査結果**
- 新ノードは `comfy_extras/nodes_lora_stack.py`。1ノードに DynamicGroup `loras`(1〜20行)を持ち、API形式では `loras.<行>.lora_name|strength|enabled` のドット結合キーで渡す。Model用とText Encoder用で別ノード。
- Workflow Studio の LoRA 検出は固定リスト(`LoraLoader` / `LoraLoaderModelOnly` / Power Lora / LoraManager / ImageMetadataLoRALoader)だったため新ノードは未検出。また既存の編集コードが `inputs.lora_name` を書き込むため、そのまま使うと DynamicGroup の検証エラーになる状態だった。
- **ComfyUI フロントエンド 1.55.17 には DynamicGroup の実装が無い**(型名ラベルのみ)。GUI のグラフエディタではこのノードに行を追加できず、UI形式の `widgets_values` も空になる。そのため対応は **API形式のみ**。UI形式の対応はフロントエンドの対応後に実物のJSONで再検証が必要。
**実装**
- `comfyui-workflow.js`: `analyzeWorkflow` が2ノードを `is_lora_stack` として `lora_nodes` に追加(1ノード1エントリ、代表は有効な最初の行。無効行は飛ばし、行番号順に解釈)。
- `comfyui-editor.js`: 共通の書き込み処理 `applyLoraStack`(`comfyEditor` から公開)を追加。ワークフロー内の全スタックノードを同期して書き込む(Modelノード=Str M、Text Encoderノード=Str C)。Single / Stack Apply(Stackは全モデルを行として書く、最大20行)、バイパスボタン(全行のstrengthを0、解除で行ごと復元)、LoRAペインの現在値表示に対応。
- `lab-tab.js` / `models-tab.js` / `generate-tab.js`: Lab、Models タブの Apply、LoRA バッチも同じ処理経由に。Models Apply は既存の強度を保持する。
- `metadata-tab.js` / `web/comfyui/node_sets_menu.js`: Metadata タブ・サイドパネル I タブの LoRA 抽出(API形式)に対応。Model/Text Encoder 両ノードの同名LoRAは1件にまとめ、両方の強度を表示する。
- ヘルプ(helpGen20 / helpGen21 / helpGen29 / helpSidepanel15、en/ja/zh)と index.html を更新。README に項目を追加。
**実機確認(ComfyUI_5 / ポート8189、v0.40.0)**
- テスト用 API 形式ワークフロー(Checkpoint → Load LoRA 2ノード×2行 → SDXL)を `/prompt` へ投入: HTTP 200・`node_errors` 空・1枚生成成功(18秒)。
- 生成時ログの `lora key not loaded: ...`(約5千行)は、Model/Text Encoder で別ノードに分かれる設計上、各ノードが対象外キーを報告する無害なノイズ(従来 `LoraLoader` 単独では0件、件数も2LoRA×キー数と一致)。
- GenerateUI 画面で、ID:2/ID:3 の選択、バイパスボタンの往復(0→元の値)、Single Apply(RAW JSON・LORA SYNTAX・トリガーワード更新)を実クリックで確認。
- 書き込み処理は実ファイルから切り出して Node で単体試験(強度維持・行入替・両ノード同期・バイパス復元・ワークフロー引数指定)。
**影響なしと確認した項目**
- WebSocket のメタデータ付与: メタデータは `workflow_metadata` の送信または機能フラグ `supports_preview_metadata` の宣言時のみ付く。本プラグインのクライアントはどちらも行わず、メッセージも既知フィールドだけを `try/catch` 付きで読むため影響なし。
- 3D 出力・カメラ系ノード: 結果取得は `images` と `saved_svg` のみを見るため無視されるだけ。
- Comic Creator(v1.53.2): LoRA / WebSocket / `/prompt` を使わず、`/upload/image` の応答形式も互換。`/ccc` と `/wfm` の iframe 連携も正常。
**その他(運用上の発見)**
- ランタイム(ComfyUI_5 の `custom_nodes`)が v0.8.2 開発途中の版のまま古いファイルが残っていた(部分同期)。リポジトリの追跡ファイルを同期し直した(`workflows/`・`data/`・`.env` は上書きしない)。
- comfy-cli の既定ワークスペースは ComfyUI_6(プラグイン 0.3.78)。comfy-mcp の `server_info` の running / freshness は 8189 の ComfyUI_5 とは別物。
## v0.8.3(2026-10-13)
### GenerateUI: シードモード「Workflow」を追加(改善候補メモ 2-A)
+1 -1
View File
@@ -27,7 +27,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.8.3-green)
![Version](https://img.shields.io/badge/version-0.8.4-green)
## Features (tab -> feature names)
+2 -1
View File
@@ -23,7 +23,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.8.3-green)
![Version](https://img.shields.io/badge/version-0.8.4-green)
## Screenshots
@@ -103,6 +103,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- **Model tab** — Checkpoint, VAE, Diffusion Model (UNETLoader / UnetLoaderGGUF / LoaderGGUF), and Text Encoder (CLIPLoader / DualCLIPLoader / ClipLoaderGGUF / DualClipLoaderGGUF — single clip: type + device; dual clip: two clip selectors + type + device) are always shown; **ControlNet** and **Hypernetwork** (with Strength field) are collapsed by default (v0.3.98) since they're used less often — click their header to expand; **LoRA** (Single/Stack tabs) has its own column; all selectors have a filter; Raw JSON on the right
- **Highlight color** (v0.3.98) — the label of each model type above, plus the LoRA column header, turns a distinct color (default bright green, customizable in the Settings tab) when the loaded workflow actually contains that type of node; stays visible even while ControlNet/Hypernetwork are collapsed, so relevance is visible without expanding
- **LoRA Stack Group toggle** (v0.3.92) — for `Lora Loader (LoraManager)` nodes, a **Use Stack Group** checkbox next to the Single/Stack tabs switches what the Stack tab shows and edits: OFF (the default whenever a workflow is loaded) displays and edits the LoRAs actually configured in the workflow's own Lora Manager node — correctly showing every LoRA it holds, not just the first one; ON switches to the LoRA group registered in the Models tab instead; toggling either direction clears the node's LoRA list first, then loads it from the newly selected source, and switching back to OFF restores exactly the list that was present when the workflow was loaded
- **Native Load LoRA nodes** (v0.8.4) — ComfyUI v0.40's `Load LoRA (Model)` / `Load LoRA (Text Encoder)` pair (each node holds up to 20 rows of LoRA / strength / enabled) is detected and edited like the other LoRA nodes: Single / Stack Apply, the Models tab "Apply", the LoRA batch, Lab and the Bypass button write both nodes together (the Model node takes Str M, the Text Encoder node takes Str C); Stack Apply writes the whole Stack group as rows, and the Metadata tab / side-panel I tab list their LoRAs. API-format workflows only for now — ComfyUI frontend 1.55.17 cannot add rows to these nodes in its own graph editor, so UI-format workflows carry no `widgets_values` for them yet
- **LoRA Bypass button** (v0.4.4) — a ⛔ toggle next to the Refresh Stack group button in the LoRA column header; forces the target LoRA node's strength to 0 (`strength_model`/`strength_clip` for a standard LoraLoader, or every entry's `strength`/`clipStrength` for a Lora Manager node — its LoRA list stays intact, not replaced) without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself later
- **Settings tab** — KSampler and Latent Image side by side at 50% width each; Raw JSON on the right
- **Always-visible Raw JSON** — edit the API-format JSON directly from any tab with syntax highlighting; Apply button reloads the workflow; built-in **search bar** (always shown) finds all matches as you type with count display (`3/12`); navigate with ↑/↓ buttons or Enter / Shift+Enter; Escape or ✕ clears; current match highlighted in orange, other matches in yellow
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-workflow-studio"
description = "A comprehensive workflow, asset management, and generation UI plugin for ComfyUI. Manage workflows, models, images, and prompts; batch generation and Image Feeder in the GenerateUI tab; library side panel with canvas drag & drop and AI tools."
version = "0.8.3"
version = "0.8.4"
license = { file = "LICENSE" }
requires-python = ">= 3.10"
dependencies = ["jinja2"]
+82 -3
View File
@@ -198,7 +198,59 @@ function _buildLoraManagerSyntax(stackModels) {
.join(" ");
}
// ── Native LoRA stack nodes (LoadLoraModel / LoadLoraTextEncoder) ─────────
// DynamicGroup rows are flat API keys "loras.<row>.lora_name|strength|enabled" (max 20,
// min 1). The Model node takes the model strength and the Text Encoder node the clip
// strength; every stack node in the workflow is written together so a single Apply /
// Bypass keeps the pair consistent.
const _LORA_STACK_STRENGTH = { LoadLoraModel: "strModel", LoadLoraTextEncoder: "strClip" };
function _isLoraStackNode(wfNode) {
return !!wfNode && Object.hasOwn(_LORA_STACK_STRENGTH, wfNode.class_type);
}
function _readLoraStackRows(inputs) {
const rows = new Map();
for (const [k, v] of Object.entries(inputs || {})) {
const m = /^loras\.(\d+)\.(lora_name|strength|enabled)$/.exec(k);
if (!m) continue;
if (!rows.has(+m[1])) rows.set(+m[1], {});
rows.get(+m[1])[m[2]] = v;
}
return [...rows.entries()].sort((a, b) => a[0] - b[0]).map(([, r]) => r);
}
function _writeLoraStackRows(wfNode, rows) {
for (const k of Object.keys(wfNode.inputs)) if (k.startsWith("loras.")) delete wfNode.inputs[k];
rows.slice(0, 20).forEach((r, i) => {
wfNode.inputs[`loras.${i}.lora_name`] = r.lora_name;
wfNode.inputs[`loras.${i}.strength`] = r.strength;
wfNode.inputs[`loras.${i}.enabled`] = r.enabled;
});
}
// items: [{ name, strModel?, strClip?, enabled? }] — omitted strengths keep the node's
// first existing row (default 1). Writes every stack node in `wf`.
function _applyLoraStack(items, wf = comfyUI.currentWorkflow) {
if (!items.length) return;
for (const wfNode of Object.values(wf || {})) {
if (!_isLoraStackNode(wfNode)) continue;
const key = _LORA_STACK_STRENGTH[wfNode.class_type];
const prev = _readLoraStackRows(wfNode.inputs)[0]?.strength;
wfNode.inputs ??= {};
_writeLoraStackRows(wfNode, items.slice(0, 20).map((it) => ({
lora_name: it.name,
strength: it[key] ?? (typeof prev === "number" ? prev : 1),
enabled: it.enabled !== false,
})));
}
}
function _applyLoraToNode(nodeId, loraPath, strModel, strClip, isLoraManager) {
if (_isLoraStackNode(comfyUI.currentWorkflow[nodeId])) {
_applyLoraStack([{ name: comfyEditor.resolveLoraName(loraPath), strModel, strClip }]);
return;
}
if (isLoraManager) {
const stem = _loraBasename(loraPath);
comfyUI.currentWorkflow[nodeId].inputs.loras = {
@@ -463,6 +515,10 @@ export const comfyEditor = {
return found || name;
},
// Native LoRA stack nodes (LoadLoraModel / LoadLoraTextEncoder) — see _applyLoraStack.
isLoraStackNode: _isLoraStackNode,
applyLoraStack: _applyLoraStack,
renderAll(analysis, workflow, opts = {}) {
this.renderPromptTab(analysis, "wfm-gen-prompt-fields");
this.renderImageTab(analysis, "wfm-gen-image-fields");
@@ -776,7 +832,11 @@ export const comfyEditor = {
// Restore whatever was set before bypassing
const snap = _loraBypassSnapshot[nodeId];
if (snap) {
if (isLoraManager) {
if (snap.stackRows) {
for (const [id, rows] of Object.entries(snap.stackRows)) {
if (comfyUI.currentWorkflow?.[id]) _writeLoraStackRows(comfyUI.currentWorkflow[id], JSON.parse(JSON.stringify(rows)));
}
} else if (isLoraManager) {
wfNode.inputs.loras = { __value__: JSON.parse(JSON.stringify(snap.loras || [])) };
wfNode.inputs.text = snap.text ?? "";
} else {
@@ -791,7 +851,16 @@ export const comfyEditor = {
// Snapshot current values, then zero the strength (LoraManager: every
// entry in its loras list, keeping the list itself intact so un-bypassing
// restores the exact same Stack — not just a single-LoRA fallback).
if (isLoraManager) {
if (_isLoraStackNode(wfNode)) {
// Native stack nodes: snapshot every stack node's rows, then zero each strength
const stackRows = {};
for (const [id, n] of Object.entries(comfyUI.currentWorkflow)) {
if (!_isLoraStackNode(n)) continue;
stackRows[id] = _readLoraStackRows(n.inputs);
_writeLoraStackRows(n, stackRows[id].map((r) => ({ ...r, strength: 0 })));
}
_loraBypassSnapshot[nodeId] = { stackRows };
} else if (isLoraManager) {
const loras = Array.isArray(wfNode.inputs.loras?.__value__) ? wfNode.inputs.loras.__value__ : [];
_loraBypassSnapshot[nodeId] = { loras: JSON.parse(JSON.stringify(loras)), text: wfNode.inputs.text ?? "" };
wfNode.inputs.loras = { __value__: loras.map((l) => ({ ...l, strength: 0, clipStrength: 0 })) };
@@ -862,7 +931,9 @@ export const comfyEditor = {
const _firstLoraNode = loraNodes[0];
if (_firstLoraNode && comfyUI.currentWorkflow?.[_firstLoraNode.id]) {
const _wfNode = comfyUI.currentWorkflow[_firstLoraNode.id];
if (!_firstLoraNode.is_lora_manager) {
if (_firstLoraNode.is_lora_stack) {
currentVal = _readLoraStackRows(_wfNode.inputs)[0]?.lora_name || currentVal;
} else if (!_firstLoraNode.is_lora_manager) {
currentVal = _wfNode.inputs?.lora_name || currentVal;
} else {
// LoraManager: loras.__value__[0].nameからフルパスを復元
@@ -1294,6 +1365,14 @@ export const comfyEditor = {
});
comfyUI.currentWorkflow[nodeId].inputs.loras = { __value__: loraValue };
comfyUI.currentWorkflow[nodeId].inputs.text = _buildLoraManagerSyntax(stackModels);
} else if (node?.is_lora_stack) {
// Native stack nodes take the whole Stack group as rows (max 20)
_applyLoraStack(stackModels.map((m) => ({
name: comfyEditor.resolveLoraName(m),
strModel: _stackStrengths[m]?.m ?? 1.0,
strClip: _stackStrengths[m]?.c ?? 1.0,
enabled: _stackActive[m] !== false,
})));
} else {
const first = stackModels[0];
if (first) {
+23
View File
@@ -1541,6 +1541,29 @@ export const comfyWorkflow = {
}
}
// Native Load LoRA (Model / Text Encoder) — DynamicGroup rows arrive as flat keys
// "loras.<row>.lora_name|strength|enabled". One entry per node (first enabled row
// is the representative); editing goes through comfyEditor.applyLoraStack.
if (ct === "LoadLoraModel" || ct === "LoadLoraTextEncoder") {
const isModel = ct === "LoadLoraModel";
const rows = new Map();
for (const [k, v] of Object.entries(inputs)) {
const m = /^loras\.(\d+)\.(lora_name|strength|enabled)$/.exec(k);
if (!m) continue;
if (!rows.has(+m[1])) rows.set(+m[1], {});
rows.get(+m[1])[m[2]] = v;
}
const first = [...rows.entries()].sort((a, b) => a[0] - b[0]).map(([, r]) => r)
.find((r) => r.enabled !== false && typeof r.lora_name === "string");
const s = typeof first?.strength === "number" ? first.strength : 1;
result.lora_nodes.push({
id, type: ct, title, is_lora_stack: true,
lora_name: first?.lora_name,
strength_model: isModel ? s : 1,
strength_clip: isModel ? 1 : s,
});
}
// Lora Loader (LoraManager) — loras stored in inputs.loras.__value__
if (ct === "Lora Loader (LoraManager)") {
result.lora_nodes.push({ id, type: ct, title, is_lora_manager: true });
+3
View File
@@ -1889,6 +1889,9 @@ async function _runBatchGenerate() {
__value__: [{ name: stem, strength: 1.0, active: true, expanded: false, clipStrength: 1.0, locked: false }],
};
comfyUI.currentWorkflow[node.id].inputs.text = `<lora:${stem}:1:1>`;
} else if (node.is_lora_stack) {
const actualName = loraNameMap?.get(loraName.replace(/\\/g, "/")) || loraName;
comfyEditor.applyLoraStack([{ name: actualName }]);
} else {
const actualName = loraNameMap?.get(loraName.replace(/\\/g, "/")) || loraName;
comfyUI.currentWorkflow[node.id].inputs.lora_name = actualName;
+12 -12
View File
@@ -926,12 +926,12 @@ const LANGUAGES = {
helpGen17: "Style batch: select styles from the Style tab in the left pane, enable the Style column in Batch Queue, then Generate — each selected style is applied in sequence to the positive and negative prompts; applied to workflow copies so the loaded workflow is not modified; style files are re-read on each page load from user/default/Workflow-Studio/style/*.json",
helpGen18: "Alt+Click any Apply button (Positive Prompt / Checkpoint / KSampler) to Apply & Generate in one step — applies the parameter to the workflow then immediately queues a generation; only fires when the target node exists in the loaded workflow",
helpGen19: "Lora batch: for each LoRA, its syntax (<lora:name:strength_model:strength_clip>) and CivitAI trained words are automatically appended to the Positive prompt — rebuilt from the original prompt each time, not accumulated; the prompt is automatically restored to its pre-batch state when the batch completes or is stopped; if a selected LoRA is not yet recognized by ComfyUI's model list, a warning toast is shown (Refresh or restart ComfyUI)",
helpGen20: "Two ways LoRAs are attached: a chain of standard LoraLoader nodes (one LoRA per node — add more by chaining additional nodes) or a single Lora Loader (LoraManager) node (from the ComfyUI-Lora-Manager custom node pack) that holds a list of LoRAs internally, each with its own active/model-strength/clip-strength; the Single/Stack tabs below adapt automatically depending on which type the target node is",
helpGen21: "Single tab: pick one LoRA + Str M/Str C, then Apply — for a Lora Manager node this replaces its entire internal LoRA list with just this one entry, discarding any others it had",
helpGen20: "Three ways LoRAs are attached: a chain of standard LoraLoader nodes (one LoRA per node — add more by chaining additional nodes), a single Lora Loader (LoraManager) node (from the ComfyUI-Lora-Manager custom node pack) that holds a list of LoRAs internally, each with its own active/model-strength/clip-strength, or ComfyUI's native Load LoRA (Model) + Load LoRA (Text Encoder) node pair (v0.40+; each holds up to 20 rows of LoRA / strength / enabled — the Model node takes Str M, the Text Encoder node takes Str C, and Apply writes both nodes together; API-format workflows only for now, because ComfyUI frontend 1.55.17 cannot add rows to these nodes in its own graph editor); the Single/Stack tabs below adapt automatically depending on which type the target node is",
helpGen21: "Single tab: pick one LoRA + Str M/Str C, then Apply — for a Lora Manager node this replaces its entire internal LoRA list with just this one entry, discarding any others it had; the native Load LoRA nodes likewise have all their rows replaced by this single row",
helpGen22: "Stack tab — Use Stack Group checkbox (shown only when a Lora Manager node exists in the workflow): OFF (the default whenever a workflow is loaded) shows and edits the LoRAs actually configured in the workflow's Lora Manager node itself; ON shows and edits the \"Stack\" group registered in the Models tab instead; switching either direction clears the node's LoRA list first, then loads it from the newly selected source; switching back to OFF restores exactly the LoRA list that was present when the workflow was loaded (captured as a snapshot at load time)",
helpGen23: "Stack tab controls: each row has an active checkbox and Str M / Str C fields; the header \"Stack\" checkbox toggles all rows at once; the +/- step buttons adjust the strength of all currently active rows together; a \"Showing: LoRAs currently in workflow\" / \"Showing: registered Stack group\" label indicates which source is currently displayed; Apply writes the full list back to the target node and also appends LoRA syntax + CivitAI trigger words to the Positive prompt",
helpGen24: "Caution for CLIP Text Encode edit+ (CLIPTextEncodeEditPlus) nodes: when a Lora Manager node's trigger_words output feeds this node's text1 input (RAW/EDIT/front/back modes combine text1 with the editable text_edit field), trigger words are already included automatically at generation time; clicking a LoRA Apply button or turning on Use Stack Group additionally writes LoRA syntax/trigger words into text_edit, duplicating them — leave Use Stack Group off and avoid the LoRA Apply buttons if you want the workflow's original prompt and LoRA composition to stay unmodified",
helpGen29: "Bypass button (⛔, in the LoRA column header, next to Refresh Stack group): forces the target LoRA node's strength to 0 — strength_model/strength_clip for a standard LoraLoader, or every entry's strength/clipStrength for a Lora Manager node (its LoRA list is kept intact, not replaced) — without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself on a later toggle",
helpGen29: "Bypass button (⛔, in the LoRA column header, next to Refresh Stack group): forces the target LoRA node's strength to 0 — strength_model/strength_clip for a standard LoraLoader, every entry's strength/clipStrength for a Lora Manager node (its LoRA list is kept intact, not replaced), or every row's strength on both native Load LoRA nodes (Model and Text Encoder; rows kept) — without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself on a later toggle",
helpGen30: "The Save button (right end of the subtab bar) is hidden while the Batch or Lab subtab is active, since those work on workflow copies / their own Plan files rather than the currently loaded workflow; it reappears on Input/Model/Settings/Feeder",
helpFeederTitle: "GenerateUI Tab — Feeder subtab",
helpFeederDesc: "Two modes switchable via the [Image Loop] / [Gallery] toggle at the top of the left pane.",
@@ -1130,7 +1130,7 @@ const LANGUAGES = {
helpSidepanel12: "⚙ Theme button (header): customize panel background, sub-header background, text, border, and secondary text colors — changes are saved to localStorage and applied on next open",
helpSidepanel13: "I tab (Information): drop a ComfyUI PNG/WebP/MP4/JSON to inspect model, LoRA, and prompt metadata in the side panel — sub-tabs: model / lora / Prompts; supports UnetLoaderGGUF, QuadrupleCLIPLoader, Lora Loader (LoraManager), and ImageMetadataLoRALoader node types (API format included); MP4 reads the workflow/prompt tags embedded by SaveVideo, including all-in-one video nodes like MiniMax H3 ImageToVideo",
helpSidepanel14: "Information tab — drag items to canvas: model sub-tab places the loader node (Checkpoint → CheckpointLoaderSimple, VAE → VAELoader, Diffusion Model → UNETLoader, Text Encoder → CLIPLoader); double-click also places at canvas center",
helpSidepanel15: "Information tab — LoRA sub-tab: detects LoRAs from LoraLoader, LoraLoaderModelOnly, and Lora Loader (LoraManager) nodes (API format supported); drag individual LoRA to place LoraLoader; \"Multiple LORA\" section places all LoRAs in a single Lora Loader (LoraManager) node with LoRA syntax pre-filled; Prompts sub-tab: drag a prompt to place CLIPTextEncode node with text pre-filled; click prompt to view full text and copy",
helpSidepanel15: "Information tab — LoRA sub-tab: detects LoRAs from LoraLoader, LoraLoaderModelOnly, Lora Loader (LoraManager), and native Load LoRA (Model / Text Encoder) nodes (API format supported); drag individual LoRA to place LoraLoader; \"Multiple LORA\" section places all LoRAs in a single Lora Loader (LoraManager) node with LoRA syntax pre-filled; Prompts sub-tab: drag a prompt to place CLIPTextEncode node with text pre-filled; click prompt to view full text and copy",
helpSidepanel16: "A tab (AI Tools): Translation, Chat, TOOLS, and Settings sub-tabs powered by Ollama, LM Studio, Lemonade, or Unsloth; Chat supports multi-turn conversations; TOOLS includes VLM image analysis and wildcard generation; settings shared with the SPA AI TOOL tab via localStorage; the Settings sub-tab's VRAM (Ollama) → \"Unload all now\" unloads every model loaded in Ollama on localhost, decision models included (same as Settings → VRAM Management)",
helpSidepanel17: "Send to Canvas: clicking 'Send to Canvas' (Workflow tab) or 'Copy & Send Canvas' (Gallery tab) sends the workflow directly to the ComfyUI canvas — both UI and API formats are supported; if Workflow Studio was not opened from the ComfyUI toolbar (window.opener unavailable), UI-format workflows fall back to title drag (title turns blue with a green ●)",
helpAiTitle: "AI Tab (A)",
@@ -2632,12 +2632,12 @@ const LANGUAGES = {
helpGen17: "スタイルバッチ:左ペインのStyleタブでスタイルを選択し、バッチキューのStyle列を有効化してGenerateを実行 — 選択した各スタイルをPositiveおよびNegativeプロンプトに順番に適用;ワークフローコピーに適用されるため読み込み済みワークフローは変更されない;スタイルファイルはページロードのたびに user/default/Workflow-Studio/style/*.json から再読み込み",
helpGen18: "Applyボタンを Alt+Click すると Apply & Generate を1操作で実行 — 対象:Positive Prompt・Checkpoint・KSamplerの各Applyボタン;ワークフローに値を書き込んだ後、即座に生成をキューに追加;対象ノードが存在しない場合は何もしない",
helpGen19: "Loraバッチ:各LoRA適用時にLora構文(<lora:名前:strength_model:strength_clip>)とCivitAIトリガーワードをPositiveプロンプトへ自動追加 — 毎回元のプロンプトを起点に再構築するため蓄積しない;バッチ完了・停止後はプロンプトを開始前の状態へ自動復元;選択したLoRAがComfyUIのモデル一覧にまだ認識されていない場合は警告トーストを表示(ComfyUIのRefreshまたは再起動が必要)",
helpGen20: "LoRAの接続方式は2通り:標準の LoraLoader ノードをチェーン接続する方式(1ノードにつき1LoRA — 増やすにはノードを追加接続)と、単一の Lora Loader (LoraManager) ノード(ComfyUI-Lora-Manager由来のカスタムノード)にLoRA一覧を内部保持する方式(各LoRAごとに有効/モデル強度/CLIP強度を個別管理);下のSingle/Stackタブは対象ノードがどちらのタイプかによって自動的に挙動が変わる",
helpGen21: "Singleタブ:LoRAを1つ選びStr M/Str Cを設定してApply — Lora Managerノードが対象の場合、内部のLoRA一覧を丸ごとこの1件だけに置き換え、既存の他のLoRAは失われる",
helpGen20: "LoRAの接続方式は3通り:標準の LoraLoader ノードをチェーン接続する方式(1ノードにつき1LoRA — 増やすにはノードを追加接続)、単一の Lora Loader (LoraManager) ノード(ComfyUI-Lora-Manager由来のカスタムノード)にLoRA一覧を内部保持する方式(各LoRAごとに有効/モデル強度/CLIP強度を個別管理)、またはComfyUI標準の Load LoRA (Model) と Load LoRA (Text Encoder) のノードペア(v0.40以降。各ノードにLoRA/強度/有効の行を最大20行保持 — Modelノードには Str M、Text Encoderノードには Str C を設定し、Applyは両ノードへ同時に書き込み;現状はAPI形式のワークフローのみ対応 — ComfyUIフロントエンド1.55.17は標準のグラフエディタでこれらのノードに行を追加できないため);下のSingle/Stackタブは対象ノードがどちらのタイプかによって自動的に挙動が変わる",
helpGen21: "Singleタブ:LoRAを1つ選びStr M/Str Cを設定してApply — Lora Managerノードが対象の場合、内部のLoRA一覧を丸ごとこの1件だけに置き換え、既存の他のLoRAは失われる;ComfyUI標準の Load LoRA ノードも同様に、全行がこの1行に置き換わる",
helpGen22: "Stackタブ — Use Stack Groupチェックボックス(ワークフロー内にLora Managerノードがある場合のみ表示):OFF(ワークフロー読み込み時の既定)はLora Managerノードに実際に設定されているLoRAをそのまま表示・編集;ONにするとModelsタブに登録済みの「Stack」グループを表示・編集;どちらへの切替もまずノードのLoRA一覧をクリアしてから切替先のソースを読み込む;OFFへ戻すとワークフロー読み込み時点のLoRA一覧(読み込み時にスナップショットとして保存済み)へ正確に復元される",
helpGen23: "Stackタブの操作:各行に有効チェックボックスとStr M / Str Cフィールド;ヘッダーの「Stack」チェックボックスで全行を一括切替;上部の+/-ステップボタンで現在有効な全行の強度をまとめて増減;「Showing: LoRAs currently in workflow」/「Showing: registered Stack group」のラベルで現在どちらのソースを表示中か分かる;Applyで対象ノードへ一覧全体を書き込み、同時にLoRA構文とCivitAIトリガーワードをPositiveプロンプトへ追加",
helpGen24: "CLIP Text Encode edit+(CLIPTextEncodeEditPlus)ノードを使う場合の注意:Lora Managerノードのtrigger_words出力がこのノードのtext1入力に接続されている構成(RAW/EDIT/front/backモードでtext1と編集可能なtext_editを結合)では、生成時にトリガーワードは既に自動的に反映済み;LoRAのApplyボタンをクリックしたりUse Stack GroupをONにしたりすると、LoRA構文・トリガーワードがtext_editへも追加で書き込まれ二重になる — ワークフロー本来のプロンプト・LoRA構成を変更せず維持したい場合は、Use Stack GroupをOFFのままにしLoRAのApply系ボタンには触れないこと",
helpGen29: "バイパスボタン(⛔、LoRA列ヘッダー内、Refresh Stack groupボタンの隣):対象のLoRAノードの強度を強制的に0にします — 通常のLoraLoaderならstrength_model/strength_clip、Lora Managerノードならリスト内の全エントリのstrength/clipStrength(LoRAリスト自体は差し替えず維持)が対象で、実際のComfyUIノードのmodeには一切触れません;もう一度クリックすると、切り替え前の値に正確に戻ります;対象はSingle/Stack Applyがデフォルトで対象とするノード(ワークフローにLora Managerノードがあればそれ、無ければ最初のLoRAノード);SingleまたはStackのApplyボタンをクリックするとバイパス状態はクリアされ、後から無言で再適用されることはありません",
helpGen29: "バイパスボタン(⛔、LoRA列ヘッダー内、Refresh Stack groupボタンの隣):対象のLoRAノードの強度を強制的に0にします — 通常のLoraLoaderならstrength_model/strength_clip、Lora Managerノードならリスト内の全エントリのstrength/clipStrength(LoRAリスト自体は差し替えず維持)、ComfyUI標準の Load LoRA ノードなら両ノード(Model/Text Encoder)の全行のstrength(行は維持)が対象で、実際のComfyUIノードのmodeには一切触れません;もう一度クリックすると、切り替え前の値に正確に戻ります;対象はSingle/Stack Applyがデフォルトで対象とするノード(ワークフローにLora Managerノードがあればそれ、無ければ最初のLoRAノード);SingleまたはStackのApplyボタンをクリックするとバイパス状態はクリアされ、後から無言で再適用されることはありません",
helpGen30: "Saveボタン(サブタブバー右端)は、BatchまたはLabサブタブがアクティブな間は非表示になります — これらは現在読み込み中のワークフロー本体ではなく、ワークフローの複製や独自のPlanファイルを操作するためです。Input/Model/Settings/Feederでは再表示されます",
helpFeederTitle: "GenerateUI Tab — Feeder サブタブ",
helpFeederDesc: "左ペイン上部の [Image Loop] / [Gallery] トグルで2つのモードを切り替えられます。",
@@ -2836,7 +2836,7 @@ const LANGUAGES = {
helpSidepanel12: "⚙ テーマボタン(ヘッダー):パネル背景・サブヘッダー背景・文字色・ボーダー・補助テキスト色をカスタマイズ可能、設定はlocalStorageに保存され次回起動時も反映",
helpSidepanel13: "I タブ(Information):ComfyUI の PNG / WebP / MP4 / JSON をドロップするとサイドパネル内でモデル・LoRA・プロンプトのメタデータを確認可能 — サブタブ: model / lora / Prompts;UnetLoaderGGUF・QuadrupleCLIPLoader・Lora Loader (LoraManager)・ImageMetadataLoRALoader(API形式も可)ノードタイプに対応;MP4はSaveVideoが埋め込むworkflow/promptタグを読み取り、MiniMax H3 ImageToVideoのようなオールインワン動画ノードのプロンプトにも対応",
helpSidepanel14: "Information タブ — キャンバスへドラッグ:model サブタブのアイテムをドラッグすると対応ローダーノードを配置(Checkpoint → CheckpointLoaderSimple、VAE → VAELoader、Diffusion Model → UNETLoader、Text Encoder → CLIPLoader);ダブルクリックでもキャンバス中央に配置可能",
helpSidepanel15: "Information タブ — lora サブタブ:LoraLoader・LoraLoaderModelOnly・Lora Loader (LoraManager) ノード(APIフォーマット含む)から LoRA を検出;個別 LoRA をドラッグで LoraLoader を配置;「Multiple LORA」セクションで全 LoRA を Lora Loader (LoraManager) ノードに一括配置(LoRA構文自動入力);Prompts サブタブ:プロンプトをドラッグするとテキスト入力済みの CLIPTextEncode ノードを配置;クリックで全文表示・コピー可能",
helpSidepanel15: "Information タブ — lora サブタブ:LoraLoader・LoraLoaderModelOnly・Lora Loader (LoraManager)・ComfyUI標準の Load LoRA (Model/Text Encoder) ノード(APIフォーマット含む)から LoRA を検出;個別 LoRA をドラッグで LoraLoader を配置;「Multiple LORA」セクションで全 LoRA を Lora Loader (LoraManager) ノードに一括配置(LoRA構文自動入力);Prompts サブタブ:プロンプトをドラッグするとテキスト入力済みの CLIPTextEncode ノードを配置;クリックで全文表示・コピー可能",
helpSidepanel16: "A タブ(AI ツール):翻訳・Chat・TOOLS・設定のサブタブ。Ollama、LM Studio、Lemonade、Unsloth に対応;Chat は LLM とのマルチターン会話;TOOLS は VLM 画像解析とワイルドカード生成に対応;設定は SPA の AI タブと localStorage で共有される。Settings サブタブの「VRAM (Ollama)」→「Unload all now」で、ローカルホストのOllamaにロード中の全モデル(意思決定モデルを含む)をアンロードできます(設定タブ「VRAM調整」と同じ処理)",
helpSidepanel17: "Send to Canvas:WorkflowタブのSend to CanvasまたはGalleryタブのCopy & Send Canvasをクリックするとワークフローをキャンバスへ直接送信(UI形式・API形式どちらも対応);ComfyUIのツールバーから開いていない場合はUI形式のみタイトルドラッグのフォールバック(タイトルが青くなり緑の●が表示される — ドラッグで読み込み)",
helpAiTitle: "AI タブ(A)",
@@ -4338,12 +4338,12 @@ const LANGUAGES = {
helpGen17: "样式批处理:在左窗格Style标签中选择样式,启用批次队列Style列后点击Generate — 每个选中样式依次应用到正向和负向提示词;样式应用于工作流副本,不会修改已加载的工作流;每次页面加载时从 user/default/Workflow-Studio/style/*.json 重新读取样式文件",
helpGen18: "Alt+单击Apply按钮(Positive Prompt / Checkpoint / KSampler)可一步完成Apply & Generate — 将参数写入工作流后立即排队生成;仅当工作流中存在目标节点时才触发生成",
helpGen19: "Lora批处理:应用每个LoRA时,会自动将其语法(<lora:名称:strength_model:strength_clip>)和CivitAI触发词追加到Positive提示词 — 每次都基于原始提示词重新构建,不会累积;批处理完成或停止后提示词会自动恢复到批处理前的状态;若所选LoRA尚未被ComfyUI模型列表识别,会显示警告提示(需在ComfyUI中Refresh或重启)",
helpGen20: "LoRA有两种连接方式:链式连接标准 LoraLoader 节点(每个节点1个LoRA — 需要更多则继续串联节点),或使用单个 Lora Loader (LoraManager) 节点(来自ComfyUI-Lora-Manager自定义节点包,内部保存一个LoRA列表,每个LoRA各自管理启用/模型强度/CLIP强度);下方的Single/Stack标签会根据目标节点类型自动调整行为",
helpGen21: "Single标签:选择一个LoRA并设置Str M/Str C后点击Apply — 若目标是Lora Manager节点,则会将其内部LoRA列表整体替换为仅这一项,其余原有LoRA将丢失",
helpGen20: "LoRA有三种连接方式:链式连接标准 LoraLoader 节点(每个节点1个LoRA — 需要更多则继续串联节点)、使用单个 Lora Loader (LoraManager) 节点(来自ComfyUI-Lora-Manager自定义节点包,内部保存一个LoRA列表,每个LoRA各自管理启用/模型强度/CLIP强度),或使用ComfyUI原生的 Load LoRA (Model) 与 Load LoRA (Text Encoder) 节点对(v0.40及以上;每个节点最多保存20行LoRA/强度/启用 — Model节点使用 Str M,Text Encoder节点使用 Str C,Apply会同时写入两个节点;目前仅支持API格式的工作流 — 因为ComfyUI前端1.55.17无法在其自带图编辑器中为这些节点添加行);下方的Single/Stack标签会根据目标节点类型自动调整行为",
helpGen21: "Single标签:选择一个LoRA并设置Str M/Str C后点击Apply — 若目标是Lora Manager节点,则会将其内部LoRA列表整体替换为仅这一项,其余原有LoRA将丢失;ComfyUI原生 Load LoRA 节点同样会将全部行替换为这一行",
helpGen22: "Stack标签 — Use Stack Group复选框(仅当工作流中存在Lora Manager节点时显示):OFF(加载工作流时的默认状态)显示并编辑Lora Manager节点中实际配置的LoRA;ON则改为显示并编辑Models标签中已注册的\"Stack\"分组;切换任一方向都会先清空节点的LoRA列表,再从新选择的来源加载;切回OFF会精确恢复为加载工作流那一刻的LoRA列表(加载时已保存快照)",
helpGen23: "Stack标签的操作:每行都有启用复选框及Str M / Str C字段;表头的\"Stack\"复选框可一次性切换所有行;顶部的+/-步进按钮可同时调整所有当前启用行的强度;\"Showing: LoRAs currently in workflow\" / \"Showing: registered Stack group\"标签指示当前显示的是哪个来源;点击Apply会将完整列表写回目标节点,并同时将LoRA语法和CivitAI触发词追加到Positive提示词",
helpGen24: "使用 CLIP Text Encode edit+(CLIPTextEncodeEditPlus)节点时的注意事项:当Lora Manager节点的trigger_words输出连接到该节点的text1输入时(RAW/EDIT/front/back模式会将text1与可编辑的text_edit字段组合),触发词在生成时已自动包含;此时点击LoRA的Apply按钮或开启Use Stack Group会额外把LoRA语法/触发词写入text_edit,造成重复 — 如果想保持工作流原始的提示词和LoRA配置不被修改,请保持Use Stack Group为OFF,并避免点击LoRA的Apply类按钮",
helpGen29: "绕过按钮(⛔,位于LoRA列表头,紧邻Refresh Stack group):将目标LoRA节点的强度强制设为0——普通LoraLoader对应strength_model/strength_clip,Lora Manager节点则对应列表中每一项的strength/clipStrength(LoRA列表本身保持不变,不会被替换),不会改动实际ComfyUI节点的mode;再次点击可精确恢复切换前的数值;作用于Single/Stack Apply默认所用的节点(工作流中若有Lora Manager节点则用它,否则用第一个LoRA节点);点击Single或Stack的Apply按钮会清除绕过状态,避免其在之后被无声地重新生效",
helpGen29: "绕过按钮(⛔,位于LoRA列表头,紧邻Refresh Stack group):将目标LoRA节点的强度强制设为0——普通LoraLoader对应strength_model/strength_clip,Lora Manager节点则对应列表中每一项的strength/clipStrength(LoRA列表本身保持不变,不会被替换),ComfyUI原生 Load LoRA 节点则对应两个节点(Model/Text Encoder)所有行的strength(行保持不变),不会改动实际ComfyUI节点的mode;再次点击可精确恢复切换前的数值;作用于Single/Stack Apply默认所用的节点(工作流中若有Lora Manager节点则用它,否则用第一个LoRA节点);点击Single或Stack的Apply按钮会清除绕过状态,避免其在之后被无声地重新生效",
helpGen30: "Save按钮(子标签栏右端)在Batch或Lab子标签处于激活状态时会隐藏,因为它们操作的是工作流副本或各自的Plan文件,而不是当前加载的工作流本身;切换回Input/Model/Settings/Feeder时会重新显示",
helpFeederTitle: "GenerateUI Tab — Feeder 子标签",
helpFeederDesc: "通过左侧面板顶部的 [图片循环] / [图库] 切换按钮可在两种模式间切换。",
@@ -4542,7 +4542,7 @@ const LANGUAGES = {
helpSidepanel12: "⚙ 主题按钮(标题栏):可自定义面板背景、子标题背景、文字颜色、边框及辅助文字颜色,设置保存至localStorage并在下次打开时生效",
helpSidepanel13: "I 标签(Information):拖放 ComfyUI PNG/WebP/MP4/JSON 即可在侧面板内查看模型、LoRA 和提示词元数据 — 子标签:model / lora / Prompts;支持 UnetLoaderGGUF、QuadrupleCLIPLoader 、Lora Loader (LoraManager) 和 ImageMetadataLoRALoader(含API格式)节点类型;MP4会读取SaveVideo写入的workflow/prompt标签,也支持MiniMax H3 ImageToVideo等一体化视频节点的提示词",
helpSidepanel14: "Information 标签 — 拖拽到画布:model 子标签拖拽可放置对应加载节点(Checkpoint → CheckpointLoaderSimple、VAE → VAELoader、Diffusion Model → UNETLoader、Text Encoder → CLIPLoader);双击也可放置到画布中央",
helpSidepanel15: "Information 标签 — lora 子标签:可检测 LoraLoader、LoraLoaderModelOnly 及 Lora Loader (LoraManager) 节点(含API格式)的 LoRA;拖拽单个 LoRA 放置 LoraLoader;「Multiple LORA」区域可将全部 LoRA 一次性放入 Lora Loader (LoraManager) 节点并自动填入LoRA语法;Prompts 子标签:拖拽提示词放置预填文本的 CLIPTextEncode 节点;点击可查看全文并复制",
helpSidepanel15: "Information 标签 — lora 子标签:可检测 LoraLoader、LoraLoaderModelOnly、Lora Loader (LoraManager) 及 ComfyUI 原生 Load LoRA (Model/Text Encoder) 节点(含API格式)的 LoRA;拖拽单个 LoRA 放置 LoraLoader;「Multiple LORA」区域可将全部 LoRA 一次性放入 Lora Loader (LoraManager) 节点并自动填入LoRA语法;Prompts 子标签:拖拽提示词放置预填文本的 CLIPTextEncode 节点;点击可查看全文并复制",
helpSidepanel16: "A 标签(AI 工具):翻译、Chat、TOOLS 和设置子标签,支持 Ollama、LM Studio、Lemonade 或 Unsloth;Chat 支持与 LLM 的多轮对话;TOOLS 包含 VLM 图像分析和通配符生成;设置通过 localStorage 与 SPA 的 AI 标签共享;Settings 子标签的“VRAM (Ollama)”→“Unload all now”可卸载本机 Ollama 已加载的所有模型(包括决策模型,与设置标签“显存调整”相同)",
helpSidepanel17: "Send to Canvas:在Workflow标签点击'Send to Canvas'或Gallery标签点击'Copy & Send Canvas',工作流直接发送到ComfyUI画布(支持UI和API所有格式);若Workflow Studio不是从ComfyUI工具栏打开,UI格式工作流将回退到标题拖拽(标题变蓝并显示绿色●——拖拽到画布加载)",
helpAiTitle: "AI 标签页(A)",
+3 -1
View File
@@ -1353,7 +1353,9 @@ function _applyLabLoraToWorkflow(wf, analysis, lora) {
const bypass = !!lora.nodeBypass;
const strModel = bypass ? 0 : (lora.strengthModel ?? 1.0);
const strClip = bypass ? 0 : (lora.strengthClip ?? 1.0);
if (isLoraManager) {
if (comfyEditor.isLoraStackNode(wf[nodeId])) {
comfyEditor.applyLoraStack([{ name: comfyEditor.resolveLoraName(lora.name), strModel, strClip, enabled: !bypass }], wf);
} else if (isLoraManager) {
const stem = lora.name.replace(/\\/g, "/").split("/").pop().replace(/\.[^.]+$/, "");
wf[nodeId].inputs.loras = {
__value__: [{ name: stem, strength: strModel, active: !bypass, expanded: false, clipStrength: strClip, locked: false }],
+14 -1
View File
@@ -227,7 +227,7 @@ function extractTextEncoders(wf) {
}
function extractLoRAs(wf) {
if (!wf || typeof wf !== "object") return [];
const results = [], seen = new Set();
const results = [], seen = new Set(), stackNames = new Set();
function add(name, sm, sc) {
if (!name || typeof name !== "string" || name === "None" || seen.has(name)) return;
seen.add(name);
@@ -250,6 +250,19 @@ function extractLoRAs(wf) {
if (ct === "LoraLoader") add(n.inputs?.lora_name, n.inputs?.strength_model, n.inputs?.strength_clip);
else if (ct === "LoraLoaderModelOnly") add(n.inputs?.lora_name, n.inputs?.strength, 1.0);
else if (ct === "ImageMetadataLoRALoader") { for (let i = 1; i <= 3; i++) add(n.inputs?.[`lora_${i}`], n.inputs?.[`strength_model_${i}`], n.inputs?.[`strength_clip_${i}`]); }
else if (ct === "LoadLoraModel" || ct === "LoadLoraTextEncoder") {
// Native stack node: DynamicGroup rows are flat API keys "loras.<row>.<field>".
// Model node carries the model strength, Text Encoder node the clip strength.
const isModel = ct === "LoadLoraModel";
for (const [k, name] of Object.entries(n.inputs || {})) {
const m = /^loras\.(\d+)\.lora_name$/.exec(k);
if (!m || typeof name !== "string" || n.inputs[`loras.${m[1]}.enabled`] === false) continue;
const s = n.inputs[`loras.${m[1]}.strength`];
const hit = stackNames.has(name) && results.find((r) => r.name === name);
if (hit) hit[isModel ? "strength_model" : "strength_clip"] = parseFloat(s) || 1.0;
else { add(name, isModel ? s : 1.0, isModel ? 1.0 : s); stackNames.add(name); }
}
}
else if (ct === "Lora Loader (LoraManager)") {
const lorasData = n.inputs?.loras;
const list = lorasData?.__value__ ?? (Array.isArray(lorasData) ? lorasData : null);
+2
View File
@@ -61,6 +61,8 @@ export function applyToGenUI(modelName, modelType) {
__value__: [{ name: stem, strength: 1.0, active: true, expanded: false, clipStrength: 1.0, locked: false }],
};
comfyUI.currentWorkflow[nodeId].inputs.text = `<lora:${stem}:1:1>`;
} else if (comfyEditor.isLoraStackNode(comfyUI.currentWorkflow[nodeId])) {
comfyEditor.applyLoraStack([{ name: comfyEditor.resolveLoraName(modelName) }]);
} else {
comfyUI.currentWorkflow[nodeId].inputs.lora_name = comfyEditor.resolveLoraName(modelName);
}
+3 -3
View File
@@ -1463,12 +1463,12 @@
<div class="wfm-help-card">
<h3 id="wfm-help-gen-card-lora-title">Model Tab — LoRA Details</h3>
<ul>
<li id="wfm-help-gen-20">Two ways LoRAs are attached: a chain of standard <b>LoraLoader</b> nodes (one LoRA per node — add more by chaining additional nodes) or a single <b>Lora Loader (LoraManager)</b> node (from the ComfyUI-Lora-Manager custom node pack) that holds a list of LoRAs internally, each with its own active/model-strength/clip-strength; the Single/Stack tabs below adapt automatically depending on which type the target node is</li>
<li id="wfm-help-gen-21">Single tab: pick one LoRA + Str M/Str C, then Apply — for a Lora Manager node this <b>replaces its entire internal LoRA list with just this one entry</b>, discarding any others it had</li>
<li id="wfm-help-gen-20">Three ways LoRAs are attached: a chain of standard <b>LoraLoader</b> nodes (one LoRA per node — add more by chaining additional nodes), a single <b>Lora Loader (LoraManager)</b> node (from the ComfyUI-Lora-Manager custom node pack) that holds a list of LoRAs internally, each with its own active/model-strength/clip-strength, or ComfyUI's native <b>Load LoRA (Model)</b> + <b>Load LoRA (Text Encoder)</b> node pair (v0.40+; each holds up to 20 rows of LoRA / strength / enabled — the Model node takes Str M, the Text Encoder node takes Str C, and Apply writes both nodes together; API-format workflows only for now, because ComfyUI frontend 1.55.17 cannot add rows to these nodes in its own graph editor); the Single/Stack tabs below adapt automatically depending on which type the target node is</li>
<li id="wfm-help-gen-21">Single tab: pick one LoRA + Str M/Str C, then Apply — for a Lora Manager node this <b>replaces its entire internal LoRA list with just this one entry</b>, discarding any others it had; the native Load LoRA nodes likewise have all their rows replaced by this single row</li>
<li id="wfm-help-gen-22">Stack tab — Use Stack Group checkbox (shown only when a Lora Manager node exists in the workflow): <b>OFF</b> (the default whenever a workflow is loaded) shows and edits the LoRAs actually configured in the workflow's Lora Manager node itself; <b>ON</b> shows and edits the "Stack" group registered in the Models tab instead; switching either direction clears the node's LoRA list first, then loads it from the newly selected source; switching back to OFF restores exactly the LoRA list that was present when the workflow was loaded (captured as a snapshot at load time)</li>
<li id="wfm-help-gen-23">Stack tab controls: each row has an active checkbox and Str M / Str C fields; the header "Stack" checkbox toggles all rows at once; the +/- step buttons adjust the strength of all currently active rows together; a "Showing: LoRAs currently in workflow" / "Showing: registered Stack group" label indicates which source is currently displayed; Apply writes the full list back to the target node and also appends LoRA syntax + CivitAI trigger words to the Positive prompt</li>
<li id="wfm-help-gen-24">Caution for <b>CLIP Text Encode edit+</b> (CLIPTextEncodeEditPlus) nodes: when a Lora Manager node's trigger_words output feeds this node's text1 input (RAW/EDIT/front/back modes combine text1 with the editable text_edit field), trigger words are already included automatically at generation time; clicking a LoRA Apply button or turning on Use Stack Group additionally writes LoRA syntax/trigger words into text_edit, duplicating them — leave Use Stack Group off and avoid the LoRA Apply buttons if you want the workflow's original prompt and LoRA composition to stay unmodified</li>
<li id="wfm-help-gen-29">Bypass button (⛔, in the LoRA column header, next to Refresh Stack group): forces the target LoRA node's strength to 0 — strength_model/strength_clip for a standard LoraLoader, or every entry's strength/clipStrength for a Lora Manager node (its LoRA list is kept intact, not replaced) — without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself on a later toggle</li>
<li id="wfm-help-gen-29">Bypass button (⛔, in the LoRA column header, next to Refresh Stack group): forces the target LoRA node's strength to 0 — strength_model/strength_clip for a standard LoraLoader, every entry's strength/clipStrength for a Lora Manager node (its LoRA list is kept intact, not replaced), or every row's strength on both native Load LoRA nodes (Model and Text Encoder; rows kept) — without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself on a later toggle</li>
</ul>
</div>
</div>
+14 -1
View File
@@ -3240,7 +3240,7 @@ function _extractTextEncoders(wf) {
}
function _extractLoRAs(wf) {
if (!wf || typeof wf !== "object") return [];
const results = [], seen = new Set();
const results = [], seen = new Set(), stackNames = new Set();
function add(name, sm, sc) {
if (!name || typeof name !== "string" || name === "None" || seen.has(name)) return;
seen.add(name);
@@ -3263,6 +3263,19 @@ function _extractLoRAs(wf) {
if (ct === "LoraLoader") add(n.inputs?.lora_name, n.inputs?.strength_model, n.inputs?.strength_clip);
else if (ct === "LoraLoaderModelOnly") add(n.inputs?.lora_name, n.inputs?.strength, 1.0);
else if (ct === "ImageMetadataLoRALoader") { for (let i = 1; i <= 3; i++) add(n.inputs?.[`lora_${i}`], n.inputs?.[`strength_model_${i}`], n.inputs?.[`strength_clip_${i}`]); }
else if (ct === "LoadLoraModel" || ct === "LoadLoraTextEncoder") {
// Native stack node: DynamicGroup rows are flat API keys "loras.<row>.<field>".
// Model node carries the model strength, Text Encoder node the clip strength.
const isModel = ct === "LoadLoraModel";
for (const [k, name] of Object.entries(n.inputs || {})) {
const m = /^loras\.(\d+)\.lora_name$/.exec(k);
if (!m || typeof name !== "string" || n.inputs[`loras.${m[1]}.enabled`] === false) continue;
const s = n.inputs[`loras.${m[1]}.strength`];
const hit = stackNames.has(name) && results.find((r) => r.name === name);
if (hit) hit[isModel ? "strength_model" : "strength_clip"] = parseFloat(s) || 1.0;
else { add(name, isModel ? s : 1.0, isModel ? 1.0 : s); stackNames.add(name); }
}
}
else if (ct === "Lora Loader (LoraManager)") {
const lorasData = n.inputs?.loras;
const list = lorasData?.__value__ ?? (Array.isArray(lorasData) ? lorasData : null);