mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: enhance bulk operations panel styling and update downloadExampleImages method to accept optional modelTypes parameter
This commit is contained in:
@@ -281,22 +281,14 @@ function showExampleAccessModal(card, modelType) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine model type (singular form)
|
||||
let modelTypeSingular = 'lora';
|
||||
if (modelType === MODEL_TYPES.CHECKPOINT) {
|
||||
modelTypeSingular = 'checkpoint';
|
||||
} else if (modelType === MODEL_TYPES.EMBEDDING) {
|
||||
modelTypeSingular = 'embedding';
|
||||
}
|
||||
|
||||
// Close the modal
|
||||
modalManager.closeModal('exampleAccessModal');
|
||||
|
||||
try {
|
||||
// Use the appropriate model API client to download examples
|
||||
const apiClient = getModelApiClient(modelType);
|
||||
await apiClient.downloadExampleImages([modelHash], [modelTypeSingular]);
|
||||
|
||||
await apiClient.downloadExampleImages([modelHash]);
|
||||
|
||||
// Open the example images folder if successful
|
||||
openExampleImagesFolder(modelHash);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user