Revert "Show untagged LoRAs in pickers again after dropping them in the folder."
This reverts commit 6acbeb6f40.
This commit is contained in:
+2
-7
@@ -261,9 +261,7 @@ export function imageLoraEngineOf(name: string): 'flux' | 'krea' | null {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function loraMatchesImageEngine(name: string, engine: 'flux' | 'krea') {
|
export function loraMatchesImageEngine(name: string, engine: 'flux' | 'krea') {
|
||||||
const tagged = imageLoraEngineOf(name)
|
return imageLoraEngineOf(name) === engine
|
||||||
// Untagged files stay visible. Only hide clearly wrong-engine names.
|
|
||||||
return !tagged || tagged === engine
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function filterLorasForImageEngine(names: string[], engine: 'flux' | 'krea') {
|
export function filterLorasForImageEngine(names: string[], engine: 'flux' | 'krea') {
|
||||||
@@ -306,10 +304,7 @@ export function inferLoraUse(name: string): LoraUse[] | null {
|
|||||||
|
|
||||||
export function loraMatchesUse(name: string, use: LoraUse) {
|
export function loraMatchesUse(name: string, use: LoraUse) {
|
||||||
if (isSystemGraphLora(name)) return false
|
if (isSystemGraphLora(name)) return false
|
||||||
if (use === 'flux' || use === 'krea') {
|
if (use === 'flux' || use === 'krea') return imageLoraEngineOf(name) === use
|
||||||
const tagged = imageLoraEngineOf(name)
|
|
||||||
return !tagged || tagged === use
|
|
||||||
}
|
|
||||||
const inferred = inferLoraUse(name)
|
const inferred = inferLoraUse(name)
|
||||||
if (!inferred) return true
|
if (!inferred) return true
|
||||||
return inferred.includes(use)
|
return inferred.includes(use)
|
||||||
|
|||||||
Reference in New Issue
Block a user