mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
add /sdapi/v1/lora endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+4
-3
@@ -5,7 +5,7 @@ from fastapi import FastAPI, APIRouter, Depends, Request
|
||||
from fastapi.security import HTTPBasic, HTTPBasicCredentials
|
||||
from fastapi.exceptions import HTTPException
|
||||
from modules import errors, shared, postprocessing
|
||||
from modules.api import models, endpoints, script, helpers, server, nvml, generate, process, control, gallery, docs
|
||||
from modules.api import models, endpoints, script, helpers, server, nvml, generate, process, control, gallery, loras, docs
|
||||
|
||||
|
||||
errors.install()
|
||||
@@ -100,8 +100,9 @@ class Api:
|
||||
|
||||
# lora api
|
||||
if shared.native:
|
||||
self.add_api_route("/sdapi/v1/loras", endpoints.get_loras, methods=["GET"], response_model=List[dict])
|
||||
self.add_api_route("/sdapi/v1/refresh-loras", endpoints.post_refresh_loras, methods=["POST"])
|
||||
self.add_api_route("/sdapi/v1/lora", loras.get_lora, methods=["GET"], response_model=dict)
|
||||
self.add_api_route("/sdapi/v1/loras", loras.get_loras, methods=["GET"], response_model=List[dict])
|
||||
self.add_api_route("/sdapi/v1/refresh-loras", loras.post_refresh_loras, methods=["POST"])
|
||||
|
||||
# gallery api
|
||||
gallery.register_api(self.app)
|
||||
|
||||
Reference in New Issue
Block a user