mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
fix(loras): include folder prefix in context menu and bulk send-to-workflow
When using full path lora syntax, the context menu (single/bulk) and bulk copy actions were passing only the file basename to buildLoraSyntax(), ignoring the folder prefix. This caused the output to look like legacy A1111 format even when full path mode was enabled. Aligns all entry points with ModelCard.handleSendToWorkflow(), which correctly includes the folder prefix. Also fixes selectAllVisibleModels() to cache the folder field, preventing missing prefix on select-all-then-send flows.
This commit is contained in:
@@ -397,6 +397,7 @@ export class BulkManager {
|
||||
const updated = {
|
||||
...existing,
|
||||
fileName: card.dataset.file_name ?? existing.fileName,
|
||||
folder: card.dataset.folder ?? existing.folder,
|
||||
usageTips: card.dataset.usage_tips ?? existing.usageTips,
|
||||
modelName: card.dataset.name ?? existing.modelName,
|
||||
};
|
||||
@@ -494,7 +495,8 @@ export class BulkManager {
|
||||
|
||||
if (metadata) {
|
||||
const usageTips = JSON.parse(metadata.usageTips || '{}');
|
||||
loraSyntaxes.push(buildLoraSyntax(metadata.fileName, usageTips));
|
||||
const loraName = metadata.folder ? `${metadata.folder}/${metadata.fileName}` : metadata.fileName;
|
||||
loraSyntaxes.push(buildLoraSyntax(loraName, usageTips));
|
||||
} else {
|
||||
missingLoras.push(filepath);
|
||||
}
|
||||
@@ -537,7 +539,8 @@ export class BulkManager {
|
||||
|
||||
if (metadata) {
|
||||
const usageTips = JSON.parse(metadata.usageTips || '{}');
|
||||
loraSyntaxes.push(buildLoraSyntax(metadata.fileName, usageTips));
|
||||
const loraName = metadata.folder ? `${metadata.folder}/${metadata.fileName}` : metadata.fileName;
|
||||
loraSyntaxes.push(buildLoraSyntax(loraName, usageTips));
|
||||
} else {
|
||||
missingLoras.push(filepath);
|
||||
}
|
||||
@@ -674,6 +677,7 @@ export class BulkManager {
|
||||
const modelId = this.parseModelId(item?.civitai?.modelId);
|
||||
metadataCache.set(item.file_path, {
|
||||
fileName: item.file_name,
|
||||
folder: item.folder || '',
|
||||
usageTips: item.usage_tips || '{}',
|
||||
modelName: item.name || item.file_name,
|
||||
...(modelId !== null ? { modelId } : {})
|
||||
|
||||
Reference in New Issue
Block a user