mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
refactor: Remove redundant local file fallback and debug logs in showcase file handling
This commit is contained in:
@@ -245,11 +245,6 @@ function findLocalFile(img, index, exampleFiles) {
|
|||||||
const match = file.name.match(/image_(\d+)\./);
|
const match = file.name.match(/image_(\d+)\./);
|
||||||
return match && parseInt(match[1]) === index;
|
return match && parseInt(match[1]) === index;
|
||||||
});
|
});
|
||||||
|
|
||||||
// If not found by index, just use the same position in the array if available
|
|
||||||
if (!localFile && index < exampleFiles.length) {
|
|
||||||
localFile = exampleFiles[index];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return localFile;
|
return localFile;
|
||||||
@@ -406,9 +401,6 @@ async function handleImportFiles(files, modelHash, importContainer) {
|
|||||||
const customImages = result.custom_images || [];
|
const customImages = result.custom_images || [];
|
||||||
// Combine both arrays for rendering
|
// Combine both arrays for rendering
|
||||||
const allImages = [...regularImages, ...customImages];
|
const allImages = [...regularImages, ...customImages];
|
||||||
console.log("Regular images:", regularImages);
|
|
||||||
console.log("Custom images:", customImages);
|
|
||||||
console.log("Combined images:", allImages);
|
|
||||||
showcaseTab.innerHTML = renderShowcaseContent(allImages, updatedFilesResult.files, true);
|
showcaseTab.innerHTML = renderShowcaseContent(allImages, updatedFilesResult.files, true);
|
||||||
|
|
||||||
// Re-initialize showcase functionality
|
// Re-initialize showcase functionality
|
||||||
|
|||||||
Reference in New Issue
Block a user