better api defaults

This commit is contained in:
Vladimir Mandic
2024-08-28 10:58:54 -04:00
parent 65c137abf1
commit bb7f84b99b
3 changed files with 8 additions and 4 deletions
+4 -1
View File
@@ -538,7 +538,10 @@ def save_intermediate(p, latents, suffix):
def update_sampler(p, sd_model, second_pass=False):
sampler_selection = p.hr_sampler_name if second_pass else p.sampler_name
if hasattr(sd_model, 'scheduler'):
sampler = sd_samplers.all_samplers_map.get(sampler_selection, None)
if sampler_selection is None or sampler_selection == 'None':
sampler = sd_samplers.all_samplers_map.get("UniPC")
else:
sampler = sd_samplers.all_samplers_map.get(sampler_selection, None)
if sampler is None:
shared.log.warning(f'Sampler: sampler="{sampler_selection}" not found')
sampler = sd_samplers.all_samplers_map.get("UniPC")