onnxruntime: onnxruntime 1.17.0 - fp16 model of inswapper causing render issues
Describe the issue
Since we updated to onnxruntime==1.17.0 the float16 version of the inswapper model stopped working and causes broken results depending in the integration.
Falling back to onnxruntime==1.16.3 resolves the issue. It seems to be broken for CPU and CUDA but works for TensorRT.
Distorted face (cuda)

Face box being black (cpu)

To reproduce
I created a dedicated repository to reproduce the issue and convert the model.
https://github.com/henryruhs/onnxruntime-fp16-issue
Urgency
Not sure how to define urgency, but this effects thousand of users as our project (FaceFusion) is kinda popular.
Platform
Linux
OS Version
Ubuntu 22 LTS
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.17.0
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU, CUDA
Execution Provider Library Version
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 7
- Comments: 16 (7 by maintainers)
Thanks again for the support
Yes. I think it shall be good with CUDA 11.8 version of ORT 1.17.x too when extra Cast nodes are removed from onnx model.
@henryruhs, please re-convert the model. That’s the fastest way to walkaround the issue.
The fix I mentioned shall be done in onnxconverter-common, and you can track the status of here: https://github.com/microsoft/onnxconverter-common/issues/271.
I can reproduce the issue. Let me try dump node inputs/outputs and see which operator might cause result change.