Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
3ff4c155
Commit
3ff4c155
authored
Mar 19, 2023
by
comfyanonymous
Browse files
Fix /embeddings route being broken.
parent
edfc4ca6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
server.py
server.py
+2
-4
No files found.
server.py
View file @
3ff4c155
...
...
@@ -2,6 +2,7 @@ import os
import
sys
import
asyncio
import
nodes
import
folder_paths
import
execution
import
uuid
import
json
...
...
@@ -75,10 +76,7 @@ class PromptServer():
@
routes
.
get
(
"/embeddings"
)
def
get_embeddings
(
self
):
models_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
"models"
)
embed_dir
=
os
.
path
.
join
(
models_dir
,
"embeddings"
)
embeddings
=
nodes
.
filter_files_extensions
(
nodes
.
recursive_search
(
embed_dir
),
nodes
.
supported_pt_extensions
)
embeddings
=
folder_paths
.
get_filename_list
(
"embeddings"
)
return
web
.
json_response
(
list
(
map
(
lambda
a
:
os
.
path
.
splitext
(
a
)[
0
].
lower
(),
embeddings
)))
@
routes
.
get
(
"/extensions"
)
...
...
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