-
Notifications
You must be signed in to change notification settings - Fork 648
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
Add support for converting a inpainting model to ONNX and TensorRT #1831
Conversation
Hi, @KKIEEK |
@lvhan028 |
Don't worry. We still support the legacy version. |
The use cases failed with log:
My envs:
|
Honestly speaking, I don't know how to solve this problem.
|
2023-03-14 13:09:52,613 - mmdeploy - INFO - PyTorch: 1.13.1+cu116 2023-03-14 13:09:52,613 - mmdeploy - INFO - PyTorch: 1.10.1 both works |
Hi, @KKIEEK |
@lvhan028 I updated table in |
I met the same issue when I tried it with
|
I found a related issue NVIDIA/TensorRT#2484 |
Yes. After upgrading tensorrt from 8.2.3.0 to 8.5.3.1, |
|
@lvhan028 |
|
This is my test command: python tools/deploy.py configs/mmedit/inpainting/inpainting_tensorrt-fp16_static-256x256.py /data1/checkpoint/mmedit/deepfillv2/deepfillv2_256x256_8x2_places.py /data1/checkpoint/mmedit/deepfillv2/deepfillv2_256x256_8x2_places_20200619-10d15793.pth --device cuda demo/resources/det.jpg --work-dir /data1/mmdeploy_models/mmedit/trt/deepfillv2 |
I fixed it. @lvhan028 PyTorch (DeepFillv2)TensorRT (fp32)TensorRT (fp16) |
As shown in this experiment, the output of pytorch model and the output of tensorrt(fp32) model are different. |
I have some questions:
|
I see. From the perspective of converting an inpainting pytorch model to backend model, I think this PR works and I am gonna approve it. Good job! Regarding the actual model inference, this pipeline seems necessary. We will consider how to support it. |
I appreciate for your hard work, please tell me whenever you need any help about this PR. |
@KKIEEK Hi, many thanks for your PR. If you have time and interest in adding this feature to mmdeploy |
@RunningLeon Of course, I'll try it if you need this feature. However, I think it takes at least 3 weeks to draft PR. Could you wait for this? |
@KKIEEK Hi, Great. No hurry. If you have any questions, pls. let me know. Thanks in advance. |
Modification
I added a new feature to convert inpainting models in MMEditing to ONNX and TensorRT.
However, I can't provide quantitative evaluation because of the high computational cost required for CelebA and Places2. (These are too large)
If you have any idea, please let me know.
Use cases (Optional)