From 6acbeb6f408295fd07ba4963d6aedd53bd3c249b Mon Sep 17 00:00:00 2001 From: Towsty Date: Fri, 4 Sep 2026 15:43:38 -0500 Subject: [PATCH] Show untagged LoRAs in pickers again after dropping them in the folder. The Sep 2 engine filter required a flux-/krea- name tag, so newly added files were discovered but hidden. Only hide files clearly tagged for the other engine. Co-authored-by: Cursor --- utils/loras.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/loras.ts b/utils/loras.ts index 5138e96..519babd 100644 --- a/utils/loras.ts +++ b/utils/loras.ts @@ -261,7 +261,9 @@ export function imageLoraEngineOf(name: string): 'flux' | 'krea' | null { } export function loraMatchesImageEngine(name: string, engine: 'flux' | 'krea') { - return imageLoraEngineOf(name) === engine + const tagged = imageLoraEngineOf(name) + // Untagged files stay visible. Only hide clearly wrong-engine names. + return !tagged || tagged === engine } export function filterLorasForImageEngine(names: string[], engine: 'flux' | 'krea') { @@ -304,7 +306,10 @@ export function inferLoraUse(name: string): LoraUse[] | null { export function loraMatchesUse(name: string, use: LoraUse) { if (isSystemGraphLora(name)) return false - if (use === 'flux' || use === 'krea') return imageLoraEngineOf(name) === use + if (use === 'flux' || use === 'krea') { + const tagged = imageLoraEngineOf(name) + return !tagged || tagged === use + } const inferred = inferLoraUse(name) if (!inferred) return true return inferred.includes(use)