aboutsummaryrefslogtreecommitdiffstats
path: root/modules/api/models.py
diff options
context:
space:
mode:
authorpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2022-12-10 08:02:39 +0000
committerGitHub <noreply@github.com>2022-12-10 08:02:39 +0000
commit6387043fd2c3311d66690ff27d7da0e030b29cd8 (patch)
tree075559ce3e52511cdd459da2b4cc33360d6eb258 /modules/api/models.py
parent00ebc26c4e2962a31e067539d89cd695d999539a (diff)
parent1d01404c5615debfca24f7fbe429ddd2f5b11eb9 (diff)
downloadstable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.tar.gz
stable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.tar.bz2
stable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.zip
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/api/models.py')
-rw-r--r--modules/api/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/api/models.py b/modules/api/models.py
index 34dbfa16..f77951fc 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -170,14 +170,15 @@ class ProgressResponse(BaseModel):
class InterrogateRequest(BaseModel):
image: str = Field(default="", title="Image", description="Image to work on, must be a Base64 string containing the image's data.")
+ model: str = Field(default="clip", title="Model", description="The interrogate model used.")
class InterrogateResponse(BaseModel):
caption: str = Field(default=None, title="Caption", description="The generated caption for the image.")
fields = {}
-for key, value in opts.data.items():
- metadata = opts.data_labels.get(key)
- optType = opts.typemap.get(type(value), type(value))
+for key, metadata in opts.data_labels.items():
+ value = opts.data.get(key)
+ optType = opts.typemap.get(type(metadata.default), type(value))
if (metadata is not None):
fields.update({key: (Optional[optType], Field(