feat(misc): add VAE and Upscaler model management page

This commit is contained in:
Will Miao
2026-01-31 07:28:10 +08:00
parent b86bd44c65
commit 0a340d397c
37 changed files with 1164 additions and 38 deletions

View File

@@ -68,6 +68,9 @@ export const MODEL_SUBTYPE_DISPLAY_NAMES = {
diffusion_model: "Diffusion Model",
// Embedding sub-types
embedding: "Embedding",
// Misc sub-types
vae: "VAE",
upscaler: "Upscaler",
};
// Backward compatibility alias
@@ -81,6 +84,8 @@ export const MODEL_SUBTYPE_ABBREVIATIONS = {
checkpoint: "CKPT",
diffusion_model: "DM",
embedding: "EMB",
vae: "VAE",
upscaler: "UP",
};
export function getSubTypeAbbreviation(subType) {

View File

@@ -28,10 +28,9 @@ async function getCardCreator(pageType) {
// Function to get the appropriate data fetcher based on page type
async function getDataFetcher(pageType) {
if (pageType === 'loras' || pageType === 'embeddings' || pageType === 'checkpoints') {
if (pageType === 'loras' || pageType === 'embeddings' || pageType === 'checkpoints' || pageType === 'misc') {
return (page = 1, pageSize = 100) => getModelApiClient().fetchModelsPage(page, pageSize);
} else if (pageType === 'recipes') {
// Import the recipeApi module and use the fetchRecipesPage function
const { fetchRecipesPage } = await import('../api/recipeApi.js');
return fetchRecipesPage;
}