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

[Bug] Onnx runtime branch generates non-deterministic output #5

Closed
huchenlei opened this issue Aug 7, 2023 · 3 comments
Closed

[Bug] Onnx runtime branch generates non-deterministic output #5

huchenlei opened this issue Aug 7, 2023 · 3 comments

Comments

@huchenlei
Copy link

huchenlei commented Aug 7, 2023

I port the onnx version to A1111 ControlNet extension here:
https://github.com/Mikubill/sd-webui-controlnet/tree/reland_dw_pose_onnx

However, I noticed that running tests/annotator_tests/openpose_tests/openpose_e2e_test.py now produce unstable output. Each time the preprocessor is invoked, there can be slight difference on output. (Test is using PNG format, so not an image compression issue).

Other side notes:

I also noticed following console log. Is that normal?

2023-08-07 00:37:24.3441453 [W:onnxruntime:, session_state.cc:1169 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2023-08-07 00:37:24.3531927 [W:onnxruntime:, session_state.cc:1171 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.

Can you upload the onnx model to huggingface so that they can be fetched via script easily? I saw there is an DWPose huggingface repo here: https://huggingface.co/camenduru/DWPose/tree/main. Is that official?

@huchenlei huchenlei changed the title [Bug] Onnx runtime branch provides unstable output [Bug] Onnx runtime branch generates unstable output Aug 7, 2023
@huchenlei huchenlei changed the title [Bug] Onnx runtime branch generates unstable output [Bug] Onnx runtime branch generates non-deterministic output Aug 7, 2023
@yzd-v
Copy link
Contributor

yzd-v commented Aug 7, 2023

The result of CPU and GPU has a little difference. We have updated the INSTALL.md. When there has a gpu, we can install onnxruntime-gpu. Then the device is stable, the result is also stable. Thanks for the suggestion, we will release the official model to huggingface later.

@yzd-v
Copy link
Contributor

yzd-v commented Aug 7, 2023

The log of onnx is normal. We upload all dwpose models to huggungface: https://huggingface.co/yzd-v/DWPose/tree/main

@huchenlei
Copy link
Author

Thanks!

I think the non-deterministic behaviour comes from the onnx environment:
audeering/audonnx#61
microsoft/onnxruntime#4611

I think it is a just a minor issue on testing. It should not block the release.

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

No branches or pull requests

2 participants