Skip to content

Commit be9606f

Browse files
akaitsuki-iiGlaceon-Hyy
authored andcommitted
add test case
1 parent cfa791c commit be9606f

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

tests/test_tokenizers/test_qwen2.py

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,153 @@ def test_call(self):
115115
"shape": (2, 12),
116116
"kwargs": {"padding_side": "left"},
117117
},
118+
{
119+
"texts": """
120+
DiffSynth-Engine is a high-performance engine geared towards buidling efficient inference pipelines for diffusion models.
121+
Key Features:
122+
Thoughtfully-Designed Implementation: We carefully re-implemented key components in Diffusion pipelines, such as sampler and scheduler, without introducing external dependencies on libraries like k-diffusion, ldm, or sgm.
123+
Extensive Model Support: Compatible with popular formats (e.g., CivitAI) of base models and LoRA models , catering to diverse use cases.
124+
Versatile Resource Management: Comprehensive support for varous model quantization (e.g., FP8, INT8) and offloading strategies, enabling loading of larger diffusion models (e.g., Flux.1 Dev) on limited hardware budget of GPU memory.
125+
Optimized Performance: Carefully-crafted inference pipeline to achieve fast generation across various hardware environments.
126+
Cross-Platform Support: Runnable on Windows, macOS (Apple Silicon), and Linux, ensuring a smooth experience across different operating systems.
127+
""",
128+
"expected": torch.tensor(
129+
[
130+
[
131+
198,
132+
21751,
133+
37134,
134+
339,
135+
12,
136+
4571,
137+
374,
138+
264,
139+
1550,
140+
57474,
141+
4712,
142+
58447,
143+
6974,
144+
1031,
145+
307,
146+
2718,
147+
11050,
148+
44378,
149+
57673,
150+
369,
151+
57330,
152+
4119,
153+
624,
154+
1592,
155+
19710,
156+
510,
157+
84169,
158+
3641,
159+
12,
160+
77133,
161+
30813,
162+
25,
163+
1205,
164+
15516,
165+
312,
166+
36925,
167+
14231,
168+
1376,
169+
6813,
170+
304,
171+
28369,
172+
7560,
173+
57673,
174+
11,
175+
1741,
176+
438,
177+
41799,
178+
323,
179+
28809,
180+
11,
181+
2041,
182+
31918,
183+
9250,
184+
19543,
185+
389,
186+
20186,
187+
1075,
188+
595,
189+
1737,
190+
3092,
191+
7560,
192+
11,
193+
326,
194+
13849,
195+
11,
196+
476,
197+
274,
198+
26186,
199+
624,
200+
6756,
201+
4025,
202+
4903,
203+
9186,
204+
25,
205+
66265,
206+
448,
207+
5411,
208+
19856,
209+
320,
210+
68,
211+
1302,
212+
2572,
213+
79135,
214+
275,
215+
15469,
216+
8,
217+
315,
218+
2331,
219+
4119,
220+
323,
221+
6485,
222+
5609,
223+
4119,
224+
1154,
225+
53829,
226+
311,
227+
16807,
228+
990,
229+
5048,
230+
624,
231+
83956,
232+
9010,
233+
11765,
234+
9551,
235+
25,
236+
66863,
237+
1824,
238+
369,
239+
762,
240+
782,
241+
1614,
242+
10272,
243+
2022,
244+
320,
245+
68,
246+
1302,
247+
2572,
248+
33551,
249+
23,
250+
11,
251+
9221,
252+
23,
253+
8,
254+
323,
255+
1007,
256+
10628,
257+
14830,
258+
151645,
259+
]
260+
]
261+
),
262+
"shape": (1, 128),
263+
"kwargs": {"max_length": 128, "padding_side": "left"},
264+
},
118265
]
119266

120267
for case in cases:

0 commit comments

Comments
 (0)