mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: implement embeddings functionality with context menus, controls, and page management
This commit is contained in:
@@ -33,7 +33,15 @@ export function showModelModal(model, modelType) {
|
||||
model.civitai.trainedWords.map(word => word.replace(/'/g, '\\\'')) : [];
|
||||
|
||||
// Generate model type specific content
|
||||
const typeSpecificContent = modelType === 'loras' ? renderLoraSpecificContent(model, escapedWords) : '';
|
||||
// const typeSpecificContent = modelType === 'loras' ? renderLoraSpecificContent(model, escapedWords) : '';
|
||||
let typeSpecificContent;
|
||||
if (modelType === 'loras') {
|
||||
typeSpecificContent = renderLoraSpecificContent(model, escapedWords);
|
||||
} else if (modelType === 'embeddings') {
|
||||
typeSpecificContent = renderEmbeddingSpecificContent(model, escapedWords);
|
||||
} else {
|
||||
typeSpecificContent = '';
|
||||
}
|
||||
|
||||
// Generate tabs based on model type
|
||||
const tabsContent = modelType === 'loras' ?
|
||||
@@ -248,6 +256,10 @@ function renderLoraSpecificContent(lora, escapedWords) {
|
||||
`;
|
||||
}
|
||||
|
||||
function renderEmbeddingSpecificContent(embedding, escapedWords) {
|
||||
return `${renderTriggerWords(escapedWords, embedding.file_path)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up event handlers using event delegation for LoRA modal
|
||||
* @param {string} filePath - Path to the model file
|
||||
|
||||
Reference in New Issue
Block a user