Commit Graph

3545 Commits

Author SHA1 Message Date
Charchit Sharma acbb060fed Make InstructPix2Pix Training Script torch.compile compatible (#6558)
* added torch.compile for pix2pix

* required changes
2024-12-23 13:02:05 +05:30
Vinh H. Pham 1fbf1f6d2e Make text-to-image SDXL LoRA Training Script torch.compile compatible (#6556)
make compile compatible
2024-12-23 13:02:05 +05:30
Vinh H. Pham 53c73a4f14 Make text-to-image SD LoRA Training Script torch.compile compatible (#6555)
make compile compatible
2024-12-23 13:02:05 +05:30
gzguevara 975a00e268 SDXL text-to-image torch compatible (#6550)
* torch compatible

* code quality fix

* ruff style

* ruff format
2024-12-23 13:02:05 +05:30
Sayak Paul 7dbaf28563 [Training Utils] create a utility for casting the lora params during training. (#6553)
create a utility for casting the lora params during training.
2024-12-23 13:02:05 +05:30
Sayak Paul deaa152c86 [Training] fix training resuming problem when using FP16 (SDXL LoRA DreamBooth) (#6514)
* fix: training resume from fp16.

* add: comment

* remove residue from another branch.

* remove more residues.

* thanks to Younes; no hacks.

* style.

* clean things a bit and modularize _set_state_dict_into_text_encoder

* add comment about the fix detailed.
2024-12-23 13:02:05 +05:30
Vinh H. Pham 35c89defcd Make Dreambooth SD Training Script torch.compile compatible (#6532)
* support compile

* make style

* move unwrap_model inside function

* change unwrap call

* run make style

* Update examples/dreambooth/train_dreambooth.py

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

* Revert "Update examples/dreambooth/train_dreambooth.py"

This reverts commit 70ab09732e.

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
gzguevara 5d2fad2c67 SD text-to-image torch compile compatible (#6519)
* added unwrapper

* fiz typo
2024-12-23 13:02:05 +05:30
Suvaditya Mukherjee 5d685849ce Make ControlNet SD Training Script torch.compile compatible (#6525)
* update: make controlnet script torch compile compatible

Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>

* update: correct earlier mistakes for compilation

Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>

* update: fix code style issues

Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>

---------

Signed-off-by: Suvaditya Mukherjee <suvadityamuk@gmail.com>
2024-12-23 13:02:05 +05:30
Charchit Sharma 097f789ec7 Make ControlNet SDXL Training Script torch.compile compatible (#6526)
* make torch.compile compatible

* fix quality
2024-12-23 13:02:05 +05:30
Vinh H. Pham 8ae8108458 Make Dreambooth SD LoRA Training Script torch.compile compatible (#6534)
support compile
2024-12-23 13:02:05 +05:30
Radamés Ajna bca9ff76fc [DPO Training] pass tracker name as argument (#6542)
pass tracker name as argumentw
2024-12-23 13:02:05 +05:30
Yassine El Boudouri fe2236ee67 Remove conversion to RGB (#6479)
* Remove conversion to RGB

* Add a Conversion Function

* Add type hint for convert_method

* Update src/diffusers/utils/loading_utils.py

Update docstring

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

* Update docstring

* Optimize imports

* Optimize imports (2)

* Reformat code

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
Sayak Paul 7dc2d15219 [SVD] support generators that are created on GPU (#6484)
* debug generator

* fix?

* fix?

* fix

* remove print.

* revert none check
2024-12-23 13:02:05 +05:30
Aryan V S 27780993ca [Community] StyleAligned Pipeline (#6489)
* add stylealigned sdxl pipeline

* bugfix

* update docs

* remove einops dependency

* update README

* update example docstring
2024-12-23 13:02:05 +05:30
Sayak Paul b68464751f [Training] make checkpointing compatible when using torch.compile (part II) (#6511)
make checkpointing compatible when using torch.compile.
2024-12-23 13:02:05 +05:30
jquintanilla4 16799edf09 .load_ip_adapter in StableDiffusionXLAdapterPipeline (#6246)
* Added testing notebook and .load_ip_adapter to XLAdapterPipeline

* Added annotations

* deleted testing notebook

* Update src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py

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

* code clean up

* Add feature_extractor and image_encoder to components

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:05 +05:30
dg845 5debde1e17 Fix bug in LCM Distillation Scripts when args.unet_time_cond_proj_dim is used (#6523)
* Fix bug where unet's time_cond_proj_dim is not set correctly if using args.unet_time_cond_proj_dim.

* make style
2024-12-23 13:02:05 +05:30
Steven Liu 05322fb98d [docs] mask_blur and padding_mask_crop (#6498)
new inpaint features
2024-12-23 13:02:05 +05:30
Steven Liu 1a0673574e [docs] Callbacks (#6471)
edits
2024-12-23 13:02:05 +05:30
antoine-scenario 2d0b3e6ce4 Add IP-Adapter to StableDiffusionXLControlNetImg2ImgPipeline (#6293)
* add IP-Adapter to StableDiffusionXLControlNetImg2ImgPipeline

Update src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py

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

fix tests

* fix failing test

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
YiYi Xu abcfcea5e2 [Refactor] splitingResnetBlock2D into multiple blocks (#6166)
---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
YiYi Xu b1b6a90be3 add StableDiffusionXLKDiffusionPipeline (#6447)
---------

Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2024-12-23 13:02:05 +05:30
Rahul Raman 5c8115c765 example: Train Instruct pix2 pix with lora implementation (#6469)
* base template file - train_instruct_pix2pix.py

* additional import and parser argument requried for lora

* finetune only instructpix2pix model -- no need to include these layers

* inject lora layers

* freeze unet model -- only lora layers are trained

* training modifications to train only lora parameters

* store only lora parameters

* move train script to research project

* run quality and style code checks

* move train script to a new folder

* add README

* update README

* update references in README

---------

Co-authored-by: Rahul Raman <rahulraman@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
Steven Liu db484b5494 [docs] Stable video diffusion (#6472)
svd
2024-12-23 13:02:05 +05:30
Steven Liu 699b33da95 [docs] PEFT adapter API (#6499)
follow up
2024-12-23 13:02:05 +05:30
Steven Liu 9d2caa3f74 [docs] Fast diffusion (#6470)
* edits

* fix

* feedback
2024-12-23 13:02:05 +05:30
Patrick von Platen 18bf58e664 Link issue template to discussions 2024-12-23 13:02:05 +05:30
Sayak Paul c66441c394 [Training] make DreamBooth SDXL LoRA training script compatible with torch.compile (#6483)
* make it torch.compile comaptible

* make the text encoder compatible too.

* style
2024-12-23 13:02:05 +05:30
Yifan Zhou c93a5103d8 [Community Pipeline] Rerender-A-Video: Zero-Shot Video-to-Video Translation (#6332)
* upload codes and doc

* lint

* lint

* lint

* update code

* remove blank lines

* Fix load url
2024-12-23 13:02:05 +05:30
Sayak Paul 687313acda [SVD] fix: vae type (#6475)
fix: vae type
2024-12-23 13:02:05 +05:30
jiqing-feng 04feef2ebb enable stable-xl textual inversion (#6421)
* enable stable-xl textual inversion

* check if optimizer_2 exists

* check text_encoder_2 before using

* add textual inversion for sdxl in a single file

* fix style

* fix example style

* reset for error changes

* add readme for sdxl

* fix style

* disable autocast as it will cause cast error when weight_dtype=bf16

* fix spelling error

* fix style and readme and 8bit optimizer

* add README_sdxl.md link

* add tracker key on log_validation

* run style

* rm the second center crop

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
Patrick von Platen e9b4e3561b [SAG] Support more schedulers, add better error message and make tests faster (#6465)
* finish

* finish

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
Yasuna c9d9f59ac1 [Docs] update: tutorials ja | INDEX.md, TUTORIAL_OVERVIEW.md, TOCTREE.yml (#6338)
* add tutorials to toctree.yml

* fix title

* fix words

* add overview ja

* fix diffusion to 拡散

* fix line 21

* add space

* delete supported pipline

* fix tutorial_overview.md

* fix space

* fix typo

* Delete docs/source/ja/tutorials/using_peft_for_inference.md

this file is not translated

* Delete docs/source/ja/tutorials/basic_training.md

this file is not translated

* Delete docs/source/ja/tutorials/autopipeline.md

this file is not translated

* fix toctree
2024-12-23 13:02:05 +05:30
Sayak Paul 4086479277 correct reviewers in PR template (#6485) 2024-12-23 13:02:05 +05:30
Sayak Paul a8129030a8 minor changes to the SVD doc (#6466)
minor changes
2024-12-23 13:02:05 +05:30
Sayak Paul f8fa3d5354 Rename REAMDE.md to README.md 2024-12-23 13:02:05 +05:30
Lucain dfc18f71de Fix offline mode import (#6467) 2024-12-23 13:02:05 +05:30
Sayak Paul 38c3bcd840 [Core] introduce PeftAdapterMixin module. (#6416)
* introduce integrations module.

* remove duplicate methods.

* better imports.

* move to loaders.py

* remove peftadaptermixin from modelmixin.

* add: peftadaptermixin selectively.

* add: entry to _toctree

* Empty-Commit
2024-12-23 13:02:05 +05:30
Dhruv Nair f6531eae36 Correctly handle creating model index json files when setting compiled modules in pipelines. (#6436)
update
2024-12-23 13:02:05 +05:30
Liang Hou 799d294f42 Fix amused paper link (#6462) 2024-12-23 13:02:05 +05:30
Vinh H. Pham 7d19c686cf [Community Pipeline] Add gluegen (#6433)
* init works

* add gluegen pipeline

* add gluegen code

* add another way to load language adapter

* make style

* Update README.md

* change doc
2024-12-23 13:02:05 +05:30
Sayak Paul fa55f00c53 [Experimental] Diffusion LoRA DPO training (#6422)
* add: experimental script for diffusion dpo training.

* random_crop cli.

* fix: caption tokenization.

* fix: pixel_values index.

* fix: grad?

* debug

* fix: reduction.

* fixes in the loss calculation.

* style

* fix: unwrap call.

* fix: validation inference.

* add: initial sdxl script

* debug

* make sure images in the tuple are of same res

* fix model_max_length

* report print

* boom

* fix: numerical issues.

* fix: resolution

* comment about resize.

* change the order of the training transformation.

* save call.

* debug

* remove print

* manually detaching necessary?

* use the same vae for validation.

* add: readme.
2024-12-23 13:02:05 +05:30
Sayak Paul b60c8c1e75 [feat] introduce unload_lora(). (#6451)
* introduce unload_lora.

* fix-copies
2024-12-23 13:02:05 +05:30
Sayak Paul fe32030325 0.25.0 post release (#6358)
* post release

* style

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2024-12-23 13:02:05 +05:30
Junsheng121 16163e3660 null-text-inversion-pipeline-implementation (#6329)
* null-text-inversion-implementation

* edited

* edited

* edited

* edited

* edited

* edit

* makestyle

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
Sayak Paul 8514408e82 [LoRA depcrecation] LoRA depcrecation trilogy (#6450)
* edebug

* debug

* more debug

* more more debug

* remove tests for LoRAAttnProcessors.

* rename
2024-12-23 13:02:05 +05:30
Linoy Tsaban 392a49d447 [bug fix] fixes #6444 - checkpointing save issue in advanced dreambooth lora sdxl script (#6464)
* unwrap text encoder when saving hook only for full text encoder tuning

* unwrap text encoder when saving hook only for full text encoder tuning

* save embeddings in each checkpoint as well

* save embeddings in each checkpoint as well

* save embeddings in each checkpoint as well

* Update examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py

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

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:05 +05:30
jiqing-feng e6cc7e5195 Intel Gen 4 Xeon and later support bf16 (#6367)
* Intel Gen 4 Xeon and later support bf16

* fix bf16 notes
2024-12-23 13:02:05 +05:30
Horseee 4a0d0cf2ed [Doc] Add DeepCache in section optimization/General optimizations (#6390)
* add documentation for DeepCache

* fix typo

* add wandb url for DeepCache

* fix some typos

* add item in _toctree.yml

* update formats for arguments

* Update deepcache.md

* Update docs/source/en/optimization/deepcache.md

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

* add StableDiffusionXLPipeline in doc

* Separate SDPipeline and SDXLPipeline

* Add the paper link of ablation experiments for hyper-parameters

* Apply suggestions from code review

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:05 +05:30