Skip to content

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Mar 27, 2023

  • This PR adds support for embedding files that contain a single key "emb_params". The only example I know of this format is the "EasyNegative" embedding on HuggingFace, but there are certainly others.

  • This PR also adds support for loading embedding files that have been saved in safetensors format.

  • It also cleans up the code so that the logic of probing for and selecting the right format parser is clear.

  • This is the same as Add support for yet another TI embedding file format (2.3 version) #3045, which is on the 2.3 branch.

- This PR adds support for embedding files that contain a single key
  "emb_params". The only example I know of this format is the
  "EasyNegative" embedding on HuggingFace, but there are certainly
  others.

- This PR also adds support for loading embedding files that have been
  saved in safetensors format.

- It also cleans up the code so that the logic of probing for and
  selecting the right format parser is clear.
@lstein lstein changed the title Add support for yet another textual inversion embedding format Add support for yet another TI embedding format (main version) Mar 27, 2023
@lstein lstein requested a review from damian0815 March 30, 2023 02:25
Copy link
Contributor

@damian0815 damian0815 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - with a small nitpick, having read the last version of textual_inversion_manager.py i think EmbeddingInfo would better be named ParsedEmbeddingInfo and also its definition ought to go beneath TextualInversionInfo - or better, it ought to be a subclass of TextualInversionManager itself (can't recall if that works in python). otherwise its scope/purpose, as a utility class that only exists transitionally, is unclear.

@lstein lstein enabled auto-merge March 30, 2023 11:51
@lstein lstein merged commit c4e6511 into main Mar 31, 2023
@lstein lstein deleted the enhance/support-another-embedding-format-main branch March 31, 2023 07:57
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

Successfully merging this pull request may close these issues.

4 participants