fix: update model identifier handling in RecipeModal and DownloadManager for consistency

This commit is contained in:
Will Miao
2025-08-11 17:13:42 +08:00
parent c9289ed2dc
commit 425c33ae00
2 changed files with 2 additions and 4 deletions

View File

@@ -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 || '',

View File

@@ -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