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
58b5b7c2
Commit
58b5b7c2
authored
Mar 11, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UniPC options to infotext
parent
f261a4a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
modules/generation_parameters_copypaste.py
modules/generation_parameters_copypaste.py
+7
-1
modules/sd_samplers_compvis.py
modules/sd_samplers_compvis.py
+14
-0
modules/shared.py
modules/shared.py
+9
-0
No files found.
modules/generation_parameters_copypaste.py
View file @
58b5b7c2
...
@@ -288,6 +288,8 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
...
@@ -288,6 +288,8 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
settings_map
=
{}
settings_map
=
{}
infotext_to_setting_name_mapping
=
[
infotext_to_setting_name_mapping
=
[
(
'Clip skip'
,
'CLIP_stop_at_last_layers'
,
),
(
'Clip skip'
,
'CLIP_stop_at_last_layers'
,
),
(
'Conditional mask weight'
,
'inpainting_mask_weight'
),
(
'Conditional mask weight'
,
'inpainting_mask_weight'
),
...
@@ -296,7 +298,11 @@ infotext_to_setting_name_mapping = [
...
@@ -296,7 +298,11 @@ infotext_to_setting_name_mapping = [
(
'Noise multiplier'
,
'initial_noise_multiplier'
),
(
'Noise multiplier'
,
'initial_noise_multiplier'
),
(
'Eta'
,
'eta_ancestral'
),
(
'Eta'
,
'eta_ancestral'
),
(
'Eta DDIM'
,
'eta_ddim'
),
(
'Eta DDIM'
,
'eta_ddim'
),
(
'Discard penultimate sigma'
,
'always_discard_next_to_last_sigma'
)
(
'Discard penultimate sigma'
,
'always_discard_next_to_last_sigma'
),
(
'UniPC variant'
,
'uni_pc_variant'
),
(
'UniPC skip type'
,
'uni_pc_skip_type'
),
(
'UniPC order'
,
'uni_pc_order'
),
(
'UniPC lower order final'
,
'uni_pc_lower_order_final'
),
]
]
...
...
modules/sd_samplers_compvis.py
View file @
58b5b7c2
...
@@ -129,6 +129,19 @@ class VanillaStableDiffusionSampler:
...
@@ -129,6 +129,19 @@ class VanillaStableDiffusionSampler:
if
self
.
eta
!=
0.0
:
if
self
.
eta
!=
0.0
:
p
.
extra_generation_params
[
"Eta DDIM"
]
=
self
.
eta
p
.
extra_generation_params
[
"Eta DDIM"
]
=
self
.
eta
if
self
.
is_unipc
:
keys
=
[
(
'UniPC variant'
,
'uni_pc_variant'
),
(
'UniPC skip type'
,
'uni_pc_skip_type'
),
(
'UniPC order'
,
'uni_pc_order'
),
(
'UniPC lower order final'
,
'uni_pc_lower_order_final'
),
]
for
name
,
key
in
keys
:
v
=
getattr
(
shared
.
opts
,
key
)
if
v
!=
shared
.
opts
.
get_default
(
key
):
p
.
extra_generation_params
[
name
]
=
v
for
fieldname
in
[
'p_sample_ddim'
,
'p_sample_plms'
]:
for
fieldname
in
[
'p_sample_ddim'
,
'p_sample_plms'
]:
if
hasattr
(
self
.
sampler
,
fieldname
):
if
hasattr
(
self
.
sampler
,
fieldname
):
setattr
(
self
.
sampler
,
fieldname
,
self
.
p_sample_ddim_hook
)
setattr
(
self
.
sampler
,
fieldname
,
self
.
p_sample_ddim_hook
)
...
@@ -138,6 +151,7 @@ class VanillaStableDiffusionSampler:
...
@@ -138,6 +151,7 @@ class VanillaStableDiffusionSampler:
self
.
mask
=
p
.
mask
if
hasattr
(
p
,
'mask'
)
else
None
self
.
mask
=
p
.
mask
if
hasattr
(
p
,
'mask'
)
else
None
self
.
nmask
=
p
.
nmask
if
hasattr
(
p
,
'nmask'
)
else
None
self
.
nmask
=
p
.
nmask
if
hasattr
(
p
,
'nmask'
)
else
None
def
adjust_steps_if_invalid
(
self
,
p
,
num_steps
):
def
adjust_steps_if_invalid
(
self
,
p
,
num_steps
):
if
((
self
.
config
.
name
==
'DDIM'
)
and
p
.
ddim_discretize
==
'uniform'
)
or
(
self
.
config
.
name
==
'PLMS'
)
or
(
self
.
config
.
name
==
'UniPC'
):
if
((
self
.
config
.
name
==
'DDIM'
)
and
p
.
ddim_discretize
==
'uniform'
)
or
(
self
.
config
.
name
==
'PLMS'
)
or
(
self
.
config
.
name
==
'UniPC'
):
if
self
.
config
.
name
==
'UniPC'
and
num_steps
<
shared
.
opts
.
uni_pc_order
:
if
self
.
config
.
name
==
'UniPC'
and
num_steps
<
shared
.
opts
.
uni_pc_order
:
...
...
modules/shared.py
View file @
58b5b7c2
...
@@ -563,6 +563,15 @@ class Options:
...
@@ -563,6 +563,15 @@ class Options:
return
True
return
True
def
get_default
(
self
,
key
):
"""returns the default value for the key"""
data_label
=
self
.
data_labels
.
get
(
key
)
if
data_label
is
None
:
return
None
return
data_label
.
default
def
save
(
self
,
filename
):
def
save
(
self
,
filename
):
assert
not
cmd_opts
.
freeze_settings
,
"saving settings is disabled"
assert
not
cmd_opts
.
freeze_settings
,
"saving settings is disabled"
...
...
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