]> khamidou — GitHub mirrors - safetensors.git/log
safetensors.git
3 years agoAdding issue templates. (#268)
Nicolas Patry [Wed, 7 Jun 2023 11:45:47 +0000 (13:45 +0200)]
Adding issue templates. (#268)

3 years agofix typos (#257)
Kazuaki Ishizaki [Tue, 6 Jun 2023 13:14:50 +0000 (13:14 +0000)]
fix typos (#257)

3 years ago Add BERTopic in Featured Projects (#267)
Daniel van Strien [Tue, 6 Jun 2023 13:12:43 +0000 (14:12 +0100)]
 Add BERTopic in Featured Projects (#267)

3 years agoAdding error checking, convertion can fail on schedulers. (#266)
Nicolas Patry [Tue, 6 Jun 2023 11:03:30 +0000 (13:03 +0200)]
Adding error checking, convertion can fail on schedulers. (#266)

* Adding error checking, convertion can fail on schedulers.

* Printing messages on using the script directly.

3 years agoAdd `safejax` in "Featured Projects" (#260)
Alvaro Bartolome [Mon, 5 Jun 2023 14:40:06 +0000 (16:40 +0200)]
Add `safejax` in "Featured Projects" (#260)

3 years agoUpdate metadata_parsing.mdx (#261)
Mishig [Fri, 2 Jun 2023 08:26:28 +0000 (10:26 +0200)]
Update metadata_parsing.mdx (#261)

Add links to featured models

3 years agoFixing the spec with mention about the buffer which cannot be non-contiguous. (#253)
Nicolas Patry [Mon, 22 May 2023 14:07:24 +0000 (16:07 +0200)]
Fixing the spec with mention about the buffer which cannot be non-contiguous. (#253)

* Adding specification that the byte buffer needs to be contiguous and
full.

* Fix cargo.lock which messes up benchmarks.

3 years ago[docs] Safetensors format (#248)
Mishig [Mon, 22 May 2023 14:00:54 +0000 (16:00 +0200)]
[docs] Safetensors format (#248)

* [docs] Safetensors format

* More text

* Add format illustration

3 years agoAdded method `len` on `SafeTensors` (#252)
Funtowicz Morgan [Mon, 22 May 2023 13:26:06 +0000 (15:26 +0200)]
Added method `len` on `SafeTensors`  (#252)

* Added method `len` on `SafeTensors` in order to avoid allocating a new tensor through `names()` or `tensors()`

* Make clippy happy with `is_empty() -> bool`

* Apply @Narsil suggestion regarding is_empty

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
* Fix format.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoUpdate to actions/checkout@v3 (#251)
Funtowicz Morgan [Mon, 22 May 2023 12:50:23 +0000 (14:50 +0200)]
Update to actions/checkout@v3 (#251)

3 years ago[doc] featured projects (#249)
Mishig [Fri, 19 May 2023 08:47:17 +0000 (10:47 +0200)]
[doc] featured projects (#249)

* [doc] featured projects

* typo

3 years ago[doc] Add logo img to index doc page (#247)
Mishig [Wed, 17 May 2023 13:28:49 +0000 (15:28 +0200)]
[doc] Add logo img to index doc page (#247)

* [doc] Add logo img to index doc page

* Update logo.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoThere should be `.dev0` while on `main` (#246)
Mishig [Wed, 17 May 2023 13:18:07 +0000 (15:18 +0200)]
There should be `.dev0` while on `main` (#246)

3 years ago[doc] Improve metadata parsing doc (#245)
Mishig [Wed, 17 May 2023 12:59:32 +0000 (14:59 +0200)]
[doc] Improve metadata parsing doc  (#245)

* hfjs link to parsesafetensorsmetadata

* Add conditional image

* better wording

* new images

* Add python example

* Add reference to range request

* capitalization

3 years ago[doc] Add a doc page about (remote) Metadata parsing (#243)
Julien Chaumond [Wed, 17 May 2023 09:16:40 +0000 (11:16 +0200)]
[doc] Add a doc page about (remote) Metadata parsing (#243)

Would close #44

3 years agoAdding a banner to the README. (#244)
Nicolas Patry [Wed, 17 May 2023 09:15:11 +0000 (11:15 +0200)]
Adding a banner to the README. (#244)

* Adding a banner to the README.

* Svg.

* Fix size.

3 years agoFixing conda workflow. (#240)
Nicolas Patry [Tue, 25 Apr 2023 12:34:04 +0000 (14:34 +0200)]
Fixing conda workflow. (#240)

3 years agoPrepare 0.3.2 (#239)
Nicolas Patry [Tue, 25 Apr 2023 08:24:04 +0000 (10:24 +0200)]
Prepare 0.3.2 (#239)

3 years agoNew release candidate. (#224)
Nicolas Patry [Mon, 24 Apr 2023 14:21:09 +0000 (16:21 +0200)]
New release candidate. (#224)

3 years agoFixing shared detection logic. (#232)
Nicolas Patry [Mon, 24 Apr 2023 14:15:32 +0000 (16:15 +0200)]
Fixing shared detection logic. (#232)

* Fixing shared tensor logic.

* Fixing shared detection logic.

* torch 1.10 support.

* Rebase.

3 years agoAdding `save_model` and `load_model` to help with shared tensors with PyTorch. (...
Nicolas Patry [Mon, 24 Apr 2023 10:37:00 +0000 (12:37 +0200)]
Adding `save_model` and `load_model` to help with shared tensors with PyTorch. (#236)

* Adding `save_model` and `load_model` to help with shared tensors

and non contiguous tensors.

* Tmp.

* Adding more docs more tests on the edge cases.

* Adding support for different `keep_name` on disk.

* Torch 1.10 support + save_model failure test.

* Fixes 1.10

* Debugging on remote..

* 1.

* 2.

* 3.

* 4.

* Trying to fix documentation builder version.

* PR documentation + route from error message to new methods.

* ..

* Revert ".."

This reverts commit 564b6863fc11407e19982944733de999c17c95ba.

* Fixing `.[dev]` ?

* Adding contiguous support.

* ?

* Fix.

3 years agoFixing alignment (#235)
Nicolas Patry [Fri, 21 Apr 2023 12:54:22 +0000 (14:54 +0200)]
Fixing alignment (#235)

* Alignment checking.

* Fix alignments.

* Updating python tests.

* Improve a bit readability.

3 years agoFixing the logic to determine if PR is up-to-date. (#230)
Nicolas Patry [Wed, 19 Apr 2023 13:46:04 +0000 (15:46 +0200)]
Fixing  the logic to determine if PR is up-to-date. (#230)

* Fixing  the logic to determine if PR is up-to-date.

* Update bindings/python/convert.py

3 years agoCommitting Cargo.lock. (#233)
Nicolas Patry [Wed, 12 Apr 2023 14:18:58 +0000 (16:18 +0200)]
Committing Cargo.lock. (#233)

* Committing Cargo.lock.

* Update .gitignore

Co-authored-by: Mishig <dmishig@gmail.com>
---------

Co-authored-by: Mishig <dmishig@gmail.com>
3 years agoMinor checks + proptest in python. (#228)
Nicolas Patry [Thu, 6 Apr 2023 11:08:14 +0000 (13:08 +0200)]
Minor checks + proptest in python. (#228)

* Minor checks + proptest in python.

* Fix readme.

* Tf version.

* Fix.

* Jax version.

* Jaxlib.

* Jax.

* Cannot have jax version

- Python 3.7 is minimal version for which they don't have release
  jax>0.4
- Our doc builder relies on jax>0.4

* wtf.

* .

* ...

* Wahtever.

3 years agoSpecify python versions. (#227)
Nicolas Patry [Thu, 6 Apr 2023 08:27:38 +0000 (10:27 +0200)]
Specify python versions. (#227)

3 years ago0-sized tensors allowed. (#226)
Nicolas Patry [Thu, 6 Apr 2023 08:27:30 +0000 (10:27 +0200)]
0-sized tensors allowed. (#226)

3 years agoAdding last missing test for validate. (#225)
Nicolas Patry [Thu, 6 Apr 2023 08:27:13 +0000 (10:27 +0200)]
Adding last missing test for validate. (#225)

3 years agoRemove the breaking change of disallowing zero sized tensors. (#221)
Nicolas Patry [Thu, 30 Mar 2023 12:58:08 +0000 (14:58 +0200)]
Remove the breaking change of disallowing zero sized tensors. (#221)

* Remove the breaking change of disallowing zero sized tensors.

Some files out there might exist with this.
While being questionnable, it's not worth doing a breaking change
since there doesn't seem to be either a security implication
nor a performance hit.

* Full support for zero-sized tensor on torch==1.10

* Adding a nice comment.

3 years agoFixing empty shape test. (#218)
Nicolas Patry [Wed, 29 Mar 2023 08:58:08 +0000 (10:58 +0200)]
Fixing empty shape test. (#218)

3 years agoAdd a safety warning in the convertion script. (#219)
Nicolas Patry [Wed, 29 Mar 2023 08:57:32 +0000 (10:57 +0200)]
Add a safety warning in the convertion script. (#219)

* Add a safety warning in the convertion script.

* Fix test temporarily.

3 years agoAdding arithmetic overflow checks (unchecked in release builds). (#207)
Nicolas Patry [Wed, 29 Mar 2023 08:57:14 +0000 (10:57 +0200)]
Adding arithmetic overflow checks (unchecked in release builds). (#207)

* Adding arithmetic overflow checks (unchecked in release builds).

* Fix rebase

3 years agoOverspecify a bit the format. (#215)
Nicolas Patry [Tue, 28 Mar 2023 13:53:50 +0000 (15:53 +0200)]
Overspecify a bit the format. (#215)

* Updating the README to overspecify JSON.

* Overspecify a bit the format.

* Stop being annoying.

* Fixing python cache + gh action.

* Fix audit.

* Fixing rust cache for python directory ?

3 years agoDisallow erroneous buffer. (#206)
Nicolas Patry [Tue, 28 Mar 2023 13:47:23 +0000 (15:47 +0200)]
Disallow erroneous buffer. (#206)

3 years agoDisallowing zero-width tensor. (#205)
Nicolas Patry [Tue, 28 Mar 2023 13:45:39 +0000 (15:45 +0200)]
Disallowing zero-width tensor. (#205)

* Disallowing zero-width tensor.

* Fix test.

3 years agoAdding simple proptest. (#216)
Nicolas Patry [Tue, 28 Mar 2023 13:45:08 +0000 (15:45 +0200)]
Adding simple proptest. (#216)

3 years agoZero width shape are OK (0-rank tensors). They are simply a scalar. (#208)
Nicolas Patry [Tue, 28 Mar 2023 13:32:41 +0000 (15:32 +0200)]
Zero width shape are OK (0-rank tensors). They are simply a scalar. (#208)

* Zero width shape are OK (0-rank tensors). They are simply a scalar.

Reasosn for support is that both torch and numpy support them, and
they flow naturally from the definition that an empty product has
length 1.

* not allowed -> allowed

3 years agoDeactivating codecov commenting. (#217)
Nicolas Patry [Tue, 28 Mar 2023 13:20:39 +0000 (15:20 +0200)]
Deactivating codecov commenting. (#217)

3 years agoIncrease coverage on the error paths. (#214)
Nicolas Patry [Tue, 28 Mar 2023 12:13:38 +0000 (14:13 +0200)]
Increase coverage on the error paths. (#214)

3 years agoFixing codecov rust tag. (#213)
Nicolas Patry [Tue, 28 Mar 2023 10:46:09 +0000 (12:46 +0200)]
Fixing codecov rust tag. (#213)

3 years agoOops. (#212)
Nicolas Patry [Tue, 28 Mar 2023 10:40:20 +0000 (12:40 +0200)]
Oops. (#212)

3 years agoUpload codecov for main branch. (#211)
Nicolas Patry [Tue, 28 Mar 2023 10:33:56 +0000 (12:33 +0200)]
Upload codecov for main branch. (#211)

3 years agoRemove unwrap in prod code. (#209)
Nicolas Patry [Tue, 28 Mar 2023 10:26:19 +0000 (12:26 +0200)]
Remove unwrap in prod code. (#209)

3 years agoMore badges. (#210)
Nicolas Patry [Tue, 28 Mar 2023 10:24:44 +0000 (12:24 +0200)]
More badges. (#210)

* More badges.

* Update action to create codecov.

* Update readmes.

* Fix doc link.

* Two lines for Python and Rust.

* Doc link.

* Fix badge label.

* Use simpler run to get default working-dir.

* Fix ?

* Audit.

* Ignore criterion issue.

* Better command line ?

* codecov token.

* Working dir.

* Specify file.

* Fixing upload only on ubuntu.

* Code coverage only on linux.

* Fix codecov link.

3 years agoMinor improvements for README (#201)
nickkolok [Tue, 28 Mar 2023 08:20:42 +0000 (11:20 +0300)]
Minor improvements for README (#201)

* Use `s for code

* Fix typos in README

* All readmes.

* Adding Rust cache and latest ubuntu for python tests.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoAdding a minimal version for torch. (#204)
Nicolas Patry [Mon, 27 Mar 2023 08:30:56 +0000 (10:30 +0200)]
Adding a minimal version for torch. (#204)

3 years agoPython 2.0 added a warning on ByteStorage, so using UntypedStorage (#196)
Nicolas Patry [Fri, 17 Mar 2023 14:56:06 +0000 (15:56 +0100)]
Python 2.0 added a warning on ByteStorage, so using UntypedStorage (#196)

* Python 2.0 added a warning on ByteStorage, so using UntypedStorage

directly for that version.

Small error in their docs, `size` got renamed `nbytes`.

* Remove unused work.

3 years agoAdding commit description to convertion PR. (#198)
Nicolas Patry [Fri, 17 Mar 2023 09:42:34 +0000 (10:42 +0100)]
Adding commit description to convertion PR. (#198)

* Adding commit description to convertion PR.

* Update bindings/python/convert.py

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Adding suggestion for reporting issues.

---------

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
3 years agoNicer error when failed to find tensor in Rust. (#191)
Nicolas Patry [Mon, 13 Mar 2023 10:35:40 +0000 (11:35 +0100)]
Nicer error when failed to find tensor in Rust. (#191)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-94.eu-west-3.compute.internal>
3 years agoMaking sure the safetensors existing PR is up-to-date. (#192)
Nicolas Patry [Mon, 13 Mar 2023 10:35:27 +0000 (11:35 +0100)]
Making sure the safetensors existing PR is up-to-date. (#192)

* Making sure the safetensors existing PR is up-to-date.

* Fixed `target_branch` exists only on details.

3 years agoAdding memmap example to read from file. (#189)
Nicolas Patry [Wed, 8 Mar 2023 12:01:26 +0000 (13:01 +0100)]
Adding memmap example to read from file. (#189)

3 years agoRemove too many keywords. (#187)
Nicolas Patry [Wed, 8 Mar 2023 12:01:11 +0000 (13:01 +0100)]
Remove too many keywords. (#187)

3 years agoVersion 0.3.0 (#186)
Nicolas Patry [Fri, 3 Mar 2023 14:21:07 +0000 (15:21 +0100)]
Version 0.3.0 (#186)

3 years agoPreparing for release 0.3rc1. (#185)
Nicolas Patry [Wed, 1 Mar 2023 20:45:08 +0000 (21:45 +0100)]
Preparing for release 0.3rc1. (#185)

* Preparing for release 0.3rc1.

* Full version number.

3 years agoFaster GPU Loads ?? (#184)
Nicolas Patry [Tue, 28 Feb 2023 15:19:40 +0000 (16:19 +0100)]
Faster GPU Loads ?? (#184)

* Faster GPU Loads ??

Beats my expectations. I wonder what I did do to not see this perf
bottleneck/improvements.

* Pyslice still not fixed on PyO3.

* Upgrade PyO3.

* Using newer pyo3.

* Make benches Windows friendly.

3 years agoBetter Rust API (tch-rs) (#179)
Nicolas Patry [Fri, 24 Feb 2023 13:56:51 +0000 (14:56 +0100)]
Better Rust API (tch-rs) (#179)

* Implementing a trait API for the Rust (should make tch-rs interaction
easier).

* Companion type.

* Re-export major formats + 3rd example in the trait doc.

* Even clearer OpaqueGPU type.

* Moving to `Cow<[u8]>`. Feels simpler.

* Fixes.

3 years agoREADME.md proposed clarity (#181)
Dwayne Robinson [Fri, 24 Feb 2023 10:12:57 +0000 (02:12 -0800)]
README.md proposed clarity (#181)

* README.md proposed clarity

I had to look via a hex editor at an existing .safetensors file to figure it out (maybe this will accelerate others slightly to adopt it 😅), because parentheses "(...)" are not legal JSON, and it wasn't clear to me whether the offsets were file relative or byte buffer relative.

* Update other readme.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years ago[Major Change] Enforcing tensor alignment (#148)
Nicolas Patry [Tue, 21 Feb 2023 14:23:56 +0000 (15:23 +0100)]
[Major Change] Enforcing tensor alignment (#148)

* [Major Change] Enforcing tensor alignment

- Now the header will automatically align itself to 8 bytes (f64) with
  appending extra spaces as necessary.
- This will allow extra fast memory mapping by reinterpreting bytes as
  f32/f64 etc.. Unaligned bytes do not allow for this. https://www.reddit.com/r/rust/comments/tanaxm/mutating_a_buffer_of_u8s_as_f32s_in_place/
- This does not change contiguousness of tensors
- This does not change the actual spec (we're just putting extra valid bytes
  in the header and using a different serialization ordering)
- Readers should still be able to read old files, they would just need
  to be copied before being cast as their final destination when using
  mmap
- This has no effect for GPU since copy is already necessary (*I think*,
  depends on the cuda API actually if it allows filling f32 addresses
  from raw unaligned bytes).

This change will only be interesting if things like https://github.com/Narsil/fast_gpt2
actually pick up. And even with the copy, load times are still vastly
superior to `pytorch`.

We need to be able to read old files.

* Fixup.

* Clippy fix.

* Cargo fmt (clippy --fix broke it ? :( )

3 years agoadd paddle docs (#177)
yujun [Wed, 8 Feb 2023 10:06:05 +0000 (18:06 +0800)]
add paddle docs (#177)

3 years agoAdd PaddlePaddle backend (#176)
yujun [Tue, 7 Feb 2023 14:44:54 +0000 (22:44 +0800)]
Add PaddlePaddle backend (#176)

* add paddle backend

* add paddle ace

* update docs

* Some modifications.

* Consistency.

* Showing Paddle format.

* donot modify lib.rs

* remove test_deserialization_safe_open test

* rm unused import

* make style

* Style.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoFixing error message for FileNotFound. (#175)
Nicolas Patry [Mon, 6 Feb 2023 11:05:40 +0000 (12:05 +0100)]
Fixing error message for FileNotFound. (#175)

* Fixing error message for FileNotFound.

* Old PR readme fix.

3 years agoUpdate README.md (#170)
Nicolas Patry [Mon, 30 Jan 2023 13:00:51 +0000 (14:00 +0100)]
Update README.md (#170)

Fixes #169 169

3 years agoClippy fix. (#171)
Nicolas Patry [Mon, 30 Jan 2023 12:59:40 +0000 (13:59 +0100)]
Clippy fix. (#171)

* Clippy fix.

* And tests.

3 years agoBetter error messages on outdated context manager. (#168)
Nicolas Patry [Fri, 20 Jan 2023 14:05:24 +0000 (15:05 +0100)]
Better error messages on outdated context manager. (#168)

* Better error messages on outdated context manager.

* Clippy.

* Remove unwrap.

* Fix.

3 years agoMinor pydoc fixes for torch bindings (#167)
John B Nelson [Fri, 20 Jan 2023 10:07:11 +0000 (02:07 -0800)]
Minor pydoc fixes for torch bindings (#167)

3 years agoFixing the fact that the context manager wasn't properly cleaning up after itself...
Nicolas Patry [Thu, 19 Jan 2023 13:30:56 +0000 (14:30 +0100)]
Fixing the fact that the context manager wasn't properly cleaning up after itself. (#166)

* Adding failing test for windows.

* This should fail.

* Fixing Windows issue by actually dropping the rust resources.

* Making the rust module private.

3 years agoAdding custom error type for users to properly catch. (#165)
Nicolas Patry [Tue, 17 Jan 2023 17:06:34 +0000 (18:06 +0100)]
Adding custom error type for users to properly catch. (#165)

3 years agoAdded JSONSchema of the header. (#151)
KOLANICH [Tue, 17 Jan 2023 16:39:47 +0000 (16:39 +0000)]
Added JSONSchema of the header. (#151)

3 years agoEnabling 3.8 support for M1. (#162)
Nicolas Patry [Tue, 17 Jan 2023 09:04:04 +0000 (10:04 +0100)]
Enabling 3.8 support for M1. (#162)

3 years agoUpdate README.md (#163)
Thomas Wang [Tue, 17 Jan 2023 09:02:28 +0000 (10:02 +0100)]
Update README.md (#163)

* Update README.md

Link to huggingface.co documentation

* Make rust doc match

* Why is the documentation at three different places?

3 years agoNew unreleased version. (#161)
Nicolas Patry [Mon, 16 Jan 2023 15:40:29 +0000 (16:40 +0100)]
New unreleased version. (#161)

* New unreleased version.

* Making only 1 release now.

3 years agoImprove type hinting (#159)
Thomas Wang [Mon, 16 Jan 2023 14:28:18 +0000 (15:28 +0100)]
Improve type hinting (#159)

3 years agoFix byte order detection for `np.uint8` and other types for which byte order is not...
Nicolas Patry [Mon, 16 Jan 2023 12:42:22 +0000 (13:42 +0100)]
Fix byte order detection for `np.uint8` and other types for which byte order is not defined. (#160)

* Fix byte order detection for `np.uint8` and other types for which byte order is not defined.

* Fixing np.uint8 endianness for `save`.

Co-authored-by: KOLANICH <kolan_n@mail.ru>
3 years agoPreparing next version. (#158)
Nicolas Patry [Mon, 16 Jan 2023 09:34:28 +0000 (10:34 +0100)]
Preparing next version. (#158)

3 years agoUpdating rust ergonomics. (#144)
Nicolas Patry [Fri, 30 Dec 2022 13:28:44 +0000 (14:28 +0100)]
Updating rust ergonomics. (#144)

- `get_` prefix removed in a few functions.
- Make error implement Error.

3 years agoFixing torch version parsing. (#143)
Nicolas Patry [Thu, 29 Dec 2022 07:17:56 +0000 (08:17 +0100)]
Fixing torch version parsing. (#143)

* Fixing torch version parsing.

* Anticipating a bit more variations of this.

3 years agoUpdate docstrings & type-hints (#139)
Alvaro Bartolome [Tue, 27 Dec 2022 09:02:52 +0000 (10:02 +0100)]
Update docstrings & type-hints (#139)

3 years agoMaking SAFETENSORS_FAST_GPU=1 work on Windows again. (#140)
Nicolas Patry [Tue, 27 Dec 2022 08:13:28 +0000 (09:13 +0100)]
Making SAFETENSORS_FAST_GPU=1 work on Windows again. (#140)

* Making Windows load cudart differently.

* Remove unsafe.

* Misplaced comment

3 years agoAdding stale bot. (#135)
Nicolas Patry [Mon, 19 Dec 2022 12:50:15 +0000 (13:50 +0100)]
Adding stale bot. (#135)

* Adding stale bot.

* Clippy.

3 years agoFix readme typos (#133)
Vilém Zouhar [Thu, 15 Dec 2022 08:38:37 +0000 (09:38 +0100)]
Fix readme typos (#133)

* fix readme typos

* Replicating docs on all 3 files.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoNew version. (#132)
Nicolas Patry [Wed, 14 Dec 2022 12:55:28 +0000 (13:55 +0100)]
New version. (#132)

3 years agoUpdate README.md (#131)
Thomas Wang [Wed, 14 Dec 2022 10:23:50 +0000 (11:23 +0100)]
Update README.md (#131)

* Update README.md

* Update other files.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoFixing it for `diffusers`. (#130)
Nicolas Patry [Tue, 13 Dec 2022 16:17:42 +0000 (17:17 +0100)]
Fixing it for `diffusers`. (#130)

3 years agoNecessary modifications to publish on Rust. (#129)
Nicolas Patry [Tue, 13 Dec 2022 15:14:56 +0000 (16:14 +0100)]
Necessary modifications to publish on Rust. (#129)

* Adding Info to publish.

* Bench.

* Update README.

3 years agoRelease rust. (#126)
Nicolas Patry [Mon, 12 Dec 2022 13:59:19 +0000 (14:59 +0100)]
Release rust. (#126)

3 years agoKeras new format is not safe. (#127)
Nicolas Patry [Mon, 12 Dec 2022 10:40:56 +0000 (11:40 +0100)]
Keras new format is not safe. (#127)

3 years agoAdding support for Python 3.11 on Linux + fix the source build wheel. (#125)
Nicolas Patry [Mon, 12 Dec 2022 09:24:49 +0000 (10:24 +0100)]
Adding support for Python 3.11 on Linux + fix the source build wheel. (#125)

3 years agoPython fuzzing. (#123)
Nicolas Patry [Wed, 7 Dec 2022 16:04:03 +0000 (17:04 +0100)]
Python fuzzing. (#123)

3 years agoMinor typo (#121)
lsb [Tue, 6 Dec 2022 09:25:11 +0000 (01:25 -0800)]
Minor typo (#121)

* Minor typo

* READMEs.

* Fix the reamde? ??

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoAdding `cargo fuzz` and found sanitation opportunities. (#119)
Nicolas Patry [Mon, 5 Dec 2022 17:33:12 +0000 (18:33 +0100)]
Adding `cargo fuzz` and found sanitation opportunities. (#119)

* Adding `cargo fuzz` and found sanitation opportunities.

* Better code.

3 years agoSupporting stable-diffusion by default. (#118)
Nicolas Patry [Wed, 30 Nov 2022 16:01:55 +0000 (17:01 +0100)]
Supporting stable-diffusion by default. (#118)

* New updates.

* Force load checkpoint on cpu.

3 years agoSupporting stable-diffusion by default. (#117)
Nicolas Patry [Wed, 30 Nov 2022 13:46:38 +0000 (14:46 +0100)]
Supporting stable-diffusion by default. (#117)

3 years agoAdd pip installation guide (#116)
Patrick von Platen [Mon, 28 Nov 2022 13:26:04 +0000 (14:26 +0100)]
Add pip installation guide (#116)

* Add pip installation guide

* Update the 3 locations.

* Those are not doctests.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
4 years agoNew version. (#114)
Nicolas Patry [Sat, 26 Nov 2022 21:17:34 +0000 (22:17 +0100)]
New version. (#114)

4 years agoI hate yaml. (#110)
Nicolas Patry [Wed, 23 Nov 2022 19:57:32 +0000 (20:57 +0100)]
I hate yaml. (#110)

4 years agoUpdate workflow. (#109)
Nicolas Patry [Wed, 23 Nov 2022 19:27:02 +0000 (20:27 +0100)]
Update workflow. (#109)

4 years agoM1 fix (pyenv cannot use `3.11`. (#108)
Nicolas Patry [Wed, 23 Nov 2022 18:28:38 +0000 (19:28 +0100)]
M1 fix (pyenv cannot use `3.11`. (#108)

4 years agoFixes https://github.com/huggingface/safetensors/actions/runs/3534003128/jobs/5930362...
Nicolas Patry [Wed, 23 Nov 2022 17:11:10 +0000 (18:11 +0100)]
Fixes https://github.com/huggingface/safetensors/actions/runs/3534003128/jobs/5930362952 (#107)

4 years agoImprove error message when saving bogus object. (#106)
Nicolas Patry [Wed, 23 Nov 2022 14:41:36 +0000 (15:41 +0100)]
Improve error message when saving bogus object. (#106)

4 years agoFix `convert.py` to handle diffusers, and its transformers part (#105)
Nicolas Patry [Wed, 23 Nov 2022 14:41:15 +0000 (15:41 +0100)]
Fix `convert.py` to handle diffusers, and its transformers part (#105)

Turns out `diffusers` does rely on `transformers`:

`pytorch_model.safetensors` was not a recognized filename by
`transformers` which expects it to be named `model.safetensors`.

The convert_generic works by simply creating the new files and changing
the extension, which broke this.

Current proposed fix is to handle specially files named
`pytorch_model.bin` since they are more likely to be `transformers`
files.

This is however not necessarily true, we might want to protect with
checking against `model_info.library_name` though I feel like this is
better to just check against the name, since it's still likely to be a
transformers/diffusers/sentence-transformers thing.