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
9e1a8b77
Commit
9e1a8b77
authored
Oct 22, 2022
by
Stephen
Committed by
AUTOMATIC1111
Oct 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-implemented mask with any type
parent
a7c213d0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
api.py
modules/api/api.py
+4
-0
processing.py
modules/api/processing.py
+1
-1
processing.py
modules/processing.py
+1
-1
No files found.
modules/api/api.py
View file @
9e1a8b77
...
@@ -72,6 +72,10 @@ class Api:
...
@@ -72,6 +72,10 @@ class Api:
if
init_images
is
None
:
if
init_images
is
None
:
raise
HTTPException
(
status_code
=
404
,
detail
=
"Init image not found"
)
raise
HTTPException
(
status_code
=
404
,
detail
=
"Init image not found"
)
mask
=
img2imgreq
.
mask
if
mask
:
raise
HTTPException
(
status_code
=
400
,
detail
=
"Mask not supported yet"
)
populate
=
img2imgreq
.
copy
(
update
=
{
# Override __init__ params
populate
=
img2imgreq
.
copy
(
update
=
{
# Override __init__ params
"sd_model"
:
shared
.
sd_model
,
"sd_model"
:
shared
.
sd_model
,
...
...
modules/api/processing.py
View file @
9e1a8b77
...
@@ -102,5 +102,5 @@ StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(
...
@@ -102,5 +102,5 @@ StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(
StableDiffusionImg2ImgProcessingAPI
=
PydanticModelGenerator
(
StableDiffusionImg2ImgProcessingAPI
=
PydanticModelGenerator
(
"StableDiffusionProcessingImg2Img"
,
"StableDiffusionProcessingImg2Img"
,
StableDiffusionProcessingImg2Img
,
StableDiffusionProcessingImg2Img
,
[{
"key"
:
"sampler_index"
,
"type"
:
str
,
"default"
:
"Euler"
},
{
"key"
:
"init_images"
,
"type"
:
list
,
"default"
:
None
},
{
"key"
:
"denoising_strength"
,
"type"
:
float
,
"default"
:
0.75
}]
[{
"key"
:
"sampler_index"
,
"type"
:
str
,
"default"
:
"Euler"
},
{
"key"
:
"init_images"
,
"type"
:
list
,
"default"
:
None
},
{
"key"
:
"denoising_strength"
,
"type"
:
float
,
"default"
:
0.75
}
,
{
"key"
:
"mask"
,
"type"
:
str
,
"default"
:
None
}
]
)
.
generate_model
()
)
.
generate_model
()
\ No newline at end of file
modules/processing.py
View file @
9e1a8b77
...
@@ -623,7 +623,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -623,7 +623,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
class
StableDiffusionProcessingImg2Img
(
StableDiffusionProcessing
):
class
StableDiffusionProcessingImg2Img
(
StableDiffusionProcessing
):
sampler
=
None
sampler
=
None
def
__init__
(
self
,
init_images
:
list
=
None
,
resize_mode
:
int
=
0
,
denoising_strength
:
float
=
0.75
,
mask
:
str
=
None
,
mask_blur
:
int
=
4
,
inpainting_fill
:
int
=
0
,
inpaint_full_res
:
bool
=
True
,
inpaint_full_res_padding
:
int
=
0
,
inpainting_mask_invert
:
int
=
0
,
**
kwargs
):
def
__init__
(
self
,
init_images
:
list
=
None
,
resize_mode
:
int
=
0
,
denoising_strength
:
float
=
0.75
,
mask
:
Any
=
None
,
mask_blur
:
int
=
4
,
inpainting_fill
:
int
=
0
,
inpaint_full_res
:
bool
=
True
,
inpaint_full_res_padding
:
int
=
0
,
inpainting_mask_invert
:
int
=
0
,
**
kwargs
):
super
()
.
__init__
(
**
kwargs
)
super
()
.
__init__
(
**
kwargs
)
self
.
init_images
=
init_images
self
.
init_images
=
init_images
...
...
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