diff --git a/server.py b/server.py index a2c078e4..e370e246 100644 --- a/server.py +++ b/server.py @@ -221,6 +221,12 @@ class PromptServer(): def get_embeddings(self): embeddings = folder_paths.get_filename_list("embeddings") return web.json_response(list(map(lambda a: os.path.splitext(a)[0], embeddings))) + + @routes.get("/models") + def list_model_types(request): + model_types = list(folder_paths.folder_names_and_paths.keys()) + + return web.json_response(model_types) @routes.get("/models/{folder}") async def get_models(request):