Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
04924241
Commit
04924241
authored
Mar 12, 2023
by
bluelovers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: try sort as ignore-case
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8368
parent
0cc0ee1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
extensions-builtin/Lora/lora.py
extensions-builtin/Lora/lora.py
+1
-1
modules/shared.py
modules/shared.py
+1
-1
modules/textual_inversion/textual_inversion.py
modules/textual_inversion/textual_inversion.py
+2
-2
No files found.
extensions-builtin/Lora/lora.py
View file @
04924241
...
...
@@ -192,7 +192,7 @@ def list_available_loras():
glob
.
glob
(
os
.
path
.
join
(
shared
.
cmd_opts
.
lora_dir
,
'**/*.safetensors'
),
recursive
=
True
)
+
\
glob
.
glob
(
os
.
path
.
join
(
shared
.
cmd_opts
.
lora_dir
,
'**/*.ckpt'
),
recursive
=
True
)
for
filename
in
sorted
(
candidates
):
for
filename
in
sorted
(
candidates
,
key
=
str
.
lower
):
if
os
.
path
.
isdir
(
filename
):
continue
...
...
modules/shared.py
View file @
04924241
...
...
@@ -702,7 +702,7 @@ mem_mon.start()
def
listfiles
(
dirname
):
filenames
=
[
os
.
path
.
join
(
dirname
,
x
)
for
x
in
sorted
(
os
.
listdir
(
dirname
))
if
not
x
.
startswith
(
"."
)]
filenames
=
[
os
.
path
.
join
(
dirname
,
x
)
for
x
in
sorted
(
os
.
listdir
(
dirname
)
,
key
=
str
.
lower
)
if
not
x
.
startswith
(
"."
)]
return
[
file
for
file
in
filenames
if
os
.
path
.
isfile
(
file
)]
...
...
modules/textual_inversion/textual_inversion.py
View file @
04924241
...
...
@@ -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
)
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
()
)
return
embedding
...
...
@@ -196,7 +196,7 @@ class EmbeddingDatabase:
return
for
root
,
dirs
,
fns
in
os
.
walk
(
embdir
.
path
,
followlinks
=
True
):
for
fn
in
fns
:
for
fn
in
sorted
(
fns
,
key
=
str
.
lower
)
:
try
:
fullfn
=
os
.
path
.
join
(
root
,
fn
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment