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

Long loading time issue, related to dwpose, after installing the proper onnxruntime-gpu. #89

Closed
ltdrdata opened this issue Oct 29, 2023 · 1 comment

Comments

@ltdrdata
Copy link

ltdrdata commented Oct 29, 2023

To resolve the issue of DWPose running on CPU, I installed the onnxruntime-gpu package. However, I've discovered that in ComfyUI, there is a phenomenon where this code is executed for about 10 seconds every time cnet aux is imported.

print("DWPose: Onnxruntime with acceleration providers detected. Caching sessions (might take around half a minute)...")

Is there a specific reason why this check code needs to be placed in the startup?

@ltdrdata ltdrdata changed the title Long loading time issue after installing the proper onnxruntime-gpu. Long loading time issue, related to dwpose, after installing the proper onnxruntime-gpu. Oct 29, 2023
@Fannovel16
Copy link
Owner

Fannovel16 commented Oct 29, 2023

@ltdrdata All preprocessor models are not cached by Comfy cache mechanism but their creation time is pretty fast so it doesn't effect the performance much, except DWPose. The time it takes to create a onnxruntime session is very long compared to other preprocessor models. Therefore, the session is cached as a global variable.

But I forgot to make a flag checking whether it was already cached or not. Thanks for pointing it out.

Foligattilj added a commit to Foligattilj/comfyui_controlnet_aux that referenced this issue Jul 24, 2024
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