Commit e0a6efb
fix trt engine building of the diffusers pipelines (NVIDIA#637)
## What does this PR do?
**Type of change:**
Bug fix
**Overview:**
1. The diffusion_trt.py needs the dynamic_shapes when running trtexec
for engine building. A previous change altered the format of
dynamic_shapes, fix it here.
2. the dynamic_shapes logic gets cleaned up. The existing logic is very
confusing
3. recover min-batch_size config for some pipelines. Previously some
pipelines set the min batch_size to be > 1, which was odd, so a previous
change sets them to be 1, but it turns out the oddity has a reason, the
trt engine building fails with the altered batch_size min/opt, thus
recover them.
## Testing
pytest tests/examples/diffusers
---------
Signed-off-by: Shengliang Xu <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
Co-authored-by: Keval Morabia <[email protected]>1 parent 422c58b commit e0a6efb
File tree
5 files changed
+43
-47
lines changed- examples/diffusers
- cache_diffusion
- quantization
- onnx_utils
5 files changed
+43
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | | - | |
| 190 | + | |
190 | 191 | | |
191 | | - | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
| 196 | + | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
| |||
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
237 | | - | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
243 | | - | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
| |||
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| 274 | + | |
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
| |||
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
| 296 | + | |
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 300 | + | |
| 301 | + | |
303 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
389 | 387 | | |
390 | | - | |
| 388 | + | |
391 | 389 | | |
392 | 390 | | |
393 | 391 | | |
394 | | - | |
| 392 | + | |
395 | 393 | | |
396 | 394 | | |
397 | 395 | | |
398 | | - | |
| 396 | + | |
399 | 397 | | |
400 | 398 | | |
401 | 399 | | |
402 | | - | |
| 400 | + | |
403 | 401 | | |
404 | 402 | | |
405 | 403 | | |
| |||
414 | 412 | | |
415 | 413 | | |
416 | 414 | | |
417 | | - | |
| 415 | + | |
418 | 416 | | |
419 | 417 | | |
420 | 418 | | |
| |||
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
432 | | - | |
| 430 | + | |
433 | 431 | | |
434 | | - | |
| 432 | + | |
435 | 433 | | |
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
454 | 452 | | |
455 | 453 | | |
456 | 454 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
0 commit comments