mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 20:39:25 -03:00
fix: batch URL download dedup by modelId+modelVersionId composite key (#936)
When batch-downloading different versions of the same model, dedup by modelId alone discards the second URL. Use modelId:modelVersionId as the dedup key so users can download, e.g., latest + a specific version.
This commit is contained in:
@@ -218,8 +218,13 @@ export class DownloadManager {
|
|||||||
parsed.push({ url, error: translate('modals.download.errors.invalidUrl') });
|
parsed.push({ url, error: translate('modals.download.errors.invalidUrl') });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (seen.has(result.modelId)) continue;
|
// Dedup by modelId + modelVersionId combo so users can download
|
||||||
seen.add(result.modelId);
|
// different versions of the same model (e.g. latest + a specific version)
|
||||||
|
const dedupKey = result.modelVersionId
|
||||||
|
? `${result.modelId}:${result.modelVersionId}`
|
||||||
|
: result.modelId;
|
||||||
|
if (seen.has(dedupKey)) continue;
|
||||||
|
seen.add(dedupKey);
|
||||||
parsed.push({ url, ...result, error: null });
|
parsed.push({ url, ...result, error: null });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user