"...gpu/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "2013da67636abf369b78078f6d1712707173be17"
Commit 3ff4c155 authored by comfyanonymous's avatar comfyanonymous
Browse files

Fix /embeddings route being broken.

parent edfc4ca6
...@@ -2,6 +2,7 @@ import os ...@@ -2,6 +2,7 @@ import os
import sys import sys
import asyncio import asyncio
import nodes import nodes
import folder_paths
import execution import execution
import uuid import uuid
import json import json
...@@ -75,10 +76,7 @@ class PromptServer(): ...@@ -75,10 +76,7 @@ class PromptServer():
@routes.get("/embeddings") @routes.get("/embeddings")
def get_embeddings(self): def get_embeddings(self):
models_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "models") embeddings = folder_paths.get_filename_list("embeddings")
embed_dir = os.path.join(models_dir, "embeddings")
embeddings = nodes.filter_files_extensions(nodes.recursive_search(embed_dir), nodes.supported_pt_extensions)
return web.json_response(list(map(lambda a: os.path.splitext(a)[0].lower(), embeddings))) return web.json_response(list(map(lambda a: os.path.splitext(a)[0].lower(), embeddings)))
@routes.get("/extensions") @routes.get("/extensions")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment