Put API under /sdapi/ so that routing is simpler in the future. This means that one could allow access to /sdapi/ but not the webui.
This commit is contained in:
parent
c3851a853d
commit
247aeb3aaa
|
@ -18,7 +18,7 @@ class TextToImageResponse(BaseModel):
|
|||
class Api:
|
||||
def __init__(self, app):
|
||||
self.router = APIRouter()
|
||||
app.add_api_route("/v1/txt2img", self.text2imgapi, methods=["POST"])
|
||||
app.add_api_route("/sdapi/v1/txt2img", self.text2imgapi, methods=["POST"])
|
||||
|
||||
def text2imgapi(self, txt2imgreq: StableDiffusionProcessingAPI ):
|
||||
populate = txt2imgreq.copy(update={ # Override __init__ params
|
||||
|
|
Loading…
Reference in New Issue
Block a user