Skip to content

Commit

Permalink
wip: Add LCMScheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
blessedcoolant authored and hipsterusername committed Nov 10, 2023
1 parent e56a6d8 commit 356b5a4
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 138 deletions.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ The list of schedulers has been completely revamped and brought up to date:
| **dpmpp_2m** | DPMSolverMultistepScheduler | original noise scnedule |
| **dpmpp_2m_k** | DPMSolverMultistepScheduler | using karras noise schedule |
| **unipc** | UniPCMultistepScheduler | CPU only |
| **lcm** | LCMScheduler | |

Please see [3.0.0 Release Notes](https://github.com/invoke-ai/InvokeAI/releases/tag/v3.0.0) for further details.

Expand Down
1 change: 1 addition & 0 deletions invokeai/backend/install/legacy_arg_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"k_heun",
"k_lms",
"plms",
"lcm",
]

PRECISION_CHOICES = [
Expand Down
2 changes: 2 additions & 0 deletions invokeai/backend/stable_diffusion/schedulers/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
HeunDiscreteScheduler,
KDPM2AncestralDiscreteScheduler,
KDPM2DiscreteScheduler,
LCMScheduler,
LMSDiscreteScheduler,
PNDMScheduler,
UniPCMultistepScheduler,
Expand Down Expand Up @@ -38,4 +39,5 @@
dpmpp_sde=(DPMSolverSDEScheduler, dict(use_karras_sigmas=False, noise_sampler_seed=0)),
dpmpp_sde_k=(DPMSolverSDEScheduler, dict(use_karras_sigmas=True, noise_sampler_seed=0)),
unipc=(UniPCMultistepScheduler, dict(cpu_only=True)),
lcm=(LCMScheduler, dict()),
)
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const zScheduler = z.enum([
'lms_k',
'euler_a',
'kdpm_2_a',
'lcm',
]);
/**
* Type alias for scheduler parameter, inferred from its zod schema
Expand Down Expand Up @@ -166,6 +167,7 @@ export const SCHEDULER_LABEL_MAP: Record<SchedulerParam, string> = {
lms_k: 'LMS Karras',
euler_a: 'Euler Ancestral',
kdpm_2_a: 'KDPM 2 Ancestral',
lcm: 'LCM',
};

/**
Expand Down
Loading

0 comments on commit 356b5a4

Please sign in to comment.