File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/diffusers/pipelines/stable_diffusion_3 Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -907,11 +907,7 @@ def __call__(
907
907
continue
908
908
909
909
# expand the latents if we are doing classifier free guidance
910
- latent_model_input = (
911
- torch .cat ([latents ] * 2 )
912
- if self .do_classifier_free_guidance and skip_guidance_layers is None
913
- else latents
914
- )
910
+ latent_model_input = torch .cat ([latents ] * 2 ) if self .do_classifier_free_guidance else latents
915
911
# broadcast to batch dimension in a way that's compatible with ONNX/Core ML
916
912
timestep = t .expand (latent_model_input .shape [0 ])
917
913
@@ -935,6 +931,8 @@ def __call__(
935
931
else False
936
932
)
937
933
if skip_guidance_layers is not None and should_skip_layers :
934
+ timestep = t .expand (latents .shape [0 ])
935
+ latent_model_input = latents
938
936
noise_pred_skip_layers = self .transformer (
939
937
hidden_states = latent_model_input ,
940
938
timestep = timestep ,
You can’t perform that action at this time.
0 commit comments