-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(ModelManager): fix overridden VAE with relative path #4059
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
Conversation
|
Something else I stumbled over while working on this was the necessity to call Is there still an API requirement for the key of That doesn't need to be in the scope of this PR, but it would allow streamlining these functions while refactoring them. |
…r_instantiate # Conflicts: # invokeai/backend/model_management/model_manager.py
|
Now it turns out this does fix a bug: the changes by #4061 missed the case of a relative path being used in the VAE override. |
Thanks for catching that. |
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to clean up some of the awkwardness nicely. I’ll look at it in greater detail later today and do my review.
7deba79 to
bacdf98
Compare
# Conflicts: # invokeai/backend/model_management/model_manager.py
…te' into refactor/model_manager_instantiate
…r_instantiate # Conflicts: # invokeai/backend/model_management/model_manager.py
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you
The motivation here went something like this:
get_sizeis. It also seems to be the class that has access topathwhere the model is stored instead of just its run-time data.I got stumped trying to figure out how to get the ModelManager to give me a ModelBase instance for a model it's managing.
This PR includes some refactoring to make that more accessible, and sketches a new ModelManager method to make those instances — but we could also revert that last bit, leaving this PR to be pure refactoring and then work out the details of the new method separately.
Usage looks something like:
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Added/updated tests?