mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
feat: implement embeddings functionality with context menus, controls, and page management
This commit is contained in:
@@ -72,6 +72,8 @@ export class FilterManager {
|
||||
tagsEndpoint = '/api/recipes/top-tags?limit=20';
|
||||
} else if (this.currentPage === 'checkpoints') {
|
||||
tagsEndpoint = '/api/checkpoints/top-tags?limit=20';
|
||||
} else if (this.currentPage === 'embeddings') {
|
||||
tagsEndpoint = '/api/embeddings/top-tags?limit=20';
|
||||
}
|
||||
|
||||
const response = await fetch(tagsEndpoint);
|
||||
@@ -147,6 +149,8 @@ export class FilterManager {
|
||||
apiEndpoint = '/api/recipes/base-models';
|
||||
} else if (this.currentPage === 'checkpoints') {
|
||||
apiEndpoint = '/api/checkpoints/base-models';
|
||||
} else if (this.currentPage === 'embeddings') {
|
||||
apiEndpoint = '/api/embeddings/base-models';
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -160,11 +164,7 @@ export class FilterManager {
|
||||
|
||||
data.base_models.forEach(model => {
|
||||
const tag = document.createElement('div');
|
||||
// Add base model classes only for the loras page
|
||||
const baseModelClass = (this.currentPage === 'loras' && BASE_MODEL_CLASSES[model.name])
|
||||
? BASE_MODEL_CLASSES[model.name]
|
||||
: '';
|
||||
tag.className = `filter-tag base-model-tag ${baseModelClass}`;
|
||||
tag.className = `filter-tag base-model-tag`;
|
||||
tag.dataset.baseModel = model.name;
|
||||
tag.innerHTML = `${model.name} <span class="tag-count">${model.count}</span>`;
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ export class SearchManager {
|
||||
loraName: options.loraName || false,
|
||||
loraModel: options.loraModel || false
|
||||
};
|
||||
} else if (this.currentPage === 'loras') {
|
||||
} else if (this.currentPage === 'loras' || this.currentPage === 'embeddings') {
|
||||
pageState.searchOptions = {
|
||||
filename: options.filename || false,
|
||||
modelname: options.modelname || false,
|
||||
|
||||
Reference in New Issue
Block a user