Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
9b2ca18a
Unverified
Commit
9b2ca18a
authored
Nov 04, 2022
by
AUTOMATIC1111
Committed by
GitHub
Nov 04, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4245 from 7flash/7flash/fix-api-compatibility
fixed api compatibility with python 3.8
parents
2913b9f0
e9c767d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
models.py
modules/api/models.py
+5
-4
No files found.
modules/api/models.py
View file @
9b2ca18a
...
@@ -5,6 +5,7 @@ from typing_extensions import Literal
...
@@ -5,6 +5,7 @@ from typing_extensions import Literal
from
inflection
import
underscore
from
inflection
import
underscore
from
modules.processing
import
StableDiffusionProcessingTxt2Img
,
StableDiffusionProcessingImg2Img
from
modules.processing
import
StableDiffusionProcessingTxt2Img
,
StableDiffusionProcessingImg2Img
from
modules.shared
import
sd_upscalers
,
opts
,
parser
from
modules.shared
import
sd_upscalers
,
opts
,
parser
from
typing
import
List
API_NOT_ALLOWED
=
[
API_NOT_ALLOWED
=
[
"self"
,
"self"
,
...
@@ -108,12 +109,12 @@ StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
...
@@ -108,12 +109,12 @@ StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
)
.
generate_model
()
)
.
generate_model
()
class
TextToImageResponse
(
BaseModel
):
class
TextToImageResponse
(
BaseModel
):
images
:
l
ist
[
str
]
=
Field
(
default
=
None
,
title
=
"Image"
,
description
=
"The generated image in base64 format."
)
images
:
L
ist
[
str
]
=
Field
(
default
=
None
,
title
=
"Image"
,
description
=
"The generated image in base64 format."
)
parameters
:
dict
parameters
:
dict
info
:
str
info
:
str
class
ImageToImageResponse
(
BaseModel
):
class
ImageToImageResponse
(
BaseModel
):
images
:
l
ist
[
str
]
=
Field
(
default
=
None
,
title
=
"Image"
,
description
=
"The generated image in base64 format."
)
images
:
L
ist
[
str
]
=
Field
(
default
=
None
,
title
=
"Image"
,
description
=
"The generated image in base64 format."
)
parameters
:
dict
parameters
:
dict
info
:
str
info
:
str
...
@@ -146,10 +147,10 @@ class FileData(BaseModel):
...
@@ -146,10 +147,10 @@ class FileData(BaseModel):
name
:
str
=
Field
(
title
=
"File name"
)
name
:
str
=
Field
(
title
=
"File name"
)
class
ExtrasBatchImagesRequest
(
ExtrasBaseRequest
):
class
ExtrasBatchImagesRequest
(
ExtrasBaseRequest
):
imageList
:
l
ist
[
FileData
]
=
Field
(
title
=
"Images"
,
description
=
"List of images to work on. Must be Base64 strings"
)
imageList
:
L
ist
[
FileData
]
=
Field
(
title
=
"Images"
,
description
=
"List of images to work on. Must be Base64 strings"
)
class
ExtrasBatchImagesResponse
(
ExtraBaseResponse
):
class
ExtrasBatchImagesResponse
(
ExtraBaseResponse
):
images
:
l
ist
[
str
]
=
Field
(
title
=
"Images"
,
description
=
"The generated images in base64 format."
)
images
:
L
ist
[
str
]
=
Field
(
title
=
"Images"
,
description
=
"The generated images in base64 format."
)
class
PNGInfoRequest
(
BaseModel
):
class
PNGInfoRequest
(
BaseModel
):
image
:
str
=
Field
(
title
=
"Image"
,
description
=
"The base64 encoded PNG image"
)
image
:
str
=
Field
(
title
=
"Image"
,
description
=
"The base64 encoded PNG image"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment