feat: add model exclution functionality frontend

This commit is contained in:
Will Miao
2025-05-03 15:43:04 +08:00
parent ec1c92a714
commit 611dd33c75
15 changed files with 175 additions and 44 deletions

View File

@@ -6,7 +6,8 @@ import {
deleteModel as baseDeleteModel,
replaceModelPreview,
fetchCivitaiMetadata,
refreshSingleModelMetadata
refreshSingleModelMetadata,
excludeModel as baseExcludeModel
} from './baseModelApi.js';
/**
@@ -34,6 +35,15 @@ export async function saveModelMetadata(filePath, data) {
return response.json();
}
/**
* Exclude a lora model from being shown in the UI
* @param {string} filePath - File path of the model to exclude
* @returns {Promise<boolean>} Promise resolving to success status
*/
export async function excludeLora(filePath) {
return baseExcludeModel(filePath, 'lora');
}
export async function loadMoreLoras(resetPage = false, updateFolders = false) {
return loadMoreModels({
resetPage,