diff --git a/invokeai/backend/install/legacy_arg_parsing.py b/invokeai/backend/install/legacy_arg_parsing.py index 85ca588fe2..b4f3ab1186 100644 --- a/invokeai/backend/install/legacy_arg_parsing.py +++ b/invokeai/backend/install/legacy_arg_parsing.py @@ -9,6 +9,7 @@ SAMPLER_CHOICES = [ "ddpm", "deis", "lms", + "lms_k", "pndm", "heun", "heun_k", @@ -18,6 +19,7 @@ SAMPLER_CHOICES = [ "kdpm_2", "kdpm_2_a", "dpmpp_2s", + "dpmpp_2s_k", "dpmpp_2m", "dpmpp_2m_k", "unipc", diff --git a/invokeai/backend/stable_diffusion/schedulers/schedulers.py b/invokeai/backend/stable_diffusion/schedulers/schedulers.py index 08f85cf559..d8da143962 100644 --- a/invokeai/backend/stable_diffusion/schedulers/schedulers.py +++ b/invokeai/backend/stable_diffusion/schedulers/schedulers.py @@ -7,7 +7,8 @@ SCHEDULER_MAP = dict( ddim=(DDIMScheduler, dict()), ddpm=(DDPMScheduler, dict()), deis=(DEISMultistepScheduler, dict()), - lms=(LMSDiscreteScheduler, dict()), + lms=(LMSDiscreteScheduler, dict(use_karras_sigmas=False)), + lms_k=(LMSDiscreteScheduler, dict(use_karras_sigmas=True)), pndm=(PNDMScheduler, dict()), heun=(HeunDiscreteScheduler, dict(use_karras_sigmas=False)), heun_k=(HeunDiscreteScheduler, dict(use_karras_sigmas=True)), @@ -16,7 +17,8 @@ SCHEDULER_MAP = dict( euler_a=(EulerAncestralDiscreteScheduler, dict()), kdpm_2=(KDPM2DiscreteScheduler, dict()), kdpm_2_a=(KDPM2AncestralDiscreteScheduler, dict()), - dpmpp_2s=(DPMSolverSinglestepScheduler, dict()), + dpmpp_2s=(DPMSolverSinglestepScheduler, dict(use_karras_sigmas=False)), + dpmpp_2s_k=(DPMSolverSinglestepScheduler, dict(use_karras_sigmas=True)), dpmpp_2m=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=False)), dpmpp_2m_k=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=True)), unipc=(UniPCMultistepScheduler, dict(cpu_only=True)) diff --git a/invokeai/backend/web/modules/parameters.py b/invokeai/backend/web/modules/parameters.py index 9a4bc0aec3..9b00093a44 100644 --- a/invokeai/backend/web/modules/parameters.py +++ b/invokeai/backend/web/modules/parameters.py @@ -7,6 +7,7 @@ SAMPLER_CHOICES = [ "ddpm", "deis", "lms", + "lms_k", "pndm", "heun", 'heun_k', @@ -16,6 +17,7 @@ SAMPLER_CHOICES = [ "kdpm_2", "kdpm_2_a", "dpmpp_2s", + "dpmpp_2s_k", "dpmpp_2m", "dpmpp_2m_k", "unipc", diff --git a/invokeai/frontend/web/src/app/constants.ts b/invokeai/frontend/web/src/app/constants.ts index c2e525ad7d..3506bafac2 100644 --- a/invokeai/frontend/web/src/app/constants.ts +++ b/invokeai/frontend/web/src/app/constants.ts @@ -3,10 +3,12 @@ export const SCHEDULERS = [ 'ddim', 'lms', + 'lms_k', 'euler', 'euler_k', 'euler_a', 'dpmpp_2s', + 'dpmpp_2s_k', 'dpmpp_2m', 'dpmpp_2m_k', 'kdpm_2', diff --git a/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts b/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts index e4ca53a5c2..247af1a31d 100644 --- a/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts @@ -45,7 +45,7 @@ export type InpaintInvocation = { /** * The scheduler to use */ - scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; + scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'lms_k' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2s_k' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; /** * The model to use (currently ignored) */ diff --git a/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts index 03d8fec491..bd58e3d960 100644 --- a/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts @@ -43,7 +43,7 @@ export type LatentsToLatentsInvocation = { /** * The scheduler to use */ - scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; + scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'lms_k' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2s_k' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; /** * UNet submodel */ diff --git a/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts index 5162d8e9ae..676aab915e 100644 --- a/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts @@ -43,7 +43,7 @@ export type TextToLatentsInvocation = { /** * The scheduler to use */ - scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; + scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'lms_k' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2s_k' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc'; /** * UNet submodel */