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 <cursoragent@cursor.com>
This commit is contained in:
+7
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user