aboutsummaryrefslogtreecommitdiffstats
path: root/modules/api/models.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-29 19:09:19 +0000
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-29 19:09:19 +0000
commit4609b83cd496013a05e77c42af031d89f07785a9 (patch)
treedfb6b5eefe658da2ef6c1fa8a0450f79d64cb8da /modules/api/models.py
parent35c45df28b303a05d56a13cb56d4046f08cf8c25 (diff)
downloadstable-diffusion-webui-gfx803-4609b83cd496013a05e77c42af031d89f07785a9.tar.gz
stable-diffusion-webui-gfx803-4609b83cd496013a05e77c42af031d89f07785a9.tar.bz2
stable-diffusion-webui-gfx803-4609b83cd496013a05e77c42af031d89f07785a9.zip
Add PNG Info endpoint
Diffstat (limited to 'modules/api/models.py')
-rw-r--r--modules/api/models.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/api/models.py b/modules/api/models.py
index dd122321..58e8e58b 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -1,4 +1,5 @@
import inspect
+from click import prompt
from pydantic import BaseModel, Field, create_model
from typing import Any, Optional
from typing_extensions import Literal
@@ -148,4 +149,10 @@ class ExtrasBatchImagesRequest(ExtrasBaseRequest):
imageList: list[FileData] = Field(title="Images", description="List of images to work on. Must be Base64 strings")
class ExtrasBatchImagesResponse(ExtraBaseResponse):
- images: list[str] = Field(title="Images", description="The generated images in base64 format.") \ No newline at end of file
+ images: list[str] = Field(title="Images", description="The generated images in base64 format.")
+
+class PNGInfoRequest(BaseModel):
+ image: str = Field(title="Image", description="The base64 encoded PNG image")
+
+class PNGInfoResponse(BaseModel):
+ info: str = Field(title="Image info", description="A string with all the info the image had") \ No newline at end of file