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

HUGE disk space usage in ORT_COREML #107

Open
yuygfgg opened this issue Sep 18, 2024 · 3 comments
Open

HUGE disk space usage in ORT_COREML #107

yuygfgg opened this issue Sep 18, 2024 · 3 comments

Comments

@yuygfgg
Copy link
Contributor

yuygfgg commented Sep 18, 2024

The coreml models compiled (or translated) from onnx is taking over 180GB in /private/var/folders/gb/m6gky8t10yx68drv06ncbj_h0000gn/T/ folder. I assume there is some missing cleaning up steps in vsort but can't confirm that. As a workaround, I added

import subprocess; subprocess.run('rm -r /private/var/folders/gb/m6gky8t10yx68drv06ncbj_h0000gn/T/onnxruntime*', shell=True, check=True) 

at the end of my VS script.

  • I think the path may vary on different devices, but in the past weeks only this folder is polluted.

The picture shows running a small model (Waifu2xModel.upconv_7_anime_style_art_rgb) for several times.
截屏2024-09-18 23 24 04

If larger model is used, larger mlmodel(c) folder (yes, although they look like files, they are folders in fact) is generated. For example, DPIR takes 130.1MB per run per tile.

@WolframRhodium
Copy link
Contributor

Thanks for the information, I'll check it tomorrow.

@WolframRhodium
Copy link
Contributor

I think this is a limitation of ORT itself:
https://github.com/microsoft/onnxruntime/blob/0f1f3b7705ddc2fe4f371f78a8a8b6a0428a68de/onnxruntime/core/providers/coreml/builders/model_builder.cc#L996-L1008
so your post cleaning script is required unfortunately.

@yuygfgg
Copy link
Contributor Author

yuygfgg commented Sep 19, 2024

I think this is a limitation of ORT itself: https://github.com/microsoft/onnxruntime/blob/0f1f3b7705ddc2fe4f371f78a8a8b6a0428a68de/onnxruntime/core/providers/coreml/builders/model_builder.cc#L996-L1008 so your post cleaning script is required unfortunately.

I see. I'm now kind of worrying about my SSD...

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