From 425c33ae001820925e4817358c05570349582136 Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Mon, 11 Aug 2025 17:13:42 +0800 Subject: [PATCH] fix: update model identifier handling in RecipeModal and DownloadManager for consistency --- static/js/components/RecipeModal.js | 3 +-- static/js/managers/import/DownloadManager.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/static/js/components/RecipeModal.js b/static/js/components/RecipeModal.js index 00ad0b0b..f4de7dd5 100644 --- a/static/js/components/RecipeModal.js +++ b/static/js/components/RecipeModal.js @@ -2,7 +2,6 @@ import { showToast, copyToClipboard } from '../utils/uiHelpers.js'; import { state } from '../state/index.js'; import { setSessionItem, removeSessionItem } from '../utils/storageHelpers.js'; -import { updateRecipeCard } from '../utils/cardUpdater.js'; import { updateRecipeMetadata } from '../api/recipeApi.js'; class RecipeModal { @@ -879,7 +878,7 @@ class RecipeModal { // Model identifiers hash: modelFile?.hashes?.SHA256?.toLowerCase() || lora.hash, - modelVersionId: civitaiInfo.id || lora.modelVersionId, + id: civitaiInfo.id || lora.modelVersionId, // Metadata thumbnailUrl: civitaiInfo.images?.[0]?.url || '', diff --git a/static/js/managers/import/DownloadManager.js b/static/js/managers/import/DownloadManager.js index 59638ff7..55fb3d38 100644 --- a/static/js/managers/import/DownloadManager.js +++ b/static/js/managers/import/DownloadManager.js @@ -201,11 +201,10 @@ export class DownloadManager { updateProgress(0, completedDownloads, lora.name); try { - console.log(`lora:`, lora); // Download the LoRA with download ID const response = await getModelApiClient(MODEL_TYPES.LORA).downloadModel( lora.modelId, - lora.modelVersionId, + lora.id, loraRoot, targetPath.replace(loraRoot + '/', ''), batchDownloadId