diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index 66d6a70e40..4ad63f4f89 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -341,7 +341,7 @@ class DenoiseLatentsInvocation(BaseInvocation): ) steps: int = InputField(default=10, gt=0, description=FieldDescriptions.steps) cfg_scale: Union[float, List[float]] = InputField( - default=7.5, ge=1, description=FieldDescriptions.cfg_scale, title="CFG Scale" + default=7.5, description=FieldDescriptions.cfg_scale, title="CFG Scale" ) denoising_start: float = InputField( default=0.0, @@ -563,6 +563,11 @@ class DenoiseLatentsInvocation(BaseInvocation): dtype=unet.dtype, ) + if isinstance(self.cfg_scale, list): + assert ( + len(self.cfg_scale) == self.steps + ), "cfg_scale (list) must have the same length as the number of steps" + conditioning_data = TextConditioningData( uncond_text=uncond_text_embedding, cond_text=cond_text_embedding,