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
4df5009a
Unverified
Commit
4df5009a
authored
Dec 26, 2022
by
hentailord85ez
Committed by
GitHub
Dec 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sd_samplers.py
parent
4af3ca53
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
sd_samplers.py
modules/sd_samplers.py
+4
-1
No files found.
modules/sd_samplers.py
View file @
4df5009a
...
...
@@ -462,6 +462,9 @@ class KDiffusionSampler:
return
extra_params_kwargs
def
get_sigmas
(
self
,
p
,
steps
):
disc
=
opts
.
always_discard_next_to_last_sigma
or
(
self
.
config
is
not
None
and
self
.
config
.
options
.
get
(
'discard_next_to_last_sigma'
,
False
))
steps
+=
1
if
disc
else
0
if
p
.
sampler_noise_scheduler_override
:
sigmas
=
p
.
sampler_noise_scheduler_override
(
steps
)
elif
self
.
config
is
not
None
and
self
.
config
.
options
.
get
(
'scheduler'
,
None
)
==
'karras'
:
...
...
@@ -469,7 +472,7 @@ class KDiffusionSampler:
else
:
sigmas
=
self
.
model_wrap
.
get_sigmas
(
steps
)
if
self
.
config
is
not
None
and
self
.
config
.
options
.
get
(
'discard_next_to_last_sigma'
,
False
)
:
if
disc
:
sigmas
=
torch
.
cat
([
sigmas
[:
-
2
],
sigmas
[
-
1
:]])
return
sigmas
...
...
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