mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
@@ -1,4 +1,4 @@
|
||||
import { createLoraCard, setupLoraCardEventDelegation } from '../components/LoraCard.js';
|
||||
import { createLoraCard } from '../components/LoraCard.js';
|
||||
import {
|
||||
loadMoreModels,
|
||||
resetAndReload as baseResetAndReload,
|
||||
@@ -45,9 +45,6 @@ export async function excludeLora(filePath) {
|
||||
}
|
||||
|
||||
export async function loadMoreLoras(resetPage = false, updateFolders = false) {
|
||||
// Make sure event delegation is set up
|
||||
setupLoraCardEventDelegation();
|
||||
|
||||
return loadMoreModels({
|
||||
resetPage,
|
||||
updateFolders,
|
||||
@@ -73,6 +70,16 @@ export async function replacePreview(filePath) {
|
||||
return replaceModelPreview(filePath, 'lora');
|
||||
}
|
||||
|
||||
export function appendLoraCards(loras) {
|
||||
const grid = document.getElementById('loraGrid');
|
||||
const sentinel = document.getElementById('scroll-sentinel');
|
||||
|
||||
loras.forEach(lora => {
|
||||
const card = createLoraCard(lora);
|
||||
grid.appendChild(card);
|
||||
});
|
||||
}
|
||||
|
||||
export async function resetAndReload(updateFolders = false) {
|
||||
return baseResetAndReload({
|
||||
updateFolders,
|
||||
|
||||
Reference in New Issue
Block a user