Skip to content

Search is broken in v0.9.5 (at least for me) #44

@artyfacialintelagent

Description

@artyfacialintelagent

I'm a ComfyUI user so I don't bother with the sidebar metadata filters. All I ever do is live search with the dropdown set to "Any field".

But this no longer works in v0.9.5. I start from scratch (clear the cache) and let it load and index all my 130k+ images. Then when I type anything in the search box only about 20% of the letters I type appear and the search results don't change. E,g, if I type "wan" then only the n appears, and I see this error in the dev console:

index-elEySbO2.js:40 Uncaught TypeError: s.toLowerCase is not a function
    at index-elEySbO2.js:40:62284
    at Array.map (<anonymous>)
    at vS (index-elEySbO2.js:40:62275)
    at index-elEySbO2.js:40:63984
    at Array.filter (<anonymous>)
    at s (index-elEySbO2.js:40:63913)
    at index-elEySbO2.js:40:69372
    at r (index-elEySbO2.js:40:57736)
    at setSearchQuery (index-elEySbO2.js:40:69362)
    at onChange (index-elEySbO2.js:244:28006)

I'm sure you would have picked up on this if it affected everyone, but I can't tell what is special about my system except that I have a big database. The errors I previously saw on indexing are all gone. I'll roll back to v0.9.4 until you have a patch.

EDIT: Here's more context from the console. When I click on the error for index-elEySbO2.js:40:62284 the console jumps to this generated js with the error on the marked line:

  , vS = e => {
    var n, r;
    if (e.enrichmentState !== "enriched")
        return "";
    const t = [];
    return e.metadataString && t.push(e.metadataString.toLowerCase()),
    e.prompt && t.push(e.prompt.toLowerCase()),
    e.negativePrompt && t.push(e.negativePrompt.toLowerCase()),
    (n = e.models) != null && n.length && t.push(e.models.map(s => s.toLowerCase()).join(" ")),
    (r = e.loras) != null && r.length && t.push(e.loras.map(s => s.toLowerCase()).join(" ")),        // ERROR HERE
    e.scheduler && t.push(e.scheduler.toLowerCase()),
    e.board && t.push(e.board.toLowerCase()),
    t.join(" ")
}

So I guess the error comes from this line:

segments.push(image.loras.map(lora => lora.toLowerCase()).join(' '));

And probably the cause is that one of my LoRA names in one of my images is not identified as a string, but I can't tell which one.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions