Skip to content

Commit 93d88c1

Browse files
revanth-045revanth-045claude
authored
[docs] Fix docstring arguments that don't match the signatures (#14778)
- TransformerSpatioTemporalModel.forward: no num_frames parameter - get_2d_rotary_pos_embed_lumina: parameters are len_h / len_w, not grid - AutoencoderKLHunyuanImageRefiner / AutoencoderKLHunyuanVideo15.tiled_decode: no return_dict parameter; they return a plain tensor Co-authored-by: revanth-045 <revanthreddych159@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 71f7c96 commit 93d88c1

4 files changed

Lines changed: 6 additions & 14 deletions

File tree

‎src/diffusers/models/autoencoders/autoencoder_kl_hunyuanimage_refiner.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -846,13 +846,9 @@ def tiled_decode(self, z: torch.Tensor) -> torch.Tensor:
846846
847847
Args:
848848
z (`torch.Tensor`): Input batch of latent vectors.
849-
return_dict (`bool`, *optional*, defaults to `True`):
850-
Whether or not to return a [`~models.vae.DecoderOutput`] instead of a plain tuple.
851849
852850
Returns:
853-
[`~models.vae.DecoderOutput`] or `tuple`:
854-
If return_dict is True, a [`~models.vae.DecoderOutput`] is returned, otherwise a plain `tuple` is
855-
returned.
851+
`torch.Tensor`: The decoded images.
856852
"""
857853

858854
_, _, _, height, width = z.shape

‎src/diffusers/models/autoencoders/autoencoder_kl_hunyuanvideo15.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -880,13 +880,9 @@ def tiled_decode(self, z: torch.Tensor) -> torch.Tensor:
880880
881881
Args:
882882
z (`torch.Tensor`): Input batch of latent vectors.
883-
return_dict (`bool`, *optional*, defaults to `True`):
884-
Whether or not to return a [`~models.vae.DecoderOutput`] instead of a plain tuple.
885883
886884
Returns:
887-
[`~models.vae.DecoderOutput`] or `tuple`:
888-
If return_dict is True, a [`~models.vae.DecoderOutput`] is returned, otherwise a plain `tuple` is
889-
returned.
885+
`torch.Tensor`: The decoded images.
890886
"""
891887

892888
_, _, _, height, width = z.shape

‎src/diffusers/models/embeddings.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,10 @@ def get_2d_rotary_pos_embed_lumina(embed_dim, len_h, len_w, linear_factor=1.0, n
10911091
Args:
10921092
embed_dim: (`int`):
10931093
The embedding dimension size, corresponding to hidden_size_head.
1094-
grid (`np.ndarray`):
1095-
The grid of the positional embedding.
1094+
len_h (`int`):
1095+
The height of the grid of the positional embedding.
1096+
len_w (`int`):
1097+
The width of the grid of the positional embedding.
10961098
linear_factor (`float`):
10971099
The linear factor of the positional embedding, which is used to scale the positional embedding in the linear
10981100
layer.

‎src/diffusers/models/transformers/transformer_temporal.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,6 @@ def forward(
288288
Args:
289289
hidden_states (`torch.Tensor` of shape `(batch size, channel, height, width)`):
290290
Input hidden_states.
291-
num_frames (`int`):
292-
The number of frames to be processed per batch. This is used to reshape the hidden states.
293291
encoder_hidden_states ( `torch.LongTensor` of shape `(batch size, encoder_hidden_states dim)`, *optional*):
294292
Conditional embeddings for cross attention layer. If not given, cross-attention defaults to
295293
self-attention.

0 commit comments

Comments
 (0)