mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
Add sigmoid beta scheduler
This commit is contained in:
@@ -232,6 +232,8 @@ class DiffusionSampler:
|
||||
self.config['beta_schedule'] = 'scaled_linear'
|
||||
elif shared.opts.schedulers_beta_schedule == 'cosine':
|
||||
self.config['beta_schedule'] = 'squaredcos_cap_v2'
|
||||
elif shared.opts.schedulers_beta_schedule == 'sigmoid':
|
||||
self.config['beta_schedule'] = 'sigmoid'
|
||||
|
||||
timesteps = re.split(',| ', shared.opts.schedulers_timesteps)
|
||||
timesteps = [int(x) for x in timesteps if x.isdigit()]
|
||||
|
||||
+1
-1
@@ -814,7 +814,7 @@ options_templates.update(options_section(('sampler-params', "Sampler Settings"),
|
||||
"schedulers_sigma": OptionInfo("default", "Sigma algorithm", gr.Radio, {"choices": ['default', 'karras', 'exponential', 'polyexponential'], "visible": False}),
|
||||
|
||||
# managed from ui.py for backend diffusers
|
||||
"schedulers_beta_schedule": OptionInfo("default", "Beta schedule", gr.Dropdown, {"choices": ['default', 'linear', 'scaled_linear', 'squaredcos_cap_v2'], "visible": False}),
|
||||
"schedulers_beta_schedule": OptionInfo("default", "Beta schedule", gr.Dropdown, {"choices": ['default', 'linear', 'scaled_linear', 'squaredcos_cap_v2', 'sigmoid'], "visible": False}),
|
||||
"schedulers_use_thresholding": OptionInfo(False, "Use dynamic thresholding", gr.Checkbox, {"visible": False}),
|
||||
"schedulers_timestep_spacing": OptionInfo("default", "Timestep spacing", gr.Dropdown, {"choices": ['default', 'linspace', 'leading', 'trailing'], "visible": False}),
|
||||
'schedulers_timesteps': OptionInfo('', "Timesteps", gr.Textbox, {"visible": False}),
|
||||
|
||||
@@ -307,7 +307,7 @@ def create_sampler_options(tabname):
|
||||
sampler_sigma = gr.Dropdown(label='Sigma method', elem_id=f"{tabname}_sampler_sigma", choices=['default', 'karras', 'betas', 'exponential', 'lambdas', 'flowmatch'], value=shared.opts.schedulers_sigma, type='value')
|
||||
sampler_spacing = gr.Dropdown(label='Timestep spacing', elem_id=f"{tabname}_sampler_spacing", choices=['default', 'linspace', 'leading', 'trailing'], value=shared.opts.schedulers_timestep_spacing, type='value')
|
||||
with gr.Row(elem_classes=['flex-break']):
|
||||
sampler_beta = gr.Dropdown(label='Beta schedule', elem_id=f"{tabname}_sampler_beta", choices=['default', 'linear', 'scaled', 'cosine'], value=shared.opts.schedulers_beta_schedule, type='value')
|
||||
sampler_beta = gr.Dropdown(label='Beta schedule', elem_id=f"{tabname}_sampler_beta", choices=['default', 'linear', 'scaled', 'cosine', 'sigmoid'], value=shared.opts.schedulers_beta_schedule, type='value')
|
||||
sampler_prediction = gr.Dropdown(label='Prediction method', elem_id=f"{tabname}_sampler_prediction", choices=['default', 'epsilon', 'sample', 'v_prediction', 'flow_prediction'], value=shared.opts.schedulers_prediction_type, type='value')
|
||||
with gr.Row(elem_classes=['flex-break']):
|
||||
sampler_presets = gr.Dropdown(label='Timesteps presets', elem_id=f"{tabname}_sampler_presets", choices=['None', 'AYS SD15', 'AYS SDXL'], value='None', type='value')
|
||||
|
||||
Reference in New Issue
Block a user