Merge pull request #4358 from bamarillo/master

[API][Feature] Add Skip endpoint
This commit is contained in:
AUTOMATIC1111
2022-11-19 14:50:02 +03:00
committed by GitHub
2 changed files with 11 additions and 11 deletions

View File

@@ -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(