Commit Graph

3793 Commits

Author SHA1 Message Date
Linoy Tsaban 5b2ab4c269 [advanced dreambooth lora sdxl] add DoRA training feature (#7072)
* add is_dora arg

* style

* add dora training feature to sd 1.5 script

* added notes about DoRA training

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul 48a9e62978 Update requirements.txt to remove huggingface-cli (#7202)
Internal message: https://huggingface.slack.com/archives/C03Q18WK18T/p1709529892062479
2024-12-23 13:02:08 +05:30
Vinh H. Pham d6bf73aaf5 adding callback_on_step_end for StableDiffusionLDM3DPipeline (#7149)
* refactor callback

* run make style

* add copy

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul ba756dd5ea [Docs] more elaborate example for peft torch.compile (#7161)
more elaborate example for peft torch.compile
2024-12-23 13:02:08 +05:30
Sayak Paul 0e6ce9dad9 feat: add ip adapter benchmark (#6936)
* feat: add ip adapter benchmark

* sdxl support too.

* Empty-Commit
2024-12-23 13:02:08 +05:30
Álvaro Somoza ec8dabf5c9 [ip-adapter] fix problem using embeds with the plus version of ip adapters (#7189)
* initial

* check_inputs fix to the rest of pipelines

* add fix for no cfg too

* use of variable

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Junsong Chen ac66c913c7 Fix PixArt 256px inference (#6789)
* feat 256px diffusers inference bug

* change the max_length of T5 to pipeline config file

* fix bug in convert_pixart_alpha_to_diffusers.py

* Update scripts/convert_pixart_alpha_to_diffusers.py

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* remove multi_scale_train parser

* Update src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py

Co-authored-by: YiYi Xu <yixu310@gmail.com>

* Update src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py

Co-authored-by: YiYi Xu <yixu310@gmail.com>

* styling

* change `model_token_max_length` to call argument.

* Refactoring

* add: max_sequence_length to the docstring.

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul 0c693ca240 Support EDM-style training in DreamBooth LoRA SDXL script (#7126)
* add: dreambooth lora script for Playground v2.5

* fix: kwarg

* address suraj's comments.

* Apply suggestions from code review

Co-authored-by: Suraj Patil <surajp815@gmail.com>

* apply suraj's suggestion

* incorporate changes in the canonical script./

* tracker naming

* fix: schedule determination

* add: two simple tests

* remove playground script

* note about edm-style training

* address pedro's comments.

* address part of Suraj's comments.

* Apply suggestions from code review

Co-authored-by: Suraj Patil <surajp815@gmail.com>

* remove guidance_scale.

* use mse_loss.

* add comments for preconditioning.

* quality

* Update examples/dreambooth/train_dreambooth_lora_sdxl.py

Co-authored-by: Suraj Patil <surajp815@gmail.com>

* tackle v-pred.

* Empty-Commit

* support edm for sdxl too.

* address suraj's comments.

* Empty-Commit

---------

Co-authored-by: Suraj Patil <surajp815@gmail.com>
2024-12-23 13:02:08 +05:30
YiYi Xu 1943ad4079 [stalebot] fix a bug (#7156)
fix

Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
Oleh 58294f94a9 Map speedup (#6745)
* Speed up dataset mapping

* Fix missing columns

* Remove cache files cleanup

* Update examples/text_to_image/train_text_to_image_sdxl.py

* make style

* Fix code style

* style

* Empty-Commit

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
Co-authored-by: Quentin Lhoest <lhoest.q@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul 64694545de fix: loading problem for sdxl lora dreambooth (#7166) 2024-12-23 13:02:08 +05:30
Quentin Lhoest 5575578b38 Fix vae_encodings_fn hash in train_text_to_image_sdxl.py (#7171)
Update train_text_to_image_sdxl.py
2024-12-23 13:02:08 +05:30
Dhruv Nair f1916222ef [CI] Remove max parallel flag on slow test runners (#7162)
update
2024-12-23 13:02:08 +05:30
Sayak Paul 1022f5a0bd Fix LCM benchmark test (#7158)
* make workflow dispatchable.

* fix: lcm lora compile
2024-12-23 13:02:08 +05:30
Sayak Paul 0222544269 [Urgent][Docker CI] pin uv version for now and a minor change in the Slack notification (#7155)
pin uv version for now.
2024-12-23 13:02:08 +05:30
Sayak Paul 63b79643ba [CI] fix path filtering in the documentation workflows (#7153)
fix: path
2024-12-23 13:02:08 +05:30
YiYi Xu f38417fe30 [ip-adapter] refactor prepare_ip_adapter_image_embeds and skip load image_encoder (#7016)
* add

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
M. Tolga Cangöz a3c115949d [Docs] Fix typos (#7131)
* Add copyright notice to relevant files and fix typos

* Set `timestep_spacing` parameter of `StableDiffusionXLPipeline`'s scheduler to `'trailing'`.

* Update `StableDiffusionXLPipeline.from_single_file` by including EulerAncestralDiscreteScheduler with `timestep_spacing="trailing"` param.

* Update model loading method in SDXL Turbo documentation
2024-12-23 13:02:08 +05:30
Dhruv Nair 91f6646f6a Fix setting fp16 dtype in AnimateDiff convert script. (#7127)
* update

* update
2024-12-23 13:02:08 +05:30
Sayak Paul 1e7fcd4e17 add: support for notifying the maintainers about the docker ci status. (#7113) 2024-12-23 13:02:08 +05:30
Sayak Paul 1de9fcb023 limit documentation workflow runs for relevant changes. (#7125) 2024-12-23 13:02:08 +05:30
Sayak Paul 7d1d1afab6 use uv for installing stuff in the workflows. (#7116)
* use uv for installing stuff in the workflows.

* fix: from source installation command when using uv.

* fix uv venv issue

* edit editable installation.

* fix quality installation

* checking

* make editable.

* more check

* check

* add: export step

* venv handling.

* checking.

* fix: dependency workflows.

* peft tests.

* proper way to initialize env.

* Empty-Commit

* Empty-Commit
2024-12-23 13:02:08 +05:30
Aryan f95a5ceb91 [docs] unet type hints (#7134)
update
2024-12-23 13:02:08 +05:30
elucida 14bb45e4e8 refactor: move model helper function in pipeline to a mixin class (#6571)
* move model helper function in pipeline to EfficiencyMixin

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
YiYi Xu ad6a21585a [stalebot] don't close the issue if the stale label is removed (#7106)
* fix

* fix

* remove stalebot's ability to close issues

---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
Dhruv Nair cda7b5a298 [Diffusers CI] Switch slow test runners (#7123)
update
2024-12-23 13:02:08 +05:30
Sayak Paul 8139fa70c4 fix kwarg in the SDXL LoRA DreamBooth (#7124)
* fix kwarg

* Empty-Commit
2024-12-23 13:02:08 +05:30
Sayak Paul 1558485d5f [Tests] make test steps dependent on certain things and general cleanup of the workflows (#7026)
make tests conditional and other things.
2024-12-23 13:02:08 +05:30
Beinsezii 1a368d8dc1 DPMSolverMultistep add rescale_betas_zero_snr (#7097)
* DPMMultistep rescale_betas_zero_snr

* DPM upcast samples in step()

* DPM rescale_betas_zero_snr UT

* DPMSolverMulti move sample upcast after model convert

Avoids having to re-use the dtype.

* Add a newline for Ruff
2024-12-23 13:02:08 +05:30
M. Tolga Cangöz 59ed616c16 [Docs] Fix typos (#7118)
Fix typos, formatting and remove trailing whitespace
2024-12-23 13:02:08 +05:30
Suraj Patil 238e3df52e add DPM scheduler with EDM formulation (#7120)
* add DPM scheduler with EDM formulation

* set sigmas in init

* add _compute_sigmas

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* address some review comments

* up,

* add tests

---------

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2024-12-23 13:02:08 +05:30
Suraj Patil e4111fdaee Add EDMEulerScheduler (#7109)
* Add EDMEulerScheduler

* address review comments

* fix import

* fix test

* add tests

* add co-author

Co-authored-by:  @dg845 dgu8957@gmail.com
2024-12-23 13:02:08 +05:30
Sayak Paul 9618d3363b [Dockerfile] remove uv from docker jax tpu (#7115)
remove uv from docker jax tpu
2024-12-23 13:02:08 +05:30
Suraj Patil da2dedc83f denormalize latents with the mean and std if available (#7111)
* denormalize latents with the mean and std if available

* fix denormalize

* add latent mean and std in vae config

* address sayak's comment
2024-12-23 13:02:08 +05:30
Dhruv Nair dd5bea144d Add tests to check configs when using single file loading (#7099)
* update

* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul 6d8ffa9ad5 move to uv in the Dockerfiles. (#7094)
move to uv in the Dockerfiles.
2024-12-23 13:02:08 +05:30
Sayak Paul 7ccbcb71d4 [Examples] Multiple enhancements to the ControlNet training scripts (#7096)
* log_validation unification for controlnet.

* additional fixes.

* remove print.

* better reuse and loading

* make final inference run conditional.

* Update examples/controlnet/README_sdxl.md

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* resize the control image in the snippet.

---------

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2024-12-23 13:02:08 +05:30
Sayak Paul ac109e895a [Core] pass revision in the loading_kwargs. (#7019)
* pass revision in the loading_kwarhs.

* remove revision from load_sub_model.
2024-12-23 13:02:08 +05:30
Younes Belkada 7e2ce58687 FIX [PEFT / Core] Copy the state dict when passing it to load_lora_weights (#7058)
* copy the state dict in load lora weights

* fixup
2024-12-23 13:02:08 +05:30
Sayak Paul 58f85d3a14 [Easy] edit issue and PR templates (#7092)
edit templates to remove patrick's name.
2024-12-23 13:02:08 +05:30
jinghuan-Chen 037f3234c5 Make LoRACompatibleConv padding_mode work. (#6031)
* Make LoRACompatibleConv padding_mode work.

* Format code style.

* add fast test

* Update src/diffusers/models/lora.py

Simplify the code by patrickvonplaten.

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* code refactor

* apply patrickvonplaten suggestion to simplify the code.

* rm test_lora_layers_old_backend.py and add test case in test_lora_layers_peft.py

* update test case.

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:08 +05:30
M. Tolga Cangöz 9b15d87fb5 Fix EMA in train_text_to_image_sdxl.py (#7048)
* Fix typos
2024-12-23 13:02:08 +05:30
Dhruv Nair 0ab7713d0a Small change to download in dance diffusion convert script (#7070)
* update

* make style
2024-12-23 13:02:08 +05:30
jiqing-feng 862caee47a Resize image before crop (#7095)
resize first

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Stephen f804aecbcc Pass use_linear_projection parameter to mid block in UNetMotionModel (#7035)
* pass linear projection parameter to mid block

* add cond_proj_dim to motion UNet

* run style and quality checks
2024-12-23 13:02:08 +05:30
Aryan be2e28383a [Community] Bug fix + Latest IP-Adapter impl. for AnimateDiff img2vid/controlnet (#7086)
* fix img2vid; update to latest ip-adapter impl

* update README

* update animatediff controlnet to latest impl
2024-12-23 13:02:08 +05:30
Vinh H. Pham 1e6a865d37 Modularize Dreambooth LoRA SDXL inferencing during and after training (#6655)
* modularize log validation

* run make style

* revert import wandb

* fix code quality & import wandb

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Vinh H. Pham 4ff83c7f4f Modularize Dreambooth LoRA SD inferencing during and after training (#6654)
* modulize log validation

* run make style and refactor wanddb support

* remove redundant initialization

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Steven Liu d6e432c38a [docs] Minor updates (#7063)
* updates

* feedback
2024-12-23 13:02:08 +05:30
Fabio Rigano 00f2d5ca47 Fix head_to_batch_dim for IPAdapterAttnProcessor (#7077)
* Fix IPAdapterAttnProcessor

* Fix batch_to_head_dim and revert reshape
2024-12-23 13:02:08 +05:30