Commit graph

167 commits

Author SHA1 Message Date
Cédric Deltheil 5ab5d7fd1c import ControlLoraAdapter part of latent_diffusion 2024-02-19 14:11:32 +01:00
Laurent da3c3602fb write StyleAligned e2e test 2024-02-15 15:22:47 +01:00
Laurent 60c0780fe7 write StyleAligned inject/eject tests 2024-02-15 15:22:47 +01:00
limiteinductive 432e32f94f rename Scheduler -> LRScheduler 2024-02-15 11:48:36 +01:00
Laurent 00270604ef fix conversion_script bug + rename control_lora e2e test 2024-02-14 18:20:46 +01:00
Laurent 7fe392298a write ControlLora e2e tests 2024-02-14 18:20:46 +01:00
limiteinductive bec845553f update deprecated validator for field_validator 2024-02-13 18:35:51 +01:00
limiteinductive ab506b4db2 fix bug that was causing double registration 2024-02-13 11:12:13 +01:00
limiteinductive 3488273f50 Enforce correct subtype for the config param in both decorators
Also add a custom ModelConfig for the MockTrainer test

Update src/refiners/training_utils/config.py

Co-authored-by: Cédric Deltheil <355031+deltheil@users.noreply.github.com>
2024-02-12 16:21:04 +01:00
limiteinductive cef8a9936c refactor register_model decorator 2024-02-12 16:21:04 +01:00
limiteinductive d6546c9026 add @register_model and @register_callback decorators
Refactor ClockTrainer to include Callback
2024-02-12 10:24:19 +01:00
limiteinductive f541badcb3 Allow optional train ModelConfig + forbid extra input for configs 2024-02-10 16:13:10 +01:00
Pierre Colle 25bfa78907 lr, betas, eps, weight_decay at model level
Co-authored-by: Cédric Deltheil <355031+deltheil@users.noreply.github.com>
2024-02-09 12:05:13 +01:00
Cédric Deltheil 9aefc9896c test_trainer: use model_copy instead of copy
The `copy` method has been deprecated.
2024-02-08 20:07:34 +01:00
Colle f4aa0271b8
less than 1 epoch training duration 2024-02-08 19:20:31 +01:00
limiteinductive 41508e0865 change param name of abstract get_item method 2024-02-08 18:52:52 +01:00
Laurent 6d599d53fd beautify EXPECTED_TREE in test_chain.py 2024-02-08 15:09:47 +01:00
limiteinductive 2e526d35d1 Make Dataset part of the trainer 2024-02-07 16:13:01 +01:00
limiteinductive 2ef4982e04 remove wandb from base config 2024-02-07 11:06:59 +01:00
Pierre Chapuis 11da76f7df fix sdxl structural copy 2024-02-07 10:51:26 +01:00
Pierre Chapuis ca9e89b22a cosmetics 2024-02-07 10:51:26 +01:00
limiteinductive ea05f3d327 make device and dtype work in Trainer class 2024-02-06 23:10:10 +01:00
Pierre Chapuis 37425fb609 make LoRA generic 2024-02-06 11:32:18 +01:00
Pierre Chapuis 471ef91d1c make __getattr__ on Module return object, not Any
PyTorch chose to make it Any because they expect its users' code
to be "highly dynamic": https://github.com/pytorch/pytorch/pull/104321

It is not the case for us, in Refiners having untyped code
goes contrary to one of our core principles.

Note that there is currently an open PR in PyTorch to
return `Module | Tensor`, but in practice this is not always
correct either: https://github.com/pytorch/pytorch/pull/115074

I also moved Residuals-related code from SD1 to latent_diffusion
because SDXL should not depend on SD1.
2024-02-06 11:32:18 +01:00
Pierre Chapuis 3de1508b65 increase tolerance on Euler test 2024-02-04 08:58:22 +01:00
Pierre Chapuis 83b478c0ff fix test failure caused by Diffusers 0.26.0 2024-02-04 08:58:22 +01:00
Colle 4a6146bb6c clip text, lda encode batch inputs
* text_encoder([str1, str2])
* lda decode_latents/encode_image image_to_latent/latent_to_image
* images_to_tensor, tensor_to_images
---------
Co-authored-by: Cédric Deltheil <355031+deltheil@users.noreply.github.com>
2024-02-01 17:05:28 +01:00
Pierre Chapuis 8a2b955bd0 add a test for SDXL + EulerScheduler (deterministic) 2024-02-01 16:17:07 +01:00
Pierre Chapuis 5ac5373310 add a test for SDXL with sliced attention 2024-02-01 16:17:07 +01:00
Pierre Chapuis 3ddd258d36 add a test for noise schedules 2024-02-01 16:17:07 +01:00
Pierre Chapuis df843f5226 test SAG setter 2024-02-01 16:17:07 +01:00
Pierre Chapuis f4ed7254fa test IP adapter scale setter 2024-02-01 16:17:07 +01:00
Pierre Chapuis 8341d3a74b use float16, save memory 2024-02-01 16:17:07 +01:00
Pierre Chapuis d185711bc5 add tests based on repr for inject / eject 2024-02-01 16:17:07 +01:00
Pierre Chapuis 0e77ef1720 add inject / eject test for concept extender (+ better errors) 2024-02-01 16:17:07 +01:00
Pierre Chapuis 93270ec2d7 add inject / eject test for t2i adapter 2024-02-01 16:17:07 +01:00
Pierre Chapuis f43a530254 add extra tests for Chain 2024-02-01 16:17:07 +01:00
Pierre Chapuis bca50b71f2 test (and fix) basic_attributes 2024-02-01 16:17:07 +01:00
Pierre Chapuis bba478abf2 create test_module 2024-02-01 16:17:07 +01:00
limiteinductive abe50076a4 add NoiseSchedule to solvers __init__ + simplify some import pathing
further improve import pathing
2024-01-31 17:03:52 +01:00
limiteinductive 73f6ccfc98 make Scheduler a fl.Module + Change name Scheduler -> Solver 2024-01-31 17:03:52 +01:00
Pierre Chapuis 7eb8eb4c68 add support for pytorch 2.2 (2.1 is still supported)
also bump all dev dependencies to their latest version
2024-01-31 15:03:06 +01:00
Cédric Deltheil 5634e68fde add end-to-end test for multi-ip adapter 2024-01-31 11:03:49 +01:00
Cédric Deltheil feff4c78ae segment-anything: fix class name typo
Note: weights are impacted
2024-01-30 09:52:40 +01:00
Pierre Chapuis 19bc081658 call GC between each e2e test to avoid OOM 2024-01-29 17:57:40 +01:00
Pierre Chapuis ce0339b4cc add a get_path helper to modules 2024-01-26 19:31:13 +01:00
limiteinductive 0ee2d5e075 Fix warmup steps calculation when gradient_accumulation is used 2024-01-25 12:20:36 +01:00
Bryce 12a5439fc4 refactor: rename noise => predicted_noise
and in euler, `alt_noise` can now be simply `noise`
2024-01-24 18:15:10 +01:00
limiteinductive 3b458f0d8d fix test_names LoraManager test 2024-01-23 14:12:03 +01:00
limiteinductive 421da6a3b6 Load Multiple LoRAs with SDLoraManager 2024-01-23 14:12:03 +01:00