Skip to content

Commit 0a5b3e9

Browse files
dunkeronihipsterusername
authored andcommitted
fix: only add prediction type if it exists
1 parent b467a12 commit 0a5b3e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/app/invocations/denoise_latents.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def get_scheduler(
8686
scheduler_info: ModelIdentifierField,
8787
scheduler_name: str,
8888
seed: int,
89-
unet_config: AnyModelConfig | None = None,
89+
unet_config: AnyModelConfig,
9090
) -> Scheduler:
9191
"""Load a scheduler and apply some scheduler-specific overrides."""
9292
# TODO(ryand): Silently falling back to ddim seems like a bad idea. Look into why this was added and remove if
@@ -105,7 +105,7 @@ def get_scheduler(
105105
"_backup": scheduler_config,
106106
}
107107

108-
if unet_config is not None:
108+
if hasattr(unet_config, "prediction_type"):
109109
scheduler_config["prediction_type"] = unet_config.prediction_type
110110

111111
# make dpmpp_sde reproducable(seed can be passed only in initializer)

0 commit comments

Comments
 (0)