Skip to content

Commit c0042ab

Browse files
committed
Enabled legacy sampler settings to be imported
1 parent 1ebb9a4 commit c0042ab

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

scripts/deforum_helpers/defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_samplers_list():
2424
'dpm2 a': 'DPM2 a',
2525
'dpm++ 2s a': 'DPM++ 2S a',
2626
'dpm++ 2m': 'DPM++ 2M',
27+
'dpm++ 2m sde': 'DPM++ 2M SDE',
2728
'dpm++ sde': 'DPM++ SDE',
2829
'dpm fast': 'DPM fast',
2930
'dpm adaptive': 'DPM adaptive',

scripts/deforum_helpers/settings.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,9 @@ def load_all_settings(*args, ui_launch=False, **kwargs):
132132
if key == 'sampler' and isinstance(val, str):
133133
samp_val = val.split()
134134
scheduler_val = None
135-
if samp_val[-1] == 'Uniform':
135+
if samp_val[-1] in ['Uniform','SGM Uniform','Karras','Exponential','Polyexponential']:
136136
scheduler_val = samp_val[-1]
137-
val = (val.split(" Uniform"))[0]
138-
if samp_val[-1] == 'Karras':
139-
scheduler_val = samp_val[-1]
140-
val = (val.split(" Karras"))[0]
141-
if samp_val[-1] == 'Exponential':
142-
scheduler_val = samp_val[-1]
143-
val = (val.split(" Exponential"))[0]
144-
if samp_val[-1] == 'Polyexponential':
145-
scheduler_val = samp_val[-1]
146-
val = (val.split(" Polyexponential"))[0]
147-
if samp_val[-1] == 'SGM Uniform':
148-
scheduler_val = samp_val[-1]
149-
val = (val.split(" SGM Uniform"))[0]
137+
val = (val.split(" " + samp_val[-1]))[0]
150138
if key == 'scheduler' and isinstance(val, str):
151139
if scheduler_val is not None:
152140
val = scheduler_val

0 commit comments

Comments
 (0)