Skip to content

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Mar 27, 2023

  • This variant, exemplified by "easynegative.safetensors" has a single 'embparam' key containing a Tensor.
  • Also refactored code to make it easier to read.
  • Handle both pickle and safetensor formats.

- This variant, exemplified by "easynegative.safetensors" has a single
  'embparam' key containing a Tensor.
- Also refactored code to make it easier to read.
- Handle both pickle and safetensor formats.
@lstein lstein requested a review from blessedcoolant as a code owner March 27, 2023 03:43
@lstein lstein changed the title handle a fourth variant of embedding .pt files Add support for yet another TI embedding file format (2.3 version) Mar 27, 2023
@lstein lstein changed the base branch from v2.3 to release/2.3.3-rc3 March 28, 2023 04:46
@lstein lstein merged commit bb972b2 into release/2.3.3-rc3 Mar 28, 2023
@lstein lstein deleted the enhance/handle-another-embedding-variant branch March 28, 2023 04:46
lstein added a commit that referenced this pull request Mar 31, 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 #3045, which is on the 2.3 branch.
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.

2 participants