feat: enhance LoRA metadata handling by adding model IDs and updating recipe data structure. Fixes #246

This commit is contained in:
Will Miao
2025-06-24 11:12:21 +08:00
parent f6ef428008
commit d0ed1213d8
9 changed files with 38 additions and 58 deletions

View File

@@ -950,13 +950,6 @@ class RecipeModal {
// Remove .safetensors extension if present
fileName = fileName.replace(/\.safetensors$/, '');
// Get the deleted lora data
const deletedLora = this.currentRecipe.loras[loraIndex];
if (!deletedLora) {
showToast('Error: Could not find the LoRA in the recipe', 'error');
return;
}
state.loadingManager.showSimpleLoading('Reconnecting LoRA...');
// Call API to reconnect the LoRA
@@ -967,7 +960,7 @@ class RecipeModal {
},
body: JSON.stringify({
recipe_id: this.recipeId,
lora_data: deletedLora,
lora_index: loraIndex,
target_name: fileName
})
});