From 1cdbb9a85180bb8308fb64be827d417b96574559 Mon Sep 17 00:00:00 2001 From: Luna_K <65744111+Aaalice233@users.noreply.github.com> Date: Fri, 14 Nov 2025 13:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=9C=A8=E5=BA=94?= =?UTF-8?q?=E7=94=A8LoRA=E5=80=BC=E5=88=B0=E6=96=87=E6=9C=AC=E6=97=B6?= =?UTF-8?q?=E4=BB=85=E5=8C=85=E5=90=AB=E6=BF=80=E6=B4=BB=E7=9A=84LoRA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在applyLoraValuesToText函数中添加激活状态检查 - 如果LoRA的active属性为false,则跳过该LoRA - 保持向后兼容性:当active属性未定义或为null时,默认视为激活状态 - 确保只有用户选中的LoRA会被应用到工作流文本中 --- web/comfyui/lora_syntax_utils.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/comfyui/lora_syntax_utils.js b/web/comfyui/lora_syntax_utils.js index b7be3d2b..9c05f9eb 100644 --- a/web/comfyui/lora_syntax_utils.js +++ b/web/comfyui/lora_syntax_utils.js @@ -63,6 +63,12 @@ export function applyLoraValuesToText(originalText, loras) { if (!lora || !lora.name) { return; } + // Only include active LoRAs in the map + // If active property is missing (undefined/null), treat as active for backward compatibility + const isActive = lora.active === undefined || lora.active === null || lora.active === true; + if (!isActive) { + return; + } loraMap.set(lora.name, lora); });