Commit Graph

4748 Commits

Author SHA1 Message Date
Dimitri Barbot e28419ddf4 Update sdxl reference pipeline to latest sdxl pipeline (#9938)
* Update sdxl reference community pipeline

* Update README.md

Add example images.

* Style & quality

* Use example images from huggingface documentation-images repository

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
hlky 4da42c2533 Add beta, exponential and karras sigmas to FlowMatchEulerDiscreteScheduler (#10001)
Add beta, exponential and karras sigmas to FlowMatchEuler
2024-12-23 13:02:18 +05:30
YiYi Xu c5f6fb9cdb Sd35 controlnet (#10020)
* add model/pipeline

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Parag Ekbote 30c91896c3 Notebooks for Community Scripts-3 (#10032)
* Add Notebooks for Community Scripts
in  ReadME.

* Minor Script Improvement.
2024-12-23 13:02:18 +05:30
Aryan fab8f75a3f [docs] Fix CogVideoX table (#10008)
* fix

* fix
2024-12-23 13:02:18 +05:30
SkyCol cd1d9e9610 Add prompt about wandb in examples/dreambooth/readme. (#10014)
Add files via upload
2024-12-23 13:02:18 +05:30
Sayak Paul 8253421d13 [Docs] add: missing pipelines from the spec. (#10005)
add: missing pipelines from the spec.
2024-12-23 13:02:18 +05:30
Linoy Tsaban fbcf84d489 [SD3 dreambooth lora] smol fix to checkpoint saving (#9993)
* smol change to fix checkpoint saving & resuming (as done in train_dreambooth_sd3.py)

* style

* modify comment to explain reasoning behind hidden size check
2024-12-23 13:02:18 +05:30
Aryan fbf0755594 Flux Fill, Canny, Depth, Redux (#9985)
* update

---------

Co-authored-by: yiyixuxu <yixu310@gmail.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
hlky 9c111310c9 ControlNet from_single_file when already converted (#9978)
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2024-12-23 13:02:18 +05:30
Fanli Lin 527b79d00a make pipelines tests device-agnostic (part1) (#9399)
* enable on xpu

* add 1 more

* add one more

* enable more

* add 1 more

* add more

* enable 1

* enable more cases

* enable

* enable

* update comment

* one more

* enable 1

* add more cases

* enable xpu

* add one more caswe

* add more cases

* add 1

* add more

* add more cases

* add case

* enable

* add more

* add more

* add more

* enbale more

* add more

* update code

* update test marker

* add skip back

* update comment

* remove single files

* remove

* style

* add

* revert

* reformat

* update decorator

* update

* update

* update

* Update tests/pipelines/deepfloyd_if/test_if.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* Update src/diffusers/utils/testing_utils.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* Update tests/pipelines/animatediff/test_animatediff.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* update float16

* no unitest.skipt

* update

* apply style check

* reapply format

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2024-12-23 13:02:18 +05:30
Sayak Paul 3bf336d983 [Tests] skip nan lora tests on PyTorch 2.5.1 CPU. (#9975)
* skip nan lora tests on PyTorch 2.5.1 CPU.

* cog

* use xfail

* correct xfail

* add condition

* tests
2024-12-23 13:02:18 +05:30
Aryan 1a111b69ab Fix prepare latent image ids and vae sample generators for flux (#9981)
* fix

* update expected slice
2024-12-23 13:02:18 +05:30
YiYi Xu 193ecaab79 fix controlnet module refactor (#9968)
* fix
2024-12-23 13:02:18 +05:30
raulmosa 6905951328 Update handle single blocks on _convert_xlabs_flux_lora_to_diffusers (#9915)
* Update handle single blocks on _convert_xlabs_flux_lora_to_diffusers to fix bug on updating keys and old_state_dict


---------

Co-authored-by: raul_ar <raul.moreno.salinas@autoretouch.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
linjiapro 6b44c28884 Improve control net block index for sd3 (#9758)
* improve control net index

---------

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2024-12-23 13:02:18 +05:30
Sayak Paul dac51f6bb1 [LoRA] enable LoRA for Mochi-1 (#9943)
* feat: add lora support to Mochi-1.
2024-12-23 13:02:18 +05:30
Dhruv Nair 11f6f364c7 Flux latents fix (#9929)
* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
hlky 675c24b612 Fix beta and exponential sigmas + add tests (#9954)
* Fix beta and exponential sigmas + add tests

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Bagheera 84d11bca38 add skip_layers argument to SD3 transformer model class (#9880)
* add skip_layers argument to SD3 transformer model class

* add unit test for skip_layers in stable diffusion 3

* sd3: pipeline should support skip layer guidance

* up

---------

Co-authored-by: bghira <bghira@users.github.com>
Co-authored-by: yiyixuxu <yixu310@gmail.com>
2024-12-23 13:02:18 +05:30
Parag Ekbote 06e78d28c8 Move IP Adapter Scripts to research project (#9960)
* Move files to research-projects.

* docs: add IP Adapter training instructions

* Delete venv

* Update examples/ip_adapter/tutorial_train_sdxl.py

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

* Cherry-picked commits and re-moved files
to research_projects.

* make style.

* Update toctree and delete ip_adapter.

* Nit Fix

* Fix nit.

* Fix nit.

* Create training script for single GPU and set
model format to .safetensors

* Add sample inference script and restore _toctree

* Restore toctree.yaml

* fix spacing.

* Update toctree.yaml

---------

Co-authored-by: AMohamedAakhil <a.aakhilmohamed@gmail.com>
Co-authored-by: BootesVoid <78485654+AMohamedAakhil@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Dhruv Nair 2f509de896 [CI] Unpin torch<2.5 in CI (#9961)
* update

* update
2024-12-23 13:02:18 +05:30
Aryan 7b7c5536f0 Make CogVideoX RoPE implementation consistent (#9963)
* update cogvideox rope implementation

* apply suggestions from review
2024-12-23 13:02:18 +05:30
Sayak Paul 19dc28f3ea [LoRA] feat: save_lora_adapter() (#9862)
* feat: save_lora_adapter.
2024-12-23 13:02:18 +05:30
Linoy Tsaban b97b4c1444 [advanced flux training] bug fix + reduce memory cost as in #9829 (#9838)
* memory improvement as done here: https://github.com/huggingface/diffusers/pull/9829

* fix bug

* fix bug

* style

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Parag Ekbote 18216ac4ad Notebooks for Community Scripts-2 (#9952)
4 Notebooks for Community Scripts and minor
script improvements.
2024-12-23 13:02:18 +05:30
Yuxuan.Zhang 8c553e0a3c CogVideoX 1.5 (#9877)
* CogVideoX1_1PatchEmbed test

* 1360 * 768

* refactor

* make style

* update docs

* add modeling tests for cogvideox 1.5

* update

* make fix-copies

* add ofs embed(for convert)

* add ofs embed(for convert)

* more resolution for cogvideox1.5-5b-i2v

* use even number of latent frames only

* update pipeline implementations

* make style

* set patch_size_t as None by default

* #skip frames 0

* refactor

* make style

* update docs

* fix ofs_embed

* update docs

* invert_scale_latents

* update

* fix

* Update docs/source/en/api/pipelines/cogvideox.md

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

* Update docs/source/en/api/pipelines/cogvideox.md

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

* Update docs/source/en/api/pipelines/cogvideox.md

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

* Update docs/source/en/api/pipelines/cogvideox.md

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

* Update src/diffusers/models/transformers/cogvideox_transformer_3d.py

* update conversion script

* remove copied from

* fix test

* Update docs/source/en/api/pipelines/cogvideox.md

* Update docs/source/en/api/pipelines/cogvideox.md

* Update docs/source/en/api/pipelines/cogvideox.md

* Update docs/source/en/api/pipelines/cogvideox.md

---------

Co-authored-by: Aryan <aryan@huggingface.co>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:18 +05:30
Grant Sherrick 7f236b4975 Add server example (#9918)
* Add server example.

* Minor updates to README.

* Add fixes after local testing.

* Apply suggestions from code review

Updates to README from code review

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

* More doc updates.

* Maybe this will work to build the docs correctly?

* Fix style issues.

* Fix toc.

* Minor reformatting.

* Move docs to proper loc.

* Fix missing tick.

* Apply suggestions from code review

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

* Sync docs changes back to README.

* Very minor update to docs to add space.

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-12-23 13:02:18 +05:30
Parag Ekbote 7b28265fed Fixed Nits in Docs and Example Script (#9940)
Fixed nits in docs and example script.

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
ちくわぶ dd9a3f2206 Add all AttnProcessor classes in AttentionProcessor type (#9909)
Add all AttnProcessor in `AttentionProcessor` type
2024-12-23 13:02:18 +05:30
_ 398a99644e Correct pipeline_output.py to the type Mochi (#9945)
Correct pipeline_output.py
2024-12-23 13:02:18 +05:30
Heavenn 08e5177053 Modify apply_overlay for inpainting with padding_mask_crop (Inpainting area: "Only Masked") (#8793)
* Modify apply_overlay for inpainting

* style

---------

Co-authored-by: root <root@debian>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: yiyixuxu <yixu310@gmail.com>
2024-12-23 13:02:18 +05:30
高佳宝 c3698c8225 Update ip_adapter.py (#8882)
update comments of load_ip_adapter function
2024-12-23 13:02:18 +05:30
Parag Ekbote d27c692917 Move Wuerstchen Dreambooth to research_projects (#9935)
update file paths to research_projects folder.

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Pakkapon Phongthawee 94007c0697 add depth controlnet sd3 pre-trained checkpoints to docs (#9937) 2024-12-23 13:02:18 +05:30
Sam 0f599ee6b9 Update pipeline_flux_img2img.py (#9928)
* Update pipeline_flux_img2img.py

Added FromSingleFileMixin to this pipeline loader like the other FLUX pipelines.

* Update pipeline_flux_img2img.py

typo

* modified:   src/diffusers/pipelines/flux/pipeline_flux_img2img.py
2024-12-23 13:02:18 +05:30
Benjamin Paine 8731574e49 Fix Progress Bar Updates in SD 1.5 PAG Img2Img pipeline (#9925)
fix progress bar updates in SD 1.5 PAG Img2Img pipeline
2024-12-23 13:02:18 +05:30
Parag Ekbote 1022f6c2db Notebooks for Community Scripts Examples (#9905)
* Add Notebooks on Community Scripts
2024-12-23 13:02:18 +05:30
Eliseu Silva aa71132aaf Feature IP Adapter Xformers Attention Processor (#9881)
* Feature IP Adapter Xformers Attention Processor: this fix error loading incorrect attention processor when setting Xformers attn after load ip adapter scale, issues: #8863 #8872
2024-12-23 13:02:18 +05:30
Sayak Paul 291db3e538 Revert "[Flux] reduce explicit device transfers and typecasting in flux." (#9896)
Revert "[Flux] reduce explicit device transfers and typecasting in flux. (#9817)"

This reverts commit 5588725e8e.
2024-12-23 13:02:18 +05:30
Sayak Paul dbea93cb14 [Advanced LoRA v1.5] fix: gradient unscaling problem (#7018)
fix: gradient unscaling problem

Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
2024-12-23 13:02:18 +05:30
SahilCarterr dd3e554b42 [FIX] Fix TypeError in DreamBooth SDXL when use_dora is False (#9879)
* fix use_dora

* fix style and quality

* fix use_dora with peft version

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:18 +05:30
Michael Tkachuk a27125d589 Enabling gradient checkpointing in eval() mode (#9878)
* refactored
2024-12-23 13:02:17 +05:30
SahilCarterr 55ec25ca08 [fix] Replaced shutil.copy with shutil.copyfile (#9885)
fix shutil.copy
2024-12-23 13:02:17 +05:30
Dhruv Nair 72e69ca811 Improve downloads of sharded variants (#9869)
* update

* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:17 +05:30
Sayak Paul cb7016cca3 [Flux] reduce explicit device transfers and typecasting in flux. (#9817)
reduce explicit device transfers and typecasting in flux.
2024-12-23 13:02:17 +05:30
Sayak Paul e92bbf47c0 [Core] introduce controlnet module (#8768)
* move vae flax module.

* controlnet module.

* prepare for PR.

* revert a commit

* gracefully deprecate controlnet deps.

* fix

* fix doc path

* fix-copies

* fix path

* style

* style

* conflicts

* fix

* fix-copies

* sparsectrl.

* updates

* fix

* updates

* updates

* updates

* fix

---------

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2024-12-23 13:02:17 +05:30
SahilCarterr 221d6dbeba Updated _encode_prompt_with_clip and encode_prompt in train_dreamboth_sd3 (#9800)
* updated encode prompt and clip encod prompt


---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:17 +05:30
Sookwan Han f546404097 Add new community pipeline for 'Adaptive Mask Inpainting', introduced in [ECCV2024] ComA (#9228)
* Add new community pipeline for 'Adaptive Mask Inpainting', introduced in [ECCV2024] Beyond the Contact: Discovering Comprehensive Affordance for 3D Objects from Pre-trained 2D Diffusion Models
2024-12-23 13:02:17 +05:30
Vahid Askari d1c42c626c Fix: Remove duplicated comma in distributed_inference.md (#9868)
Fix: Remove duplicated comma

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2024-12-23 13:02:17 +05:30