1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Set step_rules correctly for piecewise_constant scheduler (#3605)

So that schedule_func() calls get_piecewise_constant_schedule() with correctly named kwarg.
This commit is contained in:
0x1355
2023-06-05 06:46:26 +02:00
committed by GitHub
parent 7a39691362
commit b95cbdf6fc

View File

@@ -318,7 +318,7 @@ def get_scheduler(
return schedule_func(optimizer, last_epoch=last_epoch)
if name == SchedulerType.PIECEWISE_CONSTANT:
return schedule_func(optimizer, rules=step_rules, last_epoch=last_epoch)
return schedule_func(optimizer, step_rules=step_rules, last_epoch=last_epoch)
# All other schedulers require `num_warmup_steps`
if num_warmup_steps is None: