Skip to content

Commit d8c3af6

Browse files
Use git-lfs for larger assets (#7804)
## Summary - Integrate Git LFS to our automated Python tests in CI - Add stripped model files with git-lfs - `README.md` instructions to install and configure git-lfs - Unrelated change (skip hashing to make unit test run faster) ## Related Issues / Discussions <!--WHEN APPLICABLE: List any related issues or discussions on github or discord. If this PR closes an issue, please use the "Closes #1234" format, so that the issue will be automatically closed when the PR merges.--> ## QA Instructions <!--WHEN APPLICABLE: Describe how you have tested the changes in this PR. Provide enough detail that a reviewer can reproduce your tests.--> ## Merge Plan <!--WHEN APPLICABLE: Large PRs, or PRs that touch sensitive things like DB schemas, may need some care when merging. For example, a careful rebase by the change author, timing to not interfere with a pending release, or a message to contributors on discord after merging.--> ## Checklist - [ ] _The PR has a short but descriptive title, suitable for a changelog_ - [ ] _Tests added / updated (if applicable)_ - [ ] _Documentation added / updated (if applicable)_ - [ ] _Updated `What's New` copy (if doing a release after this PR)_
2 parents feed44b + 247f3b5 commit d8c3af6

File tree

62 files changed

+200
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+200
-13
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# Only affects text files and ignores other file types.
33
# For more info see: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/
44
* text=auto
5-
docker/** text eol=lf
5+
docker/** text eol=lf
6+
tests/test_model_probe/stripped_models/** filter=lfs diff=lfs merge=lfs -text

.github/workflows/python-tests.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ jobs:
7272
PIP_USE_PEP517: '1'
7373
steps:
7474
- name: checkout
75-
uses: actions/checkout@v4
75+
# https://github.com/nschloe/action-cached-lfs-checkout
76+
uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2
7677

7778
- name: check for changed python files
7879
if: ${{ inputs.always_run != true }}

docs/contributing/dev-environment.md

+17-7

tests/test_model_probe.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,19 @@ def test_regression_against_model_probe(datadir: Path, override_model_loading):
146146
The test paths are gathered from the 'test_model_probe' directory.
147147
"""
148148
configs_with_tests = set()
149+
model_paths = ModelSearch().search(datadir / "stripped_models")
150+
fake_hash = "abcdefgh" # skip hashing to make test quicker
149151

150-
model_paths = ModelSearch().search(datadir)
151152
for path in model_paths:
152153
legacy_config = new_config = None
153154

154155
try:
155-
legacy_config = ModelProbe.probe(path)
156+
legacy_config = ModelProbe.probe(path, {"hash": fake_hash})
156157
except InvalidModelConfigException:
157158
pass
158159

159160
try:
160-
new_config = ModelConfigBase.classify(path)
161+
new_config = ModelConfigBase.classify(path, hash=fake_hash)
161162
except InvalidModelConfigException:
162163
pass
163164

@@ -176,7 +177,7 @@ def test_regression_against_model_probe(datadir: Path, override_model_loading):
176177
config_type = type(legacy_config or new_config)
177178
configs_with_tests.add(config_type)
178179

179-
untested_configs = ModelConfigBase.all_config_classes() - configs_with_tests
180+
untested_configs = ModelConfigBase.all_config_classes() - configs_with_tests - {MinimalConfigExample}
180181
logger = InvokeAILogger.get_logger(__file__)
181182
logger.warning(f"Function test_regression_against_model_probe missing test case for: {untested_configs}")
182183

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:23afd7036e869f12021e6da9c17d60f22b6fcc35c5b0bdadbec28d57b115f732
3+
size 582621
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9c29b6c40da1d536478b36e6709cbf8d3ca735ed4369c8645101be27044b5f89
3+
size 151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7dba0051de0b413f8ea03651656955f4e1f7e6a120903f251504cdff240ca5a9
3+
size 13728
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8f13c37bac4c495785d6b5edcd604c013776690794d2dddff7579bbc70960801
3+
size 996
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4cd32fdf049a1a313f9db78d88235c4cbff5793130340ead3a62b77119153d1b
3+
size 62642
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:625d37b31afbf2f0792a87846b3654ee23f20568409e35b78a1f795b04e1a7a1
3+
size 560
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:cf40513caca1edceab783b1991d2590b83e1ff2ef02921bdd5571879ae7630bb
3+
size 94311
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:153b1da39e7cc780003d5b25eb8d07b9c84b08cc20fd05b95652e780a15c8011
3+
size 667
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:db6b4739b5e23285a9552ec7c59de7ce40f6a4a3562fc1eccbd843f6444e5102
3+
size 496
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:47ced7a4ab2ecec78818ac4e8e1578c66253c2b93861c67c0b6d6c33ce3ff829
3+
size 565
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2476eae80b7d5b58a476c0a93b564a446b6322179c9636b2c2fae6d769e1ffcc
3+
size 34766
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d9f7e7eb1e2d162908ecf7925234425c4f1c978152fd60e18e4af2c67ccebb19
3+
size 575
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:72456031e746f51eb965f19898d5358d7caa938e91e62f48d9b03c2ecc0ca343
3+
size 92603
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a
3+
size 524619
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2cdb3b8331a60c92fc1e55a13e9fd61fd2293c5a51275fdcccd62b780052530e
3+
size 588
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:6bdcee9ccce2a16ca2b4c0c5ed00b42c50ea225f4472a8c4c1e963a2902c2881
3+
size 705
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349
3+
size 1059962
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a
3+
size 524619
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:c934044566ac411c4739e9cec969e061e8dcdf2bd108196a66ce917376d4d68e
3+
size 462
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e70eb3e2b85a508e32bb81c32c13fc3f2b015548ca469b94627c2f32e445cba1
3+
size 856
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349
3+
size 1059962
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:73cd3f7bd618835b6d09eefd5155b84ccdeea07c32a4d201574af19bd405a5bc
3+
size 1778
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e0372e54765ee09d1fb939f9b9482c26641cc5d6efe2c40438bf0d0c0e2d5b80
3+
size 322421
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:bcbed358bb80da88bc8b61785b7d14c39b5be5745d813e4c6a56e9084d4dc9d2
3+
size 607
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ef01d5af1eb1b98361129cf532836a7c9afb87c98d9e80d87b460b35e69a1d24
3+
size 43964
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7b3ffef6d26ad273aad2fe8cddb9d225f4d5bc8962dcc9c9987925c46a1b2adc
3+
size 998
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4cd32fdf049a1a313f9db78d88235c4cbff5793130340ead3a62b77119153d1b
3+
size 62642
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:23afd7036e869f12021e6da9c17d60f22b6fcc35c5b0bdadbec28d57b115f732
3+
size 582621
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:b030da33a1dd5a966034accc5b3dea78e73f0a827c47aee14d3ccc70589d4cfe
3+
size 143027
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:eff7d79f38df62238b62951a87eeb942ffbc06d4f25c58cd838dab3ad9174758
3+
size 994
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4cd32fdf049a1a313f9db78d88235c4cbff5793130340ead3a62b77119153d1b
3+
size 62642
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:819af2ddbce04a86d59149520b198fdc4ae9b003847bd3040272712e4193b49d
3+
size 6012
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2c7109130a71f2300897099785025b26c61e2e407c36b3e3d64ab2a94f4f86d4
3+
size 358800
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8a09b467700c58138c29d53c605b34ebc69beaadd13274a8a2af8ad2c2f4032a
3+
size 4519
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:febea843210ab18bbc45d9a650b934a979b1ca69eed1b997f3ae2791856e7d61
3+
size 106285
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:6f638fb9401a6d6296feff533ee7efe657b787c49f954f82f5906b36ef2a1b1f
3+
size 520
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:fcee0918cf5816238f4fd35ce1bdc329616b6213ada6dbf5a22953c71390aa35
3+
size 642
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:55ce0f16fe75a93e1da5873db2e9acee88a6e2982891cf118490a684cdfae408
3+
size 796
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:725c528a8f6f91d3e11a543718f1066b6d1682a147483c1a4a4aecf67fd9c824
3+
size 614
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:52e29b35e93261515dc07bf248ec8398a729e54f1886e946f8c095ede26be29b
3+
size 724
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a
3+
size 524619
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:c4864a9376a8401918425bed71fc14fc0e81f9b59ec45c1cf96cccb2df508eac
3+
size 472
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:19d7b034cb0cc3ce9766c2231373ab8aa8991fc72e2c8f76558bfaae3de0d563
3+
size 737
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349
3+
size 1059962
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8125830747f921e26e263e394b8954482cf3b4b4f1beb154704ee3cc57042be8
3+
size 1868
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ac5ee038bf165a245be9259ff14753de0d77d0fe2ee3ac39364c589d44410f48
3+
size 756
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ef01d5af1eb1b98361129cf532836a7c9afb87c98d9e80d87b460b35e69a1d24
3+
size 43964
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:79f2a9a8f741c44774171ccab24f6c9f1ff82e3f079d321e204a6b533d5fa8fa
3+
size 159964
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:adc04928d8fd19a61822584fe0cf2e813e5ebac17f3e49fb1ea096860ae6457b
3+
size 576
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:955047a1fe86c627478f05232f7a72de9a4a68ae16c5d80e983902af39af8ed3
3+
size 159651
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:f59da2f87c3cd079bd4f8f3037e81b277c60c498e279a8020331f67a5a3157e8
3+
size 368
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2b6a1ff67a27e0df9ac0c7d93250fc0d87431c7b366b3d5669217104f9088a26
3+
size 409
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:1e5036bed065526c3c212dfbe288752391797c4bb1a284aa18c9a0b23fcaf8ec
3+
size 798330
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:c6e405cb7c670d56636a9402c81023a55bc6c3c53d89cf02b92f5c5005bfe920
3+
size 2399357
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d6423dae508cc3a129d22ea443841c111832a1a73125b8f25ea8736951698bcb
3+
size 711
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d79d5c8c6ce85112a923d621a5412886ddbbb0636210fc0f72f450582e675542
3+
size 613
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:bd88dcbcb4eb0c505f2c53307e10ab19305a2f9ede25de822f156369a4db8229
3+
size 34962
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:79f2a9a8f741c44774171ccab24f6c9f1ff82e3f079d321e204a6b533d5fa8fa
3+
size 159964

0 commit comments

Comments
 (0)