diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-19 11:50:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 11:50:02 +0000 |
commit | 84a6f211d407cd748c603edc3a81862488505c24 (patch) | |
tree | 10b0b2b479ef5b51831459bfe9b3cb249f494508 /modules/api/models.py | |
parent | 4b22ec413843cfc787bf5fced1193f77bb5cf0b6 (diff) | |
parent | 7f63980e479c7ffaec907fb659b5024e96eb72e7 (diff) | |
download | stable-diffusion-webui-gfx803-84a6f211d407cd748c603edc3a81862488505c24.tar.gz stable-diffusion-webui-gfx803-84a6f211d407cd748c603edc3a81862488505c24.tar.bz2 stable-diffusion-webui-gfx803-84a6f211d407cd748c603edc3a81862488505c24.zip |
Merge pull request #4358 from bamarillo/master
[API][Feature] Add Skip endpoint
Diffstat (limited to 'modules/api/models.py')
-rw-r--r-- | modules/api/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index f9cd929e..f77951fc 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -176,9 +176,9 @@ 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( |