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
31306ce6
Commit
31306ce6
authored
Mar 20, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the behavior of discard_next_to_last_sigma for sgm_uniform to match other schedulers
parent
ac9aa44c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
modules/sd_samplers_kdiffusion.py
modules/sd_samplers_kdiffusion.py
+0
-4
modules/sd_schedulers.py
modules/sd_schedulers.py
+1
-1
No files found.
modules/sd_samplers_kdiffusion.py
View file @
31306ce6
...
@@ -113,10 +113,6 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
...
@@ -113,10 +113,6 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
if
scheduler
.
need_inner_model
:
if
scheduler
.
need_inner_model
:
sigmas_kwargs
[
'inner_model'
]
=
self
.
model_wrap
sigmas_kwargs
[
'inner_model'
]
=
self
.
model_wrap
if
scheduler
.
name
==
"sgm_uniform"
:
# XXX check this
# Ensure the "step" will be target step + 1
steps
+=
1
if
not
discard_next_to_last_sigma
else
0
sigmas
=
scheduler
.
function
(
n
=
steps
,
**
sigmas_kwargs
,
device
=
shared
.
device
)
sigmas
=
scheduler
.
function
(
n
=
steps
,
**
sigmas_kwargs
,
device
=
shared
.
device
)
if
discard_next_to_last_sigma
:
if
discard_next_to_last_sigma
:
...
...
modules/sd_schedulers.py
View file @
31306ce6
...
@@ -25,7 +25,7 @@ def sgm_uniform(n, sigma_min, sigma_max, inner_model, device):
...
@@ -25,7 +25,7 @@ def sgm_uniform(n, sigma_min, sigma_max, inner_model, device):
end
=
inner_model
.
sigma_to_t
(
torch
.
tensor
(
sigma_min
))
end
=
inner_model
.
sigma_to_t
(
torch
.
tensor
(
sigma_min
))
sigs
=
[
sigs
=
[
inner_model
.
t_to_sigma
(
ts
)
inner_model
.
t_to_sigma
(
ts
)
for
ts
in
torch
.
linspace
(
start
,
end
,
n
)[:
-
1
]
for
ts
in
torch
.
linspace
(
start
,
end
,
n
+
1
)[:
-
1
]
]
]
sigs
+=
[
0.0
]
sigs
+=
[
0.0
]
return
torch
.
FloatTensor
(
sigs
)
.
to
(
device
)
return
torch
.
FloatTensor
(
sigs
)
.
to
(
device
)
...
...
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