Merge pull request #668 from Aaalice233/main

修复:在应用LoRA值到文本时仅包含激活的LoRA
This commit is contained in:
pixelpaws
2025-11-14 15:19:32 +08:00
committed by GitHub

View File

@@ -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);
}); });