mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
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:
|
class Api:
|
||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
self.router = APIRouter()
|
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 ):
|
def text2imgapi(self, txt2imgreq: StableDiffusionProcessingAPI ):
|
||||||
populate = txt2imgreq.copy(update={ # Override __init__ params
|
populate = txt2imgreq.copy(update={ # Override __init__ params
|
||||||
|
Loading…
Reference in New Issue
Block a user