Skip to content

Commit 2d7bad7

Browse files
committed
Remove deprecated 3D id logic
1 parent 429d2cf commit 2d7bad7

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/diffusers/models/transformers/transformer_flux2.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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())

0 commit comments

Comments
 (0)