@@ -634,7 +634,7 @@ def __call__(
634634 prompt_2 : Optional [Union [str , List [str ]]] = None ,
635635 negative_prompt : Union [str , List [str ]] = None ,
636636 negative_prompt_2 : Optional [Union [str , List [str ]]] = None ,
637- true_cfg : float = 1.0 ,
637+ true_cfg_scale : float = 1.0 ,
638638 height : Optional [int ] = None ,
639639 width : Optional [int ] = None ,
640640 num_inference_steps : int = 28 ,
@@ -775,7 +775,7 @@ def __call__(
775775 lora_scale = (
776776 self .joint_attention_kwargs .get ("scale" , None ) if self .joint_attention_kwargs is not None else None
777777 )
778- do_true_cfg = true_cfg > 1 or negative_prompt is not None
778+ do_true_cfg = true_cfg_scale > 1 or negative_prompt is not None
779779 (
780780 prompt_embeds ,
781781 pooled_prompt_embeds ,
@@ -912,7 +912,7 @@ def __call__(
912912 joint_attention_kwargs = self .joint_attention_kwargs ,
913913 return_dict = False ,
914914 )[0 ]
915- noise_pred = neg_noise_pred + true_cfg * (noise_pred - neg_noise_pred )
915+ noise_pred = neg_noise_pred + true_cfg_scale * (noise_pred - neg_noise_pred )
916916
917917 # compute the previous noisy sample x_t -> x_t-1
918918 latents_dtype = latents .dtype
0 commit comments