M. Tolga Cangöz
ad310af0d6
Fix EMA in train_text_to_image_sdxl.py ( #7048 )
...
* Fix typos
2024-02-26 10:39:57 -10:00
M. Tolga Cangöz
53605ed00a
[Refactor] save_model_card function in text_to_image examples ( #7051 )
...
* Refactor save_model_card function to handle images and repo_folder parameters
* Discard changes to examples/text_to_image/train_text_to_image.py
* Discard changes to examples/text_to_image/train_text_to_image_lora_sdxl.py
* Update train_text_to_image_lora.py
* Update train_text_to_image_sdxl.py
2024-02-23 20:57:37 +05:30
M. Tolga Cangöz
5a54dc9e95
Fix typos in text_to_image examples ( #7050 )
...
Update copyright information and fix typos in text_to_image examples
2024-02-21 16:40:45 -08:00
Piyush Thakur
4b89aeffe1
[Type annotations] fixed in save_model_card ( #6948 )
...
fixed type annotations
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-02-13 08:56:45 +05:30
Piyush Thakur
e1bdcc7af3
[Model Card] standardize T2I Sdxl Lora model card ( #6944 )
...
* standardize model card template t2i-lora-sdxl
* type annotations
2024-02-12 11:45:40 +05:30
Piyush Thakur
6f336650c3
[Model Card] standardize T2I Sdxl model card ( #6942 )
...
standardize model card template t2i-sdxl
2024-02-12 10:01:20 +05:30
Piyush Thakur
06a042cd0e
[Model Card] standardize T2I Lora model card ( #6940 )
...
standardize model card t2i-lora
2024-02-12 10:01:13 +05:30
Piyush Thakur
8772496586
[Model Card] standardize T2I model card ( #6939 )
...
* standardize model card
* fix base_model
2024-02-12 10:00:41 +05:30
Sayak Paul
7c8cab313e
post release 0.26.2 ( #6885 )
...
* post release
* style
* Empty-Commit
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2024-02-09 07:36:38 -10:00
Sayak Paul
159885adc6
correct hub_token exposition behaviour (thanks to @bghira). ( #6918 )
2024-02-08 18:38:27 -10:00
Sayak Paul
30e5e81d58
change to 2024 in the license ( #6902 )
...
change to 2024
2024-02-08 08:19:31 -10:00
Sajad Norouzi
058b47553e
Fix mixed precision fine-tuning for text-to-image-lora-sdxl example. ( #6751 )
...
* Fix mixed precision fine-tuning for text-to-image-lora-sdxl example.
* fix text_encoder_two bug.
---------
Co-authored-by: Sajad Norouzi <sajadn@dev-dsk-sajadn-2a-87239470.us-west-2.amazon.com >
2024-01-30 06:55:02 +05:30
Yingtian Liu
c101066227
Correct SNR weighted loss in v-prediction case by only adding 1 to SNR on the denominator ( #6307 )
...
* fix minsnr implementation for v-prediction case
* format code
* always compute snr when snr_gamma is specified
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-01-27 09:18:09 +05:30
HelloWorldBeginner
f95615b823
Fixed the bug related to saving DeepSpeed models. ( #6628 )
...
* Fixed the bug related to saving DeepSpeed models.
* Add information about training SD models using DeepSpeed to the README.
* Apply suggestions from code review
---------
Co-authored-by: mhh001 <mahonghao1@huawei.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-01-19 19:21:57 +05:30
Haofan Wang
3d574b3bbe
Fix a bug of flip in SDXL training script ( #6547 )
...
* Update train_text_to_image_sdxl.py
* Update train_text_to_image_lora_sdxl.py
2024-01-15 16:28:04 +02:00
Vinh H. Pham
08702fc1cb
Make text-to-image SDXL LoRA Training Script torch.compile compatible ( #6556 )
...
make compile compatible
2024-01-15 16:58:16 +05:30
Vinh H. Pham
7ce89e979c
Make text-to-image SD LoRA Training Script torch.compile compatible ( #6555 )
...
make compile compatible
2024-01-15 16:55:08 +05:30
gzguevara
05faf3263b
SDXL text-to-image torch compatible ( #6550 )
...
* torch compatible
* code quality fix
* ruff style
* ruff format
2024-01-15 16:49:11 +05:30
Sayak Paul
a080f0d3a2
[Training Utils] create a utility for casting the lora params during training. ( #6553 )
...
create a utility for casting the lora params during training.
2024-01-15 13:51:13 +05:30
gzguevara
33d2b5b087
SD text-to-image torch compile compatible ( #6519 )
...
* added unwrapper
* fiz typo
2024-01-12 09:28:35 +05:30
Sayak Paul
9d945b2b90
0.25.0 post release ( #6358 )
...
* post release
* style
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2024-01-05 16:13:27 +05:30
2510
8a366b835c
Fix gradient-checkpointing option is ignored in SDXL+LoRA training. ( #6388 ) ( #6402 )
...
* Fix gradient-checkpointing option is ignored in SDXL+LoRA training. (#6388 )
* Fix gradient-checkpointing option is ignored in SD+LoRA training.
* Fix gradient checkpoint is not applied to text encoders. (SDXL+LoRA)
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-01-01 08:51:04 +05:30
Sayak Paul
1ac07d8a8d
[Training examples] Follow up of #6306 ( #6346 )
...
* add to dreambooth lora.
* add: t2i lora.
* add: sdxl t2i lora.
* style
* lcm lora sdxl.
* unwrap
* fix: enable_adapters().
2023-12-28 07:37:50 +05:30
Sayak Paul
f4b0b26f7e
[Tests] Speed up example tests ( #6319 )
...
* remove validation args from textual onverson tests
* reduce number of train steps in textual inversion tests
* fix: directories.
* debig
* fix: directories.
* remove validation tests from textual onversion
* try reducing the time of test_text_to_image_checkpointing_use_ema
* fix: directories
* speed up test_text_to_image_checkpointing
* speed up test_text_to_image_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* fix
* speed up test_instruct_pix2pix_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* set checkpoints_total_limit to 2.
* test_text_to_image_lora_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints speed up
* speed up test_unconditional_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* debug
* fix: directories.
* speed up test_instruct_pix2pix_checkpointing_checkpoints_total_limit
* speed up: test_controlnet_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* speed up test_controlnet_sdxl
* speed up dreambooth tests
* speed up test_dreambooth_lora_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* speed up test_custom_diffusion_checkpointing_checkpoints_total_limit_removes_multiple_checkpoints
* speed up test_text_to_image_lora_sdxl_text_encoder_checkpointing_checkpoints_total_limit
* speed up # checkpoint-2 should have been deleted
* speed up examples/text_to_image/test_text_to_image.py::TextToImage::test_text_to_image_checkpointing_checkpoints_total_limit
* additional speed ups
* style
2023-12-25 19:50:48 +05:30
mwkldeveloper
2d43094ffc
fix RuntimeError: Input type (float) and bias type (c10::Half) should be the same in train_text_to_image_lora.py ( #6259 )
...
* fix RuntimeError: Input type (float) and bias type (c10::Half) should be the same
* format source code
* format code
* remove the autocast blocks within the pipeline
* add autocast blocks to pipeline caller in train_text_to_image_lora.py
2023-12-24 14:34:35 +05:30
Sayak Paul
90b9479903
[LoRA PEFT] fix LoRA loading so that correct alphas are parsed ( #6225 )
...
* initialize alpha too.
* add: test
* remove config parsing
* store rank
* debug
* remove faulty test
2023-12-24 09:59:41 +05:30
YShow
35a969d297
[Training] remove depcreated method from lora scripts again ( #6266 )
...
* remove depcreated method from lora scripts
* check code quality
2023-12-21 14:17:52 +05:30
lvzi
6ca9c4af05
fix: unscale fp16 gradient problem & potential error ( #6086 ) ( #6231 )
...
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-12-21 09:09:26 +05:30
Sayak Paul
288ceebea5
[T2I LoRA training] fix: unscale fp16 gradient problem ( #6119 )
...
* fix: unscale fp16 gradient problem
* fix for dreambooth lora sdxl
* make the type-casting conditional.
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-12-19 09:54:17 +05:30
Haofan Wang
7d0a47f387
Update train_text_to_image_lora.py ( #6144 )
...
* Update train_text_to_image_lora.py
* Fix typo?
---------
Co-authored-by: M. Tolga Cangöz <46008593+standardAI@users.noreply.github.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-12-18 19:33:05 +01:00
Sayak Paul
b98b314b7a
[Training] remove depcreated method from lora scripts. ( #6207 )
...
remove depcreated method from lora scripts.
2023-12-18 15:52:43 +05:30
Yudong Jin
49644babd3
Fix the test script in examples/text_to_image/README.md ( #6209 )
...
* Update examples/text_to_image/README.md
* Update examples/text_to_image/README.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-12-18 15:36:00 +05:30
M. Tolga Cangöz
0a401b95b7
[Docs] Fix typos ( #6122 )
...
Fix typos and trim trailing whitespaces
2023-12-11 10:55:28 -08:00
Younes Belkada
c2717317f0
[PEFT] Adapt example scripts to use PEFT ( #5388 )
...
* adapt example scripts to use PEFT
* Update examples/text_to_image/train_text_to_image_lora.py
* fix
* add for SDXL
* oops
* make sure to install peft
* fix
* fix
* fix dreambooth and lora
* more fixes
* add peft to requirements.txt
* fix
* final fix
* add peft version in requirements
* remove comment
* change variable names
* add few lines in readme
* add to reqs
* style
* fix issues
* fix lora dreambooth xl tests
* init_lora_weights to gaussian and add out proj where missing
* ammend requirements.
* ammend requirements.txt
* add correct peft versions
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-12-07 09:39:29 +05:30
Patrick von Platen
dadd55fb36
Post Release: v0.24.0 ( #5985 )
...
* Post Release: v0.24.0
* post pone deprecation
* post pone deprecation
* Add model_index.json
2023-12-01 18:43:44 +01:00
Sayak Paul
fdd003d8e2
[Tests] Refactor test_examples.py for better readability ( #5946 )
...
* control and custom diffusion
* dreambooth
* instructpix2pix and dreambooth ckpting
* t2i adapters.
* text to image ft
* textual inversion
* unconditional
* workflows
* import fix
* fix import
2023-11-29 18:43:59 +05:30
Patrick von Platen
6d2e19f746
[Examples] Allow downloading variant model files ( #5531 )
...
* add variant
* add variant
* Apply suggestions from code review
* reformat
* fix: textual_inversion.py
* fix: variant in model_info
---------
Co-authored-by: sayakpaul <spsayakpaul@gmail.com >
2023-11-27 10:43:20 +05:30
Patrick von Platen
13d73d9303
[Lora] Seperate logic ( #5809 )
...
* [Lora] Seperate logic
* [Lora] Seperate logic
* [Lora] Seperate logic
* add comments to explain the code better
* add comments to explain the code better
2023-11-21 18:58:37 +01:00
Sayak Paul
ded93f798c
[Refactor] refactor loaders.py to make it cleaner and leaner. ( #5771 )
...
* refactor loaders.py to make it cleaner and leaner.
* refactor loaders init
* inits.
* textual inversion to the init.
* inits.
* remove certain modules from the main init.
* AttnProcsLayers
* fix imports
* avoid circular import.
* fix circular import pt 2.
* address PR comments
* imports
* fix: imports.
* remove from main init for avoiding circular deps.
* remove spurious deps.
* fix-copies.
* fix imports.
* more debug
* more debug
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-14 12:54:28 +01:00
Younes Belkada
8789d0b6c7
fix styling issues on main ( #5754 )
...
fix styling issues
2023-11-13 20:05:15 +05:30
Sayak Paul
1477865e48
post release v0.23.0 ( #5730 )
...
* post release
* fix: variant test
* up
* fix: test
2023-11-10 16:35:44 +05:30
aihao
1f87f83e68
add load_datasete data_dir parameter ( #5747 )
2023-11-09 23:03:14 -10:00
Sayak Paul
64603389da
post release (v0.22.0) ( #5658 )
...
post release
2023-11-06 16:23:38 +01:00
Patrick von Platen
4f2bf67355
Revert "Fix the order of width and height of original size in SDXL training script" ( #5614 )
...
Revert "Fix the order of width and height of original size in SDXL training script (#5382 )"
This reverts commit 45db049973 .
2023-11-01 22:04:47 +01:00
jiaqiw09
e140c0562e
fix error reported 'find_unused_parameters' running in mutiple GPUs ( #5355 )
...
* fix error reported 'find_unused_parameters' running in mutiple GPUs or NPUs
* fix code check of importing module by its alphabetic order
---------
Co-authored-by: jiaqiw <wangjiaqi50@huawei.com >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-10-27 22:49:14 +05:30
Ran Ran
8959c5b9de
Add from_pt flag to enable model from PT ( #5501 )
...
* Add from_pt flag to enable model from PT
* Format the file
* Reformat the file
2023-10-25 23:07:34 +02:00
linjiapro
45db049973
Fix the order of width and height of original size in SDXL training script ( #5382 )
...
* wip
* wip
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-18 22:38:52 +02:00
Liang Hou
a68f5062fb
style(sdxl): remove identity assignments ( #5418 )
2023-10-18 22:38:20 +02:00
Sayak Paul
0fa32bd674
[Examples] use loralinear instead of depecrecated lora attn procs. ( #5331 )
...
* use loralinear instead of depecrecated lora attn procs.
* fix parameters()
* fix saving
* add back support for add kv proj.
* fix: param accumul,ation.
* propagate the changes.
2023-10-11 13:02:42 +02:00
ssusie
aea73834f6
Adding PyTorch XLA support for sdxl inference ( #5273 )
...
* Added mark_step for sdxl to run with pytorch xla. Also updated README with instructions for xla
* adding soft dependency on torch_xla
* fix some styling
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-10-11 12:35:37 +02:00