mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-23 22:22:11 -03:00
refactor: centralize resetAndReload functionality in baseModelApi
This commit is contained in:
@@ -754,4 +754,8 @@ export function getModelApiClient() {
|
||||
}
|
||||
_singletonClient.setModelType(state.currentPageType);
|
||||
return _singletonClient;
|
||||
}
|
||||
|
||||
export async function resetAndReload(updateFolders = false) {
|
||||
return getModelApiClient().loadMoreWithVirtualScroll(true, updateFolders);
|
||||
}
|
||||
@@ -22,10 +22,6 @@ export async function loadMoreCheckpoints(resetPage = false, updateFolders = fal
|
||||
return checkpointApiClient.loadMoreWithVirtualScroll(resetPage, updateFolders);
|
||||
}
|
||||
|
||||
export async function resetAndReload(updateFolders = false) {
|
||||
return checkpointApiClient.loadMoreWithVirtualScroll(true, updateFolders);
|
||||
}
|
||||
|
||||
// Checkpoint-specific functions
|
||||
export async function getCheckpointInfo(name) {
|
||||
try {
|
||||
|
||||
@@ -22,10 +22,6 @@ export async function loadMoreLoras(resetPage = false, updateFolders = false) {
|
||||
return loraApiClient.loadMoreWithVirtualScroll(resetPage, updateFolders);
|
||||
}
|
||||
|
||||
export async function resetAndReload(updateFolders = false) {
|
||||
return loraApiClient.loadMoreWithVirtualScroll(true, updateFolders);
|
||||
}
|
||||
|
||||
// LoRA-specific functions that don't have common equivalents
|
||||
export async function fetchModelDescription(modelId, filePath) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user