mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
feat: Rename download endpoint from /api/download-lora to /api/download-model and update related logic
This commit is contained in:
@@ -330,13 +330,13 @@ export class CheckpointDownloadManager {
|
||||
};
|
||||
|
||||
// Start download using checkpoint download endpoint
|
||||
const response = await fetch('/api/checkpoints/download', {
|
||||
const response = await fetch('/api/download-model', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
model_id: this.modelId,
|
||||
model_version_id: this.currentVersion.id,
|
||||
checkpoint_root: checkpointRoot,
|
||||
model_root: checkpointRoot,
|
||||
relative_path: targetFolder
|
||||
})
|
||||
});
|
||||
|
||||
@@ -340,13 +340,13 @@ export class DownloadManager {
|
||||
};
|
||||
|
||||
// Start download
|
||||
const response = await fetch('/api/download-lora', {
|
||||
const response = await fetch('/api/download-model', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
model_id: this.modelId,
|
||||
model_version_id: this.currentVersion.id,
|
||||
lora_root: loraRoot,
|
||||
model_root: loraRoot,
|
||||
relative_path: targetFolder
|
||||
})
|
||||
});
|
||||
|
||||
@@ -189,14 +189,14 @@ export class DownloadManager {
|
||||
|
||||
try {
|
||||
// Download the LoRA
|
||||
const response = await fetch('/api/download-lora', {
|
||||
const response = await fetch('/api/download-model', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
download_url: lora.downloadUrl,
|
||||
model_version_id: lora.modelVersionId,
|
||||
model_hash: lora.hash,
|
||||
lora_root: loraRoot,
|
||||
model_root: loraRoot,
|
||||
relative_path: targetPath.replace(loraRoot + '/', '')
|
||||
})
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ export const apiRoutes = {
|
||||
delete: (id) => `/api/loras/${id}`,
|
||||
update: (id) => `/api/loras/${id}`,
|
||||
civitai: (id) => `/api/loras/${id}/civitai`,
|
||||
download: '/api/download-lora',
|
||||
download: '/api/download-model',
|
||||
move: '/api/move-lora',
|
||||
scan: '/api/scan-loras'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user