Commit Graph

4913 Commits

Author SHA1 Message Date
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
Aryan
23e6b32139 Fix truthy-ness condition in pipelines that use denoising_start (#6912)
* fix denoising start

* fix tests

* remove debug
2024-12-23 13:02:08 +05:30
M. Tolga Cangöz
302b3c6b79 [Refactor] StableDiffusionReferencePipeline inheriting from DiffusionPipeline (#7071)
Refactor StableDiffusionReferencePipeline to inherit from DiffusionPipeline rather than StableDiffusionPipeline
2024-12-23 13:02:08 +05:30
caiyueliang
bc9b342fa4 fix: TensorRTStableDiffusionPipeline cannot set guidance_scale (#7065) 2024-12-23 13:02:08 +05:30
bimsarapathiraja
85e57454a0 Change images to image. The variable images is not used anywhere (#7074) 2024-12-23 13:02:08 +05:30
Chong-U Lim
eba9562560 Fix docstring of community pipeline imagic (#7062) 2024-12-23 13:02:08 +05:30
M. Tolga Cangöz
d38521afa2 Fix typos (#7068) 2024-12-23 13:02:08 +05:30
M. Tolga Cangöz
1f3ff03c01 [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-12-23 13:02:08 +05:30
Aryan
6a64a211dc IPAdapterTesterMixin (#6862)
* begin IPAdapterTesterMixin



---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:08 +05:30
YiYi Xu
1bb51cba84 re-add unet refactor PR (#7044)
* add

* remove copied from

---------

Co-authored-by: ultranity <1095429904@qq.com>
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
Hezi Zisman
69389ca806 allow explicit tokenizer & text_encoder in unload_textual_inversion (#6977)
* allow passing tokenizer & text_encoder to unload_textual_inversion


---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: Fabio Rigano <fabio2rigano@gmail.com>
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
2024-12-23 13:02:08 +05:30
Lincoln Stein
2f7c83fefb Update checkpoint_merger pipeline to pass the "variant" argument (#6670)
* make checkpoint_merger pipeline pass the "variant" argument to from_pretrained()

* make style

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:08 +05:30
M. Tolga Cangöz
38c8227fde Fix typos in text_to_image examples (#7050)
Update copyright information and fix typos in text_to_image examples
2024-12-23 13:02:08 +05:30
YiYi Xu
cae3e45cbb fix doc example for fom_single_file (#7015)
* fix doc

* remove use_safetensors from signature

* more

---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
pravdomil
7342038b31 update header (#6596)
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:08 +05:30
Dhruv Nair
61ba3f9a45 Remove disable_full_determinism from StableVideoDiffusion xformers test. (#7039)
* update

* update
2024-12-23 13:02:08 +05:30
Dhruv Nair
9ce54dbb1e Fix load_model_dict_into_meta for ControlNet from_single_file (#7034)
update
2024-12-23 13:02:08 +05:30
Dhruv Nair
dee747c28f Update ControlNet Inpaint single file test (#7022)
update
2024-12-23 13:02:08 +05:30
Dhruv Nair
7ec59bb36a Fix alt text and image links in AnimateLCM docs (#7029)
update
2024-12-23 13:02:08 +05:30
Nontapat Kaewamporn
5923f0a853 Supper IP Adapter weight loading in StableDiffusionXLControlNetInpaintPipeline (#7031)
* support ip adapter loading

* fix style
2024-12-23 13:02:08 +05:30
Vinh H. Pham
3458c15edf IP-Adapter support for StableDiffusionXLControlNetInpaintPipeline (#6941)
* add ip-adapter support

* support ip image embeds

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Dhruv Nair
e1577ca648 Add section on AnimateLCM to docs (#7024)
* update

* update

* update
2024-12-23 13:02:08 +05:30
ustcuna
7df14bf40f [Community Pipelines]Accelerate inference of stable diffusion xl (SDXL) by IPEX on CPU (#6683)
* add stable_diffusion_xl_ipex community pipeline

* make style for code quality check

* update docs as suggested

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2024-12-23 13:02:08 +05:30
Dhruv Nair
5b6c05122e [Refactor] FreeInit for AnimateDiff based pipelines (#6874)
* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
2024-12-23 13:02:08 +05:30
YiYi Xu
20e36f1d86 [from_single_file] pass torch_dtype to set_module_tensor_to_device (#6994)
fix

Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
Dhruv Nair
9b9448e55f Fix Pixart Slow Tests (#6962)
* update

* update
2024-12-23 13:02:08 +05:30
Fabio Rigano
98326b5f04 IP-Adapter attention masking (#6847)
* Add attention masking to attn processors

* Update tensor conversion

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:08 +05:30
Sayak Paul
d24eaf6046 [IP2P] Make text encoder truly optional in InstructPi2Pix (#6995)
* make text encoder component truly optional.

* more fixes

* Apply suggestions from code review

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

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:08 +05:30
nbpppp
886457a6c3 Fix deprecation warning for torch.utils._pytree._register_pytree_node in PyTorch 2.2 (#7008)
Fixed deprecation warning for torch.utils._pytree._register_pytree_node in PyTorch 2.2

Co-authored-by: Yinghua <yzho0423@uni.sydney.edu.au>
2024-12-23 13:02:08 +05:30
YiYi Xu
160f17966a [SVD] fix a bug when passing image as tensor (#6999)
* fix

* update docstring

---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:08 +05:30
Mikhail Koltakov
f90e8ea064 Fixed typos in dosctrings of __init__() and in forward() of Unet3DConditionModel (#6663)
* Fixed typos in __init__ and in forward of Unet3DConditionModel

* Resolving conflicts

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:07 +05:30