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
b012d70f
Commit
b012d70f
authored
Mar 04, 2023
by
Vladimir Mandic
Committed by
GitHub
Mar 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update using original defaults
parent
f8e219ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
modules/api/api.py
modules/api/api.py
+11
-6
modules/api/models.py
modules/api/models.py
+4
-2
No files found.
modules/api/api.py
View file @
b012d70f
...
@@ -180,8 +180,8 @@ class Api:
...
@@ -180,8 +180,8 @@ class Api:
populate
=
txt2imgreq
.
copy
(
update
=
{
# Override __init__ params
populate
=
txt2imgreq
.
copy
(
update
=
{
# Override __init__ params
"sampler_name"
:
validate_sampler_name
(
txt2imgreq
.
sampler_name
or
txt2imgreq
.
sampler_index
),
"sampler_name"
:
validate_sampler_name
(
txt2imgreq
.
sampler_name
or
txt2imgreq
.
sampler_index
),
"do_not_save_samples"
:
True
if
not
'do_not_save_samples'
in
vars
(
txt2imgreq
)
else
txt2imgreq
.
do_not_save_samples
,
"do_not_save_samples"
:
txt2imgreq
.
do_not_save
,
"do_not_save_grid"
:
True
if
not
'do_not_save_grid'
in
vars
(
txt2imgreq
)
else
txt2imgreq
.
do_not_save_grid
,
"do_not_save_grid"
:
txt2imgreq
.
do_not_save
,
}
}
)
)
if
populate
.
sampler_name
:
if
populate
.
sampler_name
:
...
@@ -190,8 +190,9 @@ class Api:
...
@@ -190,8 +190,9 @@ class Api:
args
=
vars
(
populate
)
args
=
vars
(
populate
)
args
.
pop
(
'script_name'
,
None
)
args
.
pop
(
'script_name'
,
None
)
send_images
=
True
if
not
'do_not_send_images'
in
args
else
not
args
[
'do_not_send_images'
]
send_images
=
True
if
not
'do_not_send'
in
args
else
not
args
[
'do_not_send'
]
args
.
pop
(
'do_not_send_images'
,
None
)
args
.
pop
(
'do_not_send'
,
None
)
args
.
pop
(
'do_not_save'
,
None
)
with
self
.
queue_lock
:
with
self
.
queue_lock
:
p
=
StableDiffusionProcessingTxt2Img
(
sd_model
=
shared
.
sd_model
,
**
args
)
p
=
StableDiffusionProcessingTxt2Img
(
sd_model
=
shared
.
sd_model
,
**
args
)
...
@@ -223,8 +224,8 @@ class Api:
...
@@ -223,8 +224,8 @@ class Api:
populate
=
img2imgreq
.
copy
(
update
=
{
# Override __init__ params
populate
=
img2imgreq
.
copy
(
update
=
{
# Override __init__ params
"sampler_name"
:
validate_sampler_name
(
img2imgreq
.
sampler_name
or
img2imgreq
.
sampler_index
),
"sampler_name"
:
validate_sampler_name
(
img2imgreq
.
sampler_name
or
img2imgreq
.
sampler_index
),
"do_not_save_samples"
:
True
if
not
'do_not_save_samples'
in
img2imgreq
else
img2imgreq
.
do_not_save_samples
,
"do_not_save_samples"
:
img2imgreq
.
do_not_save
,
"do_not_save_grid"
:
True
if
not
'do_not_save_grid'
in
img2imgreq
else
img2imgreq
.
do_not_save_grid
,
"do_not_save_grid"
:
img2imgreq
.
do_not_save
,
"mask"
:
mask
"mask"
:
mask
}
}
)
)
...
@@ -235,6 +236,10 @@ class Api:
...
@@ -235,6 +236,10 @@ class Api:
args
.
pop
(
'include_init_images'
,
None
)
# this is meant to be done by "exclude": True in model, but it's for a reason that I cannot determine.
args
.
pop
(
'include_init_images'
,
None
)
# this is meant to be done by "exclude": True in model, but it's for a reason that I cannot determine.
args
.
pop
(
'script_name'
,
None
)
args
.
pop
(
'script_name'
,
None
)
send_images
=
True
if
not
'do_not_send'
in
args
else
not
args
[
'do_not_send'
]
args
.
pop
(
'do_not_send'
,
None
)
args
.
pop
(
'do_not_save'
,
None
)
send_images
=
True
if
not
'do_not_send_images'
in
args
else
not
args
[
'do_not_send_images'
]
send_images
=
True
if
not
'do_not_send_images'
in
args
else
not
args
[
'do_not_send_images'
]
args
.
pop
(
'do_not_send_images'
,
None
)
args
.
pop
(
'do_not_send_images'
,
None
)
...
...
modules/api/models.py
View file @
b012d70f
...
@@ -104,7 +104,8 @@ StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(
...
@@ -104,7 +104,8 @@ StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(
{
"key"
:
"sampler_index"
,
"type"
:
str
,
"default"
:
"Euler"
},
{
"key"
:
"sampler_index"
,
"type"
:
str
,
"default"
:
"Euler"
},
{
"key"
:
"script_name"
,
"type"
:
str
,
"default"
:
None
},
{
"key"
:
"script_name"
,
"type"
:
str
,
"default"
:
None
},
{
"key"
:
"script_args"
,
"type"
:
list
,
"default"
:
[]},
{
"key"
:
"script_args"
,
"type"
:
list
,
"default"
:
[]},
{
"key"
:
"do_not_send_images"
,
"type"
:
bool
,
"default"
:
False
}
{
"key"
:
"do_not_send"
,
"type"
:
bool
,
"default"
:
False
},
{
"key"
:
"do_not_save"
,
"type"
:
bool
,
"default"
:
True
}
]
]
)
.
generate_model
()
)
.
generate_model
()
...
@@ -119,7 +120,8 @@ StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
...
@@ -119,7 +120,8 @@ StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
{
"key"
:
"include_init_images"
,
"type"
:
bool
,
"default"
:
False
,
"exclude"
:
True
},
{
"key"
:
"include_init_images"
,
"type"
:
bool
,
"default"
:
False
,
"exclude"
:
True
},
{
"key"
:
"script_name"
,
"type"
:
str
,
"default"
:
None
},
{
"key"
:
"script_name"
,
"type"
:
str
,
"default"
:
None
},
{
"key"
:
"script_args"
,
"type"
:
list
,
"default"
:
[]},
{
"key"
:
"script_args"
,
"type"
:
list
,
"default"
:
[]},
{
"key"
:
"do_not_send_images"
,
"type"
:
bool
,
"default"
:
False
}
{
"key"
:
"do_not_send"
,
"type"
:
bool
,
"default"
:
False
},
{
"key"
:
"do_not_save"
,
"type"
:
bool
,
"default"
:
True
}
]
]
)
.
generate_model
()
)
.
generate_model
()
...
...
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