Stop deleted LoRAs from sticking in the picker.

A cache merge that preferred the longer list was keeping removed files forever. Fresh Comfy lists now replace the cache, including shrinks, and xiagen- typos stay off AIGen like xaigen-.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-04 21:45:31 -05:00
co-authored by Cursor
parent d50719e1a7
commit b481c4e3ad
3 changed files with 14 additions and 22 deletions
+11 -6
View File
@@ -3923,15 +3923,20 @@ async function pollLoras() {
const left = new Set(a)
return b.every(name => left.has(name))
}
if (nextVideo.length && !sameNameSet(videoLoras.value, nextVideo)) {
videoLoras.value = nextVideo
rememberLoraNames('aigen-lora-names-video', nextVideo)
// A successful non-empty Comfy list always wins — including when it shrank after a delete.
if (nextVideo.length) {
if (!sameNameSet(videoLoras.value, nextVideo)) {
videoLoras.value = nextVideo
rememberLoraNames('aigen-lora-names-video', nextVideo)
}
} else if (!videoLoras.value.length) {
videoLoras.value = readStoredLoraNames('aigen-lora-names-video')
}
if (nextImage.length && !sameNameSet(imageLoras.value, nextImage)) {
imageLoras.value = nextImage
rememberLoraNames('aigen-lora-names-image', nextImage)
if (nextImage.length) {
if (!sameNameSet(imageLoras.value, nextImage)) {
imageLoras.value = nextImage
rememberLoraNames('aigen-lora-names-image', nextImage)
}
} else if (!imageLoras.value.length) {
imageLoras.value = readStoredLoraNames('aigen-lora-names-image')
}