File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
src/diffusers/models/transformers Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -748,19 +748,6 @@ def forward(
748748 encoder_hidden_states = self .context_embedder (encoder_hidden_states )
749749
750750 # 3. Calculate RoPE embeddings from image and text tokens
751- if txt_ids .ndim == 3 :
752- logger .warning (
753- "Passing `txt_ids` 3d torch.Tensor is deprecated."
754- "Please remove the batch dimension and pass it as a 2d torch Tensor"
755- )
756- txt_ids = txt_ids [0 ]
757- if img_ids .ndim == 3 :
758- logger .warning (
759- "Passing `img_ids` 3d torch.Tensor is deprecated."
760- "Please remove the batch dimension and pass it as a 2d torch Tensor"
761- )
762- img_ids = img_ids [0 ]
763-
764751 if is_torch_npu_available ():
765752 freqs_cos_image , freqs_sin_image = self .pos_embed (img_ids .cpu ())
766753 image_rotary_emb = (freqs_cos_image .npu (), freqs_sin_image .npu ())
You can’t perform that action at this time.
0 commit comments