Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
b2c48091
Commit
b2c48091
authored
Nov 04, 2022
by
Gur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed api compatibility with python 3.8
parent
d98eacea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
modules/api/models.py
modules/api/models.py
+5
-4
No files found.
modules/api/models.py
View file @
b2c48091
...
...
@@ -6,6 +6,7 @@ from typing_extensions import Literal
from
inflection
import
underscore
from
modules.processing
import
StableDiffusionProcessingTxt2Img
,
StableDiffusionProcessingImg2Img
from
modules.shared
import
sd_upscalers
from
typing
import
List
API_NOT_ALLOWED
=
[
"self"
,
...
...
@@ -109,12 +110,12 @@ StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
)
.
generate_model
()
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
info
:
str
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
info
:
str
...
...
@@ -146,10 +147,10 @@ class FileData(BaseModel):
name
:
str
=
Field
(
title
=
"File name"
)
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
):
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
):
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