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:
+11
-6
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user