Ryan Dick
26832c1a0e
Add unit test to confirm that GGMLTensor sizes (bytes) are being calculated correctly.
2024-10-02 18:33:05 -04:00
Ryan Dick
3d4bd71098
Update test_probe_handles_state_dict_with_integer_keys() to make sure that it is still testing what it's intended to test. Previously, we were skipping an important part of the test by using a fake file path.
2024-10-02 18:33:05 -04:00
Ryan Dick
ec7e771942
Add a compute_dtype field to GGMLTensor.
2024-10-02 18:33:05 -04:00
Ryan Dick
fe84013392
Add unit tests for GGMLTensor.
2024-10-02 18:33:05 -04:00
Brandon Rising
446e2884bc
Remove no longer used code paths, general cleanup of new dequantization code, update probe
2024-10-02 18:33:05 -04:00
Brandon Rising
7d9f125232
Run ruff and update imports
2024-10-02 18:33:05 -04:00
Brandon Rising
0875e861f5
Various updates to gguf performance
2024-10-02 18:33:05 -04:00
Ryan Dick
f347b26999
Initial experimentation with Tensor-like extension for GGUF.
2024-10-02 18:33:05 -04:00
Brandon Rising
8cf19c4124
Run Ruff
2024-10-02 18:33:05 -04:00
Brandon Rising
f7112ae57b
Add unit tests for torch patcher
2024-10-02 18:33:05 -04:00
Ryan Dick
807f458f13
Move FLUX_LORA_TRANSFORMER_PREFIX and FLUX_LORA_CLIP_PREFIX to a shared location.
2024-10-01 10:22:11 -04:00
Ryan Dick
68dbe45315
Fix regression with FLUX diffusers LoRA models where lora keys were not given the expected prefix.
2024-10-01 10:22:11 -04:00
Ryan Dick
c256826015
Whoops, the 'lora_te1' prefix in FLUX kohya models refers to the CLIP text encoder - not the T5 as previously assumed. Update everything accordingly.
2024-09-30 07:59:14 -04:00
Ryan Dick
7d38a9b7fb
Add prefix to distinguish FLUX LoRA submodels.
2024-09-30 07:59:14 -04:00
Ryan Dick
d332d81866
Add ability to load FLUX kohya LoRA models that include patches for both the transformer and T5 models.
2024-09-30 07:59:14 -04:00
Ryan Dick
ba07e255f5
Add support for fractional denoise start and end with FLUX.
2024-09-26 19:54:28 -04:00
Ryan Dick
183a67cb1e
Merge branch 'main' into ryan/flux-trajectory-guidance
2024-09-20 22:29:34 +00:00
Ryan Dick
f5a2dc609a
Fix flaky FLUX LoRA unit test that fails occasionally due to numerical precision.
2024-09-20 16:01:15 +03:00
Ryan Dick
97de521c70
Add build_line(...) util function.
2024-09-20 01:01:37 +00:00
Ryan Dick
2934e31620
Fix bug when applying multiple LoRA models via apply_lora_sidecar_patches(), and add unit tests for the stacked LoRA case.
2024-09-16 14:48:39 +00:00
Ryan Dick
d51f2c5e00
Add bias to LoRA sidecar layer unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
b1cf5e989c
Replace 'torch.device("meta")' with 'accelerate.init_empty_weights()' in the hopes that the latter works properly on MacOS.
2024-09-15 04:39:56 +03:00
Ryan Dick
94668247dd
Delete duplicate file that was accidentally kept during rebase.
2024-09-15 04:39:56 +03:00
Ryan Dick
02f27c750a
Add unit tests for LoRAPatcher.apply_lora_sidecar_patches(...) and fixup dtype handling in the sidecar layers.
2024-09-15 04:39:56 +03:00
Ryan Dick
ba3ba3c23a
Add unit tests for LoRALinearSidecarLayer and ConcatenatedLoRALinearSidecarLayer.
2024-09-15 04:39:56 +03:00
Ryan Dick
7ce41bf7e0
Fixup unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
705173b575
Remove unused layer_key property from LoRALayerBase.
2024-09-15 04:39:56 +03:00
Ryan Dick
fef26a5f2f
Consolidate all LoRA patching logic in the LoRAPatcher.
2024-09-15 04:39:56 +03:00
Ryan Dick
aac97e105a
Genera cleanup/documentation.
2024-09-15 04:39:56 +03:00
Ryan Dick
552a5b06a4
Add a check that all keys are handled in the FLUX Diffusers LoRA loading code.
2024-09-15 04:39:56 +03:00
Ryan Dick
42d6dd3906
Add utility test function for creating a dummy state_dict.
2024-09-15 04:39:56 +03:00
Ryan Dick
31a8757e6b
Add is_state_dict_likely_in_flux_diffusers_format(...) function with unit test.
2024-09-15 04:39:56 +03:00
Ryan Dick
534e938a62
Add unit test for lora_model_from_flux_diffusers_state_dict(...).
2024-09-15 04:39:56 +03:00
Ryan Dick
bb917ae7e5
(minor) Rename test file.
2024-09-15 04:39:56 +03:00
Ryan Dick
cf9f30cc56
Rename flux_kohya_lora_conversion_utils.py
2024-09-15 04:39:56 +03:00
Ryan Dick
92b8477299
Fixup FLUX LoRA unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
00e56863c2
Add utility function for detecting whether a state_dict is in the FLUX kohya LoRA format.
2024-09-15 04:39:56 +03:00
Ryan Dick
7b5befad0d
Update convert_flux_kohya_state_dict_to_invoke_format() to raise an exception if an unexpected key is encountered, and add a corresponding unit test.
2024-09-15 04:39:56 +03:00
Ryan Dick
8518ae9ccb
Remove unused LoRAModelRaw.name attribute.
2024-09-15 04:39:56 +03:00
Ryan Dick
ade75b4748
Get convert_flux_kohya_state_dict_to_invoke_format(...) working, with unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
7a80d9ebe2
Add state_dict keys for two FLUX LoRA formats to be used in unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
2b3e4e123d
Split LoRA layer implementations into separate files.
2024-09-12 15:53:30 +00:00
Ryan Dick
2313f326df
Add denoise_end param to FluxDenoiseInvocation.
2024-09-02 09:38:17 -04:00
Ryan Dick
0b77511271
Update HF download logic to work for black-forest-labs/FLUX.1-schnell.
2024-08-26 20:17:50 -04:00
Mary Hipp
41c3e73a3c
fix tests
2024-08-09 16:31:42 -04:00
Mary Hipp
5f83bb0069
update config docstring
2024-08-08 15:20:43 -04:00
Mary Hipp
b138882abc
fix tests?
2024-08-08 15:18:32 -04:00
Lincoln Stein
633bbb4e85
[MM2] Use typed ModelRecordChanges for model_install() rather than untyped dict ( #6645 )
...
* [MM2] replace untyped config dict passed to install_model with typed ModelRecordChanges
- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
models.
* documentation fix
* [MM2] replace untyped config dict passed to install_model with typed ModelRecordChanges
- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
models.
* documentation fix
* remove v9 pnpm lockfile
* [MM2] replace untyped config dict passed to install_model with typed ModelRecordChanges
- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
models.
* [MM2] replace untyped config dict passed to install_model with typed ModelRecordChanges
- adjusted frontend to work with new schema
- used this facility to assign "starter model" names and descriptions to the installed
models.
* remove v9 pnpm lockfile
* regenerate schema.ts
* prettified
---------
Co-authored-by: Lincoln Stein <lstein@gmail.com >
2024-07-23 21:41:00 +00:00
Ryan Dick
83a86abce2
Add unit tests for ExtensionsManager and ExtensionBase.
2024-07-19 14:15:46 -04:00
Ryan Dick
69af099532
Warn on invalid model configs in the DB rather than crashing.
2024-07-11 21:05:55 -04:00