Commit Graph

3902 Commits

Author SHA1 Message Date
Sayak Paul 1b917981da [Research Projects] ORPO diffusion for alignment (#7423)
* barebones orpo

* remove reference model.

* full implementation

* change default of beta_orpo

* add a training command.

* fix: dataloading issues.

* interpreting the formulation.

* revert styling

* add: wds full blown version

* fix: per_gpu_batch_siz

* start debuggin

* debugging

* remove print

* fix

* remove filter keys.

* turn on non-blocking calls.

* device_placement

* let's see.

* add bigger training run command

* reinitialize generator for fair repro

* add: detailed readme and requirements

---------

Co-authored-by: Sayak Paul <sayakpaul@Sayaks-MacBook-Pro-2.local>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz f1b4ebfce3 [IP-Adapter] Fix IP-Adapter Support and Refactor Callback for StableDiffusionPanoramaPipeline (#7262)
* Add properties and `IPAdapterTesterMixin` tests for `StableDiffusionPanoramaPipeline`

* Update torch manual seed to use `torch.Generator(device=device)`

* Refactor 📞🔙 to support `callback_on_step_end`

* make fix-copies
2024-12-23 13:02:09 +05:30
Sayak Paul bcb7fba21f Remove distutils (#7455)
* strtobool

* replace Command from setuptools.
2024-12-23 13:02:09 +05:30
Aryan fbc5031b27 [refactor] Fix FreeInit behaviour (#7410)
* fix freeinit impl

* fix progress bar

* fix progress bar and remove old code

* fix num_inference_steps==1 case for freeinit by atleast running 1 step when fast sampling enabled
2024-12-23 13:02:09 +05:30
Sayak Paul a48c41f4c7 add: space for calculating memory usagee. (#7414)
* add: space for calculating memory usahe.

* Update docs/source/en/using-diffusers/loading.md

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

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:09 +05:30
YiYi Xu e6d2af229d add a "Community Scripts" section (#7358)
* add

* add tiling

* fix

* fix

* fix

* give community script its own readme

* Update examples/community/README_community_scripts.md

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

* Update examples/community/README_community_scripts.md

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

* Update examples/community/README_community_scripts.md

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

* Update examples/community/README_community_scripts.md

---------

Co-authored-by: Alexis Rolland <alexis.rolland@ubisoft.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:09 +05:30
Sayak Paul 99dd106e5e [Docs] add missing output image (#7425)
add missing output image
2024-12-23 13:02:09 +05:30
sayakpaul fec596ddf1 Revert "add: space within docs to calculate mememory usage."
This reverts commit 78990dd960.
2024-12-23 13:02:09 +05:30
sayakpaul 634c467193 add: space within docs to calculate mememory usage. 2024-12-23 13:02:09 +05:30
Yuanhao Zhai 6cb9fd1710 fix: enable unet_3d_condition to support time_cond_proj_dim (#7364)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz 651dac5447 Fix typos (#7411)
* Fix typos

* Fix typo in SVD.md
2024-12-23 13:02:09 +05:30
Sayak Paul 8d9dadaa64 [Custom Pipelines with Custom Components] fix multiple things (#7304)
* checking to improve pipelines.

* more fixes.

* add: tip to encourage the usage of revision

* Apply suggestions from code review

* retrigger ci

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:09 +05:30
Sayak Paul c2c884a9e6 [LoRA test suite] refactor the test suite and cleanse it (#7316)
* cleanse and refactor lora testing suite.

* more cleanup.

* make check_if_lora_correctly_set a utility function

* fix: typo

* retrigger ci

* style
2024-12-23 13:02:09 +05:30
Sayak Paul e3fd38f54d clean dep installation step in push_tests (#7382)
* clean dep installation step in push_tests

* fix: deps
2024-12-23 13:02:09 +05:30
Sayak Paul dca0c39d9f [Chore] add: fives names to citations. (#7395)
* add: four names to citations.

* add: steven
2024-12-23 13:02:09 +05:30
Dhruv Nair a2e9812749 Remove insecure torch.load calls (#7393)
update
2024-12-23 13:02:09 +05:30
Stephen 924d2e0d5a Change path to posix (modeling_utils.py) (#6781)
* Change path to posix

* running isort

* run style and quality checks

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
laksjdjf 494c97538d Fix ControlNetModel.from_unet do not load add_embedding (#7269)
* Fix ControlNetModel.from_unet do not load add_embedding

* delete white space in blank line

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
PJC f251e36512 Update pipeline_controlnet_sd_xl_img2img.py (#7353)
* Update pipeline_controlnet_sd_xl_img2img.py

fix: safetensors load error

* fix for pass test

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:09 +05:30
Dhruv Nair aa6688ced4 Fix issue with prompt embeds and latents in SD Cascade Decoder with multiple image embeddings for a single prompt. (#7381)
* fix

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Sayak Paul b95506fc1e [LoRA] fix cross_attention_kwargs problems and tighten tests (#7388)
* debugging

* let's see the numbers

* let's see the numbers

* let's see the numbers

* restrict tolerance.

* increase inference steps.

* shallow copy of cross_attentionkwargs

* remove print
2024-12-23 13:02:09 +05:30
YiYi Xu ebc455910c [scheduler] fix a bug in add_noise (#7386)
* fix

* fix

* add a tests

* fix

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-12-23 13:02:09 +05:30
lawfordp2017 c0ca2c573e Correction for non-integral image resolutions with quantizations other than float32 (#7356)
* Correction for non-integral image resolutions with quantizations other than float32.

* Support for training, and use of diffusers-style casting.
2024-12-23 13:02:09 +05:30
Aryan c0fed0e4fd [docs] Add missing copied from statements in TCD Scheduler (#7360)
* add missing copied from statements in tcd scheduler

* update docstring

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Dhruv Nair 636c99afc2 Add FreeInit Outputs to Docs Page (#7384)
* update

* fix
2024-12-23 13:02:09 +05:30
Sayak Paul 5e61b515ed [LoRA] pop the LoRA scale so that it doesn't get propagated to the weeds (#7338)
* pop scale from the top-level unet instead of getting it.

* improve readability.

* Apply suggestions from code review

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

* fix a little bit.

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz c5f516a4ca Fix conditional statement in test_schedulers.py (#7323)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz 448e94b39c Update loading of config from a file in test_config.py (#7344)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz 992d58ea09 Use PyTorch's conventional inplace functions (#7332)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Beinsezii 76996c3dfa Add Cascade to Auto T2I + Decoder mappings (#7362)
* Add Cascade to Auto T2I + Decoder mappings

* ruff autofix

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz 950c7085f5 Update access of configuration attributes (#7343)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Sayak Paul 5c1f8b12cb [LoRA] Clean Kohya conversion utils (#7374)
* clean up the kohya_conversion utility

* state dict assignment
2024-12-23 13:02:09 +05:30
M. Tolga Cangöz 4e546762ab Fix Typos (#7325)
* Fix PyTorch's convention for inplace functions

* Fix import structure in __init__.py and update config loading logic in test_config.py

* Update configuration access

* Fix typos

* Trim trailing white spaces

* Fix typo in logger name

* Revert "Fix PyTorch's convention for inplace functions"

This reverts commit f65dc4afcb.

* Fix typo in step_index property description

* Revert "Update configuration access"

This reverts commit 8d44e870b8.

* Revert "Fix import structure in __init__.py and update config loading logic in test_config.py"

This reverts commit 2ad5e8bca2.

* Fix typos

* Fix typos

* Fix typos

* Fix a typo: tranform -> transform
2024-12-23 13:02:09 +05:30
Anatoly Belikov 3cf03face4 delete vae and text encoders after use in SDXL training script (#6693)
delete vae and text encoders after use

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Dhruv Nair 209efa01ac [Tests] Fix ControlNet Single File tests (#7315)
* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Sayak Paul 08a03e1641 post-release v0.27.0 (#7329)
* post-release

* quality
2024-12-23 13:02:09 +05:30
Sayak Paul b25e428df8 Fix release workflow deps (#7339)
* pop scale from the top-level unet instead of getting it.

* improve readability.

* fix: pypi workflow deps

* revert
2024-12-23 13:02:09 +05:30
Abubakar Abid e272342f3e Adds docs for gradio.Interface.from_pipeline() (#7346)
* gradio docs

* Update docs/source/en/api/pipelines/stable_diffusion/overview.md

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

* changes

* changes

* changes

* Update docs/source/en/api/pipelines/stable_diffusion/overview.md

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Sayak Paul 23b635123b add: torch to the pypi step. (#7328) 2024-12-23 13:02:09 +05:30
M. Tolga Cangöz c6fa2ee726 [Tests] Update a deprecated parameter in test files and fix several typos (#7277)
* Add properties and `IPAdapterTesterMixin` tests for `StableDiffusionPanoramaPipeline`

* Fix variable name typo and update comments

* Update deprecated `output_type="numpy"` to "np" in test files

* Discard changes to src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py

* Update test_stable_diffusion_panorama.py

* Update numbers in README.md

* Update get_guidance_scale_embedding method to use timesteps instead of w

* Update number of checkpoints in README.md

* Add type hints and fix var name

* Fix PyTorch's convention for inplace functions

* Fix a typo

* Revert "Fix PyTorch's convention for inplace functions"

This reverts commit 74350cf65b.

* Fix typos

* Indent

* Refactor get_guidance_scale_embedding method in LEditsPPPipelineStableDiffusionXL class
2024-12-23 13:02:09 +05:30
Dhruv Nair 65eb818a38 Update Cascade Tests (#7324)
* update

* update

* update
2024-12-23 13:02:09 +05:30
Linoy Tsaban f86aa42f4c [Advanced DreamBooth LoRA SDXL] Support EDM-style training (follow up of #7126) (#7182)
* add edm style training

* style

* finish adding edm training feature

* import fix

* fix latents mean

* minor adjustments

* add edm to readme

* style

* fix autocast and scheduler config issues when using edm

* style

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Suraj Patil c7c339555c add edm schedulers in doc (#7319)
* add edm schedulers in doc

* add in toctree

* address reviewe comments
2024-12-23 13:02:09 +05:30
Anatoly Belikov ec2acc7dc8 log loss per image (#7278)
* log loss per image

* add commandline param for per image loss logging

* style

* debug-loss -> debug_loss

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Dhruv Nair c159e36f61 [Tests] Fix incorrect constant in VAE scaling test. (#7301)
update
2024-12-23 13:02:09 +05:30
Sayak Paul 14ddd9612a add: pytest log installation (#7313) 2024-12-23 13:02:09 +05:30
Kenneth Gerald Hamilton 94c0940aef update get_order_list if statement (#7309)
* update get_order_list if statement

* revery
2024-12-23 13:02:09 +05:30
Beinsezii e6851daf70 Change step_offset scheduler docstrings (#7128)
* Change step_offset scheduler docstrings

* Mention it may be needed by some models

* More docstrings

These ones failed literal S&R because I performed it case-sensitive
which is fun.

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:09 +05:30
Alexander Bonnet 58de563cec Fix typos in UNet2DConditionModel documentation (#7291)
* fix typo in UNet2DConditionModel documentation

* Fix indentation that may fix doc rendering

* Fix squished doc lines
2024-12-23 13:02:09 +05:30
Michael f08278b391 Add Intro page of TCD (#7259)
* add tcd intro

* resolve repos

* Apply suggestions from code review

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

* revise NFEs related

* change inpainting location

---------

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