Skip to content

Commit e79b716

Browse files
committed
update tests
1 parent e6f6aae commit e79b716

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

docs/source/en/api/pipelines/lumina2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License. -->
1414

15-
# HunyuanVideo
15+
# Lumina2
1616

1717
[Lumina Image 2.0](https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0) by Alpha-VLLM.
1818

tests/models/transformers/test_models_transformer_lumina2.py

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ class Lumina2Transformer2DModelTransformerTests(ModelTesterMixin, unittest.TestC
3636

3737
@property
3838
def dummy_input(self):
39-
"""
40-
Args:
41-
None
42-
Returns:
43-
Dict: Dictionary of dummy input tensors
44-
"""
4539
batch_size = 2 # N
4640
num_channels = 4 # C
4741
height = width = 16 # H, W
@@ -51,43 +45,24 @@ def dummy_input(self):
5145
hidden_states = torch.randn((batch_size, num_channels, height, width)).to(torch_device)
5246
encoder_hidden_states = torch.randn((batch_size, sequence_length, embedding_dim)).to(torch_device)
5347
timestep = torch.rand(size=(batch_size,)).to(torch_device)
54-
encoder_mask = torch.ones(size=(batch_size, sequence_length), dtype=torch.bool).to(torch_device)
48+
attention_mask = torch.ones(size=(batch_size, sequence_length), dtype=torch.bool).to(torch_device)
5549

5650
return {
5751
"hidden_states": hidden_states,
5852
"encoder_hidden_states": encoder_hidden_states,
5953
"timestep": timestep,
60-
"encoder_mask": encoder_mask,
54+
"attention_mask": attention_mask,
6155
}
6256

6357
@property
6458
def input_shape(self):
65-
"""
66-
Args:
67-
None
68-
Returns:
69-
Tuple: (int, int, int)
70-
"""
7159
return (4, 16, 16)
7260

7361
@property
7462
def output_shape(self):
75-
"""
76-
Args:
77-
None
78-
Returns:
79-
Tuple: (int, int, int)
80-
"""
8163
return (4, 16, 16)
8264

8365
def prepare_init_args_and_inputs_for_common(self):
84-
"""
85-
Args:
86-
None
87-
88-
Returns:
89-
Tuple: (Dict, Dict)
90-
"""
9166
init_dict = {
9267
"sample_size": 16,
9368
"patch_size": 2,

0 commit comments

Comments
 (0)