mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 12:39:23 -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') });
|
||||
continue;
|
||||
}
|
||||
if (seen.has(result.modelId)) continue;
|
||||
seen.add(result.modelId);
|
||||
// Dedup by modelId + modelVersionId combo so users can download
|
||||
// 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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user