-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Maryhipp/trigger phrases #5825
Maryhipp/trigger phrases #5825
Conversation
@@ -164,6 +164,7 @@ def _from_model_json(self, model_json: Dict[str, Any], version_id: Optional[int] | |||
AllowDerivatives=model_json["allowDerivatives"], | |||
AllowDifferentLicense=model_json["allowDifferentLicense"], | |||
), | |||
trigger_phrases=version_json["trainedWords"], |
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 is already on the metadata object as trained_words
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.
Yeah I was trying to not use the civit key just to spite them
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.
I mean the metadata schema already extracts it a few lines earlier
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.
Do you prefer trained_words
? I don't feel strongly
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.
trigger_phrases
works for me, and is more consistent with the terminology we use for textual inversion embeddings.
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.
The MM backend changes look fine to me.
@@ -164,6 +164,7 @@ def _from_model_json(self, model_json: Dict[str, Any], version_id: Optional[int] | |||
AllowDerivatives=model_json["allowDerivatives"], | |||
AllowDifferentLicense=model_json["allowDifferentLicense"], | |||
), | |||
trigger_phrases=version_json["trainedWords"], |
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.
trigger_phrases
works for me, and is more consistent with the terminology we use for textual inversion embeddings.
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.
The backend changes look fine to me. I did limited testing of the frontend due to the Civitai license restrictions schema change causing Civitai installs to fail, but adding and removing trigger phrases from the list seems to work.
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Description
QA Instructions, Screenshots, Recordings
Merge Plan
Added/updated tests?
have not been included
[optional] Are there any post deployment tasks we need to perform?