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

Add support for yet another TI embedding file format (2.3 version) #3045

Merged
merged 2 commits into from
Mar 28, 2023

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 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.

1 participant