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
070b034c
Commit
070b034c
authored
Aug 10, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put infotext label for setting into OptionInfo definition rather than in a separate list
parent
9d78d317
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
57 deletions
+42
-57
modules/generation_parameters_copypaste.py
modules/generation_parameters_copypaste.py
+11
-28
modules/options.py
modules/options.py
+3
-1
modules/shared_options.py
modules/shared_options.py
+28
-28
No files found.
modules/generation_parameters_copypaste.py
View file @
070b034c
...
...
@@ -316,37 +316,18 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model
infotext_to_setting_name_mapping
=
[
(
'Clip skip'
,
'CLIP_stop_at_last_layers'
,
),
]
"""Mapping of infotext labels to setting names. Only left for backwards compatibility - use OptionInfo(..., infotext='...') instead.
Example content:
infotext_to_setting_name_mapping = [
('Conditional mask weight', 'inpainting_mask_weight'),
('Model hash', 'sd_model_checkpoint'),
('ENSD', 'eta_noise_seed_delta'),
('Schedule type', 'k_sched_type'),
(
'Schedule max sigma'
,
'sigma_max'
),
(
'Schedule min sigma'
,
'sigma_min'
),
(
'Schedule rho'
,
'rho'
),
(
'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'
),
(
'UniPC order'
,
'uni_pc_order'
),
(
'UniPC lower order final'
,
'uni_pc_lower_order_final'
),
(
'Token merging ratio'
,
'token_merging_ratio'
),
(
'Token merging ratio hr'
,
'token_merging_ratio_hr'
),
(
'RNG'
,
'randn_source'
),
(
'NGMS'
,
's_min_uncond'
),
(
'Pad conds'
,
'pad_cond_uncond'
),
(
'VAE'
,
'sd_vae'
),
(
'VAE Encoder'
,
'sd_vae_encode_method'
),
(
'VAE Decoder'
,
'sd_vae_decode_method'
),
(
'Tiling'
,
'tiling'
),
(
'Face restoration'
,
'face_restoration'
),
]
"""
def
create_override_settings_dict
(
text_pairs
):
...
...
@@ -367,7 +348,8 @@ def create_override_settings_dict(text_pairs):
params
[
k
]
=
v
.
strip
()
for
param_name
,
setting_name
in
infotext_to_setting_name_mapping
:
mapping
=
[(
info
.
infotext
,
k
)
for
k
,
info
in
shared
.
opts
.
data_labels
.
items
()
if
info
.
infotext
]
for
param_name
,
setting_name
in
mapping
+
infotext_to_setting_name_mapping
:
value
=
params
.
get
(
param_name
,
None
)
if
value
is
None
:
...
...
@@ -421,7 +403,8 @@ def connect_paste(button, paste_fields, input_comp, override_settings_component,
def
paste_settings
(
params
):
vals
=
{}
for
param_name
,
setting_name
in
infotext_to_setting_name_mapping
:
mapping
=
[(
info
.
infotext
,
k
)
for
k
,
info
in
shared
.
opts
.
data_labels
.
items
()
if
info
.
infotext
]
for
param_name
,
setting_name
in
mapping
+
infotext_to_setting_name_mapping
:
if
param_name
in
already_handled_fields
:
continue
...
...
modules/options.py
View file @
070b034c
...
...
@@ -8,7 +8,7 @@ from modules.shared_cmd_options import cmd_opts
class
OptionInfo
:
def
__init__
(
self
,
default
=
None
,
label
=
""
,
component
=
None
,
component_args
=
None
,
onchange
=
None
,
section
=
None
,
refresh
=
None
,
comment_before
=
''
,
comment_after
=
''
):
def
__init__
(
self
,
default
=
None
,
label
=
""
,
component
=
None
,
component_args
=
None
,
onchange
=
None
,
section
=
None
,
refresh
=
None
,
comment_before
=
''
,
comment_after
=
''
,
infotext
=
None
):
self
.
default
=
default
self
.
label
=
label
self
.
component
=
component
...
...
@@ -24,6 +24,8 @@ class OptionInfo:
self
.
comment_after
=
comment_after
"""HTML text that will be added before label in UI"""
self
.
infotext
=
infotext
def
link
(
self
,
label
,
url
):
self
.
comment_before
+=
f
"[<a href='{url}' target='_blank'>{label}</a>]"
return
self
...
...
modules/shared_options.py
View file @
070b034c
This diff is collapsed.
Click to expand it.
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