Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sd3-lite clip-l model swapped outputs #3704

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Fix sd3-lite clip-l model swapped outputs #3704

merged 3 commits into from
Dec 20, 2024

Conversation

ikalinic
Copy link
Member

The clip-l model from stable-diffusion-3-lite-onnx has swapped outputs, so this results in runtime error because of mismatched shapes. This fix proposes swapping the output tensors for the clip-l outputs if the shape doesn't match the required shape for one of the outputs, making stable-diffusion-3-lite-onnx run successfully.

@ikalinic ikalinic requested a review from kahmed10 December 11, 2024 14:46
@ikalinic ikalinic requested a review from causten as a code owner December 11, 2024 14:46
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.15%. Comparing base (0860461) to head (542805a).
Report is 17 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3704      +/-   ##
===========================================
- Coverage    92.23%   92.15%   -0.08%     
===========================================
  Files          514      514              
  Lines        21746    21956     +210     
===========================================
+ Hits         20057    20234     +177     
- Misses        1689     1722      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ikalinic ikalinic requested a review from kahmed10 December 17, 2024 08:17
@causten
Copy link
Collaborator

causten commented Dec 18, 2024

Just fix the format problem. Ignore the license problem since you didnt touch that code

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
542805
Rate old
f56b1b
Diff Compare
torchvision-resnet50 64 3,253.90 3,255.67 -0.05%
torchvision-resnet50_fp16 64 6,987.20 6,983.58 0.05%
torchvision-densenet121 32 2,432.85 2,431.65 0.05%
torchvision-densenet121_fp16 32 4,069.49 4,074.03 -0.11%
torchvision-inceptionv3 32 1,627.16 1,628.91 -0.11%
torchvision-inceptionv3_fp16 32 2,745.23 2,746.14 -0.03%
cadene-inceptionv4 16 765.51 764.54 0.13%
cadene-resnext64x4 16 812.80 813.45 -0.08%
slim-mobilenet 64 7,462.04 7,469.86 -0.10%
slim-nasnetalarge 64 209.00 209.05 -0.03%
slim-resnet50v2 64 3,438.81 3,440.80 -0.06%
bert-mrpc-onnx 8 1,146.07 1,145.22 0.07%
bert-mrpc-tf 1 473.07 476.55 -0.73%
pytorch-examples-wlang-gru 1 419.21 422.09 -0.68%
pytorch-examples-wlang-lstm 1 388.13 394.94 -1.72%
torchvision-resnet50_1 1 814.58 769.40 5.87% 🔆
cadene-dpn92_1 1 407.35 398.97 2.10%
cadene-resnext101_1 1 382.75 383.77 -0.27%
onnx-taau-downsample 1 345.74 345.22 0.15%
dlrm-criteoterabyte 1 33.33 33.32 0.01%
dlrm-criteoterabyte_fp16 1 52.74 52.72 0.04%
agentmodel 1 8,292.15 8,109.71 2.25%
unet_fp16 2 58.91 58.87 0.07%
resnet50v1_fp16 1 926.43 930.54 -0.44%
resnet50v1_int8 1 1,010.40 1,002.61 0.78%
bert_base_cased_fp16 64 1,170.58 1,168.63 0.17%
bert_large_uncased_fp16 32 362.86 363.25 -0.11%
bert_large_fp16 1 200.54 198.22 1.17%
distilgpt2_fp16 16 2,198.60 2,197.80 0.04%
yolov5s 1 524.08 532.80 -1.64%
tinyllama 1 43.35 43.43 -0.17%
vicuna-fastchat 1 174.83 174.20 0.36%
whisper-tiny-encoder 1 417.75 418.04 -0.07%
whisper-tiny-decoder 1 433.22 433.15 0.02%

Check results before merge 🔆

@migraphx-bot
Copy link
Collaborator


     ✅ bert-mrpc-onnx: PASSED: MIGraphX meets tolerance

     ✅ bert-mrpc-tf: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance

     ✅ torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-dpn92_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-resnext101_1: PASSED: MIGraphX meets tolerance

     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

     ✅ unet: PASSED: MIGraphX meets tolerance

     ✅ resnet50v1: PASSED: MIGraphX meets tolerance

     ✅ bert_base_cased_fp16: PASSED: MIGraphX meets tolerance

🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ bert_large: PASSED: MIGraphX meets tolerance

     ✅ yolov5s: PASSED: MIGraphX meets tolerance

     ✅ tinyllama: PASSED: MIGraphX meets tolerance

     ✅ vicuna-fastchat: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-encoder: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-decoder: PASSED: MIGraphX meets tolerance

     ✅ distilgpt2_fp16: PASSED: MIGraphX meets tolerance

@causten causten merged commit 52e204d into develop Dec 20, 2024
40 of 45 checks passed
@causten causten deleted the sd3-lite branch December 20, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants