mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
修复:在应用LoRA值到文本时仅包含激活的LoRA
- 在applyLoraValuesToText函数中添加激活状态检查 - 如果LoRA的active属性为false,则跳过该LoRA - 保持向后兼容性:当active属性未定义或为null时,默认视为激活状态 - 确保只有用户选中的LoRA会被应用到工作流文本中
This commit is contained in:
@@ -63,6 +63,12 @@ export function applyLoraValuesToText(originalText, loras) {
|
|||||||
if (!lora || !lora.name) {
|
if (!lora || !lora.name) {
|
||||||
return;
|
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);
|
loraMap.set(lora.name, lora);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user