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
40ca34b8
Commit
40ca34b8
authored
Nov 27, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for broken sampler selection in img2img and xy plot #4860 #4909
parent
5b2c3168
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
modules/img2img.py
modules/img2img.py
+1
-1
modules/processing.py
modules/processing.py
+1
-1
scripts/xy_grid.py
scripts/xy_grid.py
+7
-7
No files found.
modules/img2img.py
View file @
40ca34b8
...
...
@@ -99,7 +99,7 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro
seed_resize_from_h
=
seed_resize_from_h
,
seed_resize_from_w
=
seed_resize_from_w
,
seed_enable_extras
=
seed_enable_extras
,
sampler_
index
=
sd_samplers
.
samplers_for_img2img
[
sampler_index
]
.
name
,
sampler_
name
=
sd_samplers
.
samplers_for_img2img
[
sampler_index
]
.
name
,
batch_size
=
batch_size
,
n_iter
=
n_iter
,
steps
=
steps
,
...
...
modules/processing.py
View file @
40ca34b8
...
...
@@ -74,7 +74,7 @@ class StableDiffusionProcessing():
"""
def
__init__
(
self
,
sd_model
=
None
,
outpath_samples
=
None
,
outpath_grids
=
None
,
prompt
:
str
=
""
,
styles
:
List
[
str
]
=
None
,
seed
:
int
=
-
1
,
subseed
:
int
=
-
1
,
subseed_strength
:
float
=
0
,
seed_resize_from_h
:
int
=
-
1
,
seed_resize_from_w
:
int
=
-
1
,
seed_enable_extras
:
bool
=
True
,
sampler_name
:
str
=
None
,
batch_size
:
int
=
1
,
n_iter
:
int
=
1
,
steps
:
int
=
50
,
cfg_scale
:
float
=
7.0
,
width
:
int
=
512
,
height
:
int
=
512
,
restore_faces
:
bool
=
False
,
tiling
:
bool
=
False
,
do_not_save_samples
:
bool
=
False
,
do_not_save_grid
:
bool
=
False
,
extra_generation_params
:
Dict
[
Any
,
Any
]
=
None
,
overlay_images
:
Any
=
None
,
negative_prompt
:
str
=
None
,
eta
:
float
=
None
,
do_not_reload_embeddings
:
bool
=
False
,
denoising_strength
:
float
=
0
,
ddim_discretize
:
str
=
None
,
s_churn
:
float
=
0.0
,
s_tmax
:
float
=
None
,
s_tmin
:
float
=
0.0
,
s_noise
:
float
=
1.0
,
override_settings
:
Dict
[
str
,
Any
]
=
None
,
sampler_index
:
int
=
None
):
if
sampler_index
is
not
None
:
warnings
.
warn
(
"sampler_index argument for StableDiffusionProcessing does not do anything; use sampler_name"
)
print
(
"sampler_index argument for StableDiffusionProcessing does not do anything; use sampler_name"
,
file
=
sys
.
stderr
)
self
.
sd_model
=
sd_model
self
.
outpath_samples
:
str
=
outpath_samples
...
...
scripts/xy_grid.py
View file @
40ca34b8
...
...
@@ -62,25 +62,25 @@ def apply_order(p, x, xs):
def
build_samplers_dict
():
samplers_dict
=
{}
for
i
,
sampler
in
enumerate
(
sd_samplers
.
all_samplers
)
:
samplers_dict
[
sampler
.
name
.
lower
()]
=
i
for
sampler
in
sd_samplers
.
all_samplers
:
samplers_dict
[
sampler
.
name
.
lower
()]
=
sampler
.
name
for
alias
in
sampler
.
aliases
:
samplers_dict
[
alias
.
lower
()]
=
i
samplers_dict
[
alias
.
lower
()]
=
sampler
.
name
return
samplers_dict
def
apply_sampler
(
p
,
x
,
xs
):
sampler_
index
=
build_samplers_dict
()
.
get
(
x
.
lower
(),
None
)
if
sampler_
index
is
None
:
sampler_
name
=
build_samplers_dict
()
.
get
(
x
.
lower
(),
None
)
if
sampler_
name
is
None
:
raise
RuntimeError
(
f
"Unknown sampler: {x}"
)
p
.
sampler_
index
=
sampler_index
p
.
sampler_
name
=
sampler_name
def
confirm_samplers
(
p
,
xs
):
samplers_dict
=
build_samplers_dict
()
for
x
in
xs
:
if
x
.
lower
()
not
in
samplers_dict
.
keys
()
:
if
x
.
lower
()
not
in
samplers_dict
:
raise
RuntimeError
(
f
"Unknown sampler: {x}"
)
...
...
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