mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-10 03:02:13 -08:00
fix: remove cmp
by ChatGPT
This commit is contained in:
parent
0492424121
commit
fd672a79af
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ class EmbeddingDatabase:
|
|||
if first_id not in self.ids_lookup:
|
||||
self.ids_lookup[first_id] = []
|
||||
|
||||
self.ids_lookup[first_id] = sorted(self.ids_lookup[first_id] + [(ids, embedding)], key=lambda x: len(x[0]), reverse=True, cmp=lambda x, y: x.lower() > y.lower())
|
||||
self.ids_lookup[first_id] = sorted(self.ids_lookup[first_id] + [(ids, embedding)], key=lambda x: (len(x[0]), x[0].casefold()), reverse=True)
|
||||
|
||||
return embedding
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue