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
31506f07
Commit
31506f07
authored
Aug 05, 2023
by
catboxanon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sigma params to infotext
parent
c6278c15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
modules/generation_parameters_copypaste.py
modules/generation_parameters_copypaste.py
+4
-0
modules/sd_samplers_kdiffusion.py
modules/sd_samplers_kdiffusion.py
+33
-1
No files found.
modules/generation_parameters_copypaste.py
View file @
31506f07
...
...
@@ -328,6 +328,10 @@ infotext_to_setting_name_mapping = [
(
'Noise multiplier'
,
'initial_noise_multiplier'
),
(
'Eta'
,
'eta_ancestral'
),
(
'Eta DDIM'
,
'eta_ddim'
),
(
'Sigma churn'
,
's_churn'
),
(
'Sigma tmin'
,
's_tmin'
),
(
'Sigma tmax'
,
's_tmax'
),
(
'Sigma noise'
,
's_noise'
),
(
'Discard penultimate sigma'
,
'always_discard_next_to_last_sigma'
),
(
'UniPC variant'
,
'uni_pc_variant'
),
(
'UniPC skip type'
,
'uni_pc_skip_type'
),
...
...
modules/sd_samplers_kdiffusion.py
View file @
31506f07
...
...
@@ -4,6 +4,7 @@ import inspect
import
k_diffusion.sampling
from
modules
import
prompt_parser
,
devices
,
sd_samplers_common
,
sd_samplers_extra
from
modules.processing
import
StableDiffusionProcessing
from
modules.shared
import
opts
,
state
import
modules.shared
as
shared
from
modules.script_callbacks
import
CFGDenoiserParams
,
cfg_denoiser_callback
...
...
@@ -280,6 +281,14 @@ class KDiffusionSampler:
self
.
last_latent
=
None
self
.
s_min_uncond
=
None
# NOTE: These are also defined in the StableDiffusionProcessing class.
# They should have been here to begin with but we're going to
# leave that class __init__ signature alone.
self
.
s_churn
=
0.0
self
.
s_tmin
=
0.0
self
.
s_tmax
=
float
(
'inf'
)
self
.
s_noise
=
1.0
self
.
conditioning_key
=
sd_model
.
model
.
conditioning_key
def
callback_state
(
self
,
d
):
...
...
@@ -314,7 +323,7 @@ class KDiffusionSampler:
def
number_of_needed_noises
(
self
,
p
):
return
p
.
steps
def
initialize
(
self
,
p
):
def
initialize
(
self
,
p
:
StableDiffusionProcessing
):
self
.
model_wrap_cfg
.
mask
=
p
.
mask
if
hasattr
(
p
,
'mask'
)
else
None
self
.
model_wrap_cfg
.
nmask
=
p
.
nmask
if
hasattr
(
p
,
'nmask'
)
else
None
self
.
model_wrap_cfg
.
step
=
0
...
...
@@ -335,6 +344,29 @@ class KDiffusionSampler:
extra_params_kwargs
[
'eta'
]
=
self
.
eta
if
len
(
self
.
extra_params
)
>
0
:
s_churn
=
p
.
override_settings
.
get
(
's_churn'
,
p
.
s_churn
)
s_tmin
=
p
.
override_settings
.
get
(
's_tmin'
,
p
.
s_tmin
)
s_tmax
=
p
.
override_settings
.
get
(
's_tmax'
,
p
.
s_tmax
)
s_noise
=
p
.
override_settings
.
get
(
's_noise'
,
p
.
s_noise
)
if
s_churn
!=
self
.
s_churn
:
extra_params_kwargs
[
's_churn'
]
=
s_churn
p
.
s_churn
=
s_churn
p
.
extra_generation_params
[
'Sigma churn'
]
=
s_churn
if
s_tmin
!=
self
.
s_tmin
:
extra_params_kwargs
[
's_tmin'
]
=
s_churn
p
.
s_tmin
=
s_tmin
p
.
extra_generation_params
[
'Sigma tmin'
]
=
s_tmin
if
s_tmax
!=
self
.
s_tmax
:
extra_params_kwargs
[
's_tmax'
]
=
s_churn
p
.
s_tmax
=
s_tmax
p
.
extra_generation_params
[
'Sigma tmax'
]
=
s_tmax
if
s_noise
!=
self
.
s_noise
:
extra_params_kwargs
[
's_noise'
]
=
s_churn
p
.
s_noise
=
s_noise
p
.
extra_generation_params
[
'Sigma noise'
]
=
s_noise
return
extra_params_kwargs
def
get_sigmas
(
self
,
p
,
steps
):
...
...
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