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

[DevTask] Better caching for control models #2579

Closed
huchenlei opened this issue Jan 25, 2024 · 0 comments · Fixed by #2586
Closed

[DevTask] Better caching for control models #2579

huchenlei opened this issue Jan 25, 2024 · 0 comments · Fixed by #2586
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@huchenlei
Copy link
Collaborator

Currently the control model cache stores the PlugableModel object, which has caused some issue previously for multiple IP-Adapter usage (#2469). The PlugableModel object for ip-adapter contains extra information that should not be shared between units, which caused the last registered unit being applied multiple times. The temporary fix to this was to exclude IP-Adapter model from model cache. However, this causes IP-Adapter models being loaded from disk every time it is used, and this can be very costly for SDXL ip-adapters.

As requested in #2119 (comment), we should rework the caching mechanism to store the underlying model object, which the state_dict directly loads to instead of PlugableModel object.

@huchenlei huchenlei added bug Something isn't working enhancement New feature or request labels Jan 25, 2024
@huchenlei huchenlei self-assigned this Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant