mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
fix: update model identifier handling in RecipeModal and DownloadManager for consistency
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
import { showToast, copyToClipboard } from '../utils/uiHelpers.js';
|
import { showToast, copyToClipboard } from '../utils/uiHelpers.js';
|
||||||
import { state } from '../state/index.js';
|
import { state } from '../state/index.js';
|
||||||
import { setSessionItem, removeSessionItem } from '../utils/storageHelpers.js';
|
import { setSessionItem, removeSessionItem } from '../utils/storageHelpers.js';
|
||||||
import { updateRecipeCard } from '../utils/cardUpdater.js';
|
|
||||||
import { updateRecipeMetadata } from '../api/recipeApi.js';
|
import { updateRecipeMetadata } from '../api/recipeApi.js';
|
||||||
|
|
||||||
class RecipeModal {
|
class RecipeModal {
|
||||||
@@ -879,7 +878,7 @@ class RecipeModal {
|
|||||||
|
|
||||||
// Model identifiers
|
// Model identifiers
|
||||||
hash: modelFile?.hashes?.SHA256?.toLowerCase() || lora.hash,
|
hash: modelFile?.hashes?.SHA256?.toLowerCase() || lora.hash,
|
||||||
modelVersionId: civitaiInfo.id || lora.modelVersionId,
|
id: civitaiInfo.id || lora.modelVersionId,
|
||||||
|
|
||||||
// Metadata
|
// Metadata
|
||||||
thumbnailUrl: civitaiInfo.images?.[0]?.url || '',
|
thumbnailUrl: civitaiInfo.images?.[0]?.url || '',
|
||||||
|
|||||||
@@ -201,11 +201,10 @@ export class DownloadManager {
|
|||||||
updateProgress(0, completedDownloads, lora.name);
|
updateProgress(0, completedDownloads, lora.name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`lora:`, lora);
|
|
||||||
// Download the LoRA with download ID
|
// Download the LoRA with download ID
|
||||||
const response = await getModelApiClient(MODEL_TYPES.LORA).downloadModel(
|
const response = await getModelApiClient(MODEL_TYPES.LORA).downloadModel(
|
||||||
lora.modelId,
|
lora.modelId,
|
||||||
lora.modelVersionId,
|
lora.id,
|
||||||
loraRoot,
|
loraRoot,
|
||||||
targetPath.replace(loraRoot + '/', ''),
|
targetPath.replace(loraRoot + '/', ''),
|
||||||
batchDownloadId
|
batchDownloadId
|
||||||
|
|||||||
Reference in New Issue
Block a user