Don't include empty lora values in the metadata

This commit is contained in:
cmdr2
2023-08-18 17:03:41 +05:30
parent e80db71d1c
commit 1190bedafd
2 changed files with 34 additions and 41 deletions

View File

@ -292,6 +292,10 @@ const TASK_MAPPING = {
use_lora_model: {
name: "LoRA model",
setUI: (use_lora_model) => {
if (!use_lora_model) {
return
}
let modelPaths = []
use_lora_model.forEach((m) => {
if (m.includes("models\\lora\\")) {
@ -329,6 +333,10 @@ const TASK_MAPPING = {
lora_alpha: {
name: "LoRA Strength",
setUI: (lora_alpha) => {
if (!lora_alpha) {
return
}
loraModelField.modelWeights = lora_alpha
},
readUI: () => {