Parag Ekbote
3e35f56b00
Fix Documentation about Image-to-Image Pipeline ( #10704 )
...
Fix Doc Tutorial.
2025-02-03 09:54:00 -08:00
Ikpreet S Babra
537891e693
Fixed grammar in "write_own_pipeline" readme ( #10706 )
2025-02-03 09:53:30 -08:00
Vedat Baday
9f28f1abba
feat(training-utils): support device and dtype params in compute_density_for_timestep_sampling ( #10699 )
...
* feat(training-utils): support device and dtype params in compute_density_for_timestep_sampling
* chore: update type hint
* refactor: use union for type hint
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-02-01 23:04:05 +05:30
Thanh Le
5d2d23986e
Fix inconsistent random transform in instruct pix2pix ( #10698 )
...
* Update train_instruct_pix2pix.py
Fix inconsistent random transform in instruct_pix2pix
* Update train_instruct_pix2pix_sdxl.py
2025-01-31 08:29:29 -10:00
Max Podkorytov
1ae9b0595f
Fix enable memory efficient attention on ROCm ( #10564 )
...
* fix enable memory efficient attention on ROCm
while calling CK implementation
* Update attention_processor.py
refactor of picking a set element
2025-01-31 17:15:49 +05:30
SahilCarterr
aad69ac2f3
[FIX] check_inputs function in Auraflow Pipeline ( #10678 )
...
fix_shape_error
2025-01-29 13:11:54 -10:00
Vedat Baday
ea76880bd7
fix(hunyuan-video): typo in height and width input check ( #10684 )
2025-01-30 04:16:05 +05:30
Teriks
33f936154d
support StableDiffusionAdapterPipeline.from_single_file ( #10552 )
...
* support StableDiffusionAdapterPipeline.from_single_file
* make style
---------
Co-authored-by: Teriks <Teriks@users.noreply.github.com >
Co-authored-by: hlky <hlky@hlky.ac >
2025-01-29 07:18:47 -10:00
Sayak Paul
e6037e8275
[tests] update llamatokenizer in hunyuanvideo tests ( #10681 )
...
update llamatokenizer in hunyuanvideo tests
2025-01-29 21:12:57 +05:30
Dimitri Barbot
196aef5a6f
Fix pipeline dtype unexpected change when using SDXL reference community pipelines in float16 mode ( #10670 )
...
Fix pipeline dtype unexpected change when using SDXL reference community pipelines
2025-01-28 10:46:41 -03:00
Sayak Paul
7b100ce589
[Tests] conditionally check fp8_e4m3_bf16_max_memory < fp8_e4m3_fp32_max_memory ( #10669 )
...
* conditionally check if compute capability is met.
* log info.
* fix condition.
* updates
* updates
* updates
* updates
2025-01-28 12:00:14 +05:30
Aryan
c4d4ac21e7
Refactor gradient checkpointing ( #10611 )
...
* update
* remove unused fn
* apply suggestions based on review
* update + cleanup 🧹
* more cleanup 🧹
* make fix-copies
* update test
2025-01-28 06:51:46 +05:30
Hanch Han
f295e2eefc
[fix] refer use_framewise_encoding on AutoencoderKLHunyuanVideo._encode ( #10600 )
...
* fix: refer to use_framewise_encoding on AutoencoderKLHunyuanVideo._encode
* fix: comment about tile_sample_min_num_frames
---------
Co-authored-by: Aryan <aryan@huggingface.co >
2025-01-28 06:51:27 +05:30
Aryan
658e24e86c
[core] Pyramid Attention Broadcast ( #9562 )
...
* start pyramid attention broadcast
* add coauthor
Co-Authored-By: Xuanlei Zhao <43881818+oahzxl@users.noreply.github.com >
* update
* make style
* update
* make style
* add docs
* add tests
* update
* 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 >
* Pyramid Attention Broadcast rewrite + introduce hooks (#9826 )
* rewrite implementation with hooks
* make style
* update
* merge pyramid-attention-rewrite-2
* make style
* remove changes from latte transformer
* revert docs changes
* better debug message
* add todos for future
* update tests
* make style
* cleanup
* fix
* improve log message; fix latte test
* refactor
* update
* update
* update
* revert changes to tests
* update docs
* update tests
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* update
* fix flux test
* reorder
* refactor
* make fix-copies
* update docs
* fixes
* more fixes
* make style
* update tests
* update code example
* make fix-copies
* refactor based on reviews
* use maybe_free_model_hooks
* CacheMixin
* make style
* update
* add current_timestep property; update docs
* make fix-copies
* update
* improve tests
* try circular import fix
* apply suggestions from review
* address review comments
* Apply suggestions from code review
* refactor hook implementation
* add test suite for hooks
* PAB Refactor (#10667 )
* update
* update
* update
---------
Co-authored-by: DN6 <dhruv.nair@gmail.com >
* update
* fix remove hook behaviour
---------
Co-authored-by: Xuanlei Zhao <43881818+oahzxl@users.noreply.github.com >
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
Co-authored-by: DN6 <dhruv.nair@gmail.com >
2025-01-28 05:09:04 +05:30
Giuseppe Catalano
fb42066489
Revert RePaint scheduler 'fix' ( #10644 )
...
Co-authored-by: Giuseppe Catalano <giuseppelorenzo.catalano@unito.it >
2025-01-27 11:16:45 -10:00
Teriks
e89ab5bc26
SDXL ControlNet Union pipelines, make control_image argument immutible ( #10663 )
...
controlnet union XL, make control_image immutible
when this argument is passed a list, __call__
modifies its content, since it is pass by reference
the list passed by the caller gets its content
modified unexpectedly
make a copy at method intro so this does not happen
Co-authored-by: Teriks <Teriks@users.noreply.github.com >
2025-01-27 10:53:30 -10:00
victolee0
8ceec90d76
fix check_inputs func in LuminaText2ImgPipeline ( #10651 )
2025-01-27 09:47:01 -10:00
hlky
158c5c4d08
Add provider_options to OnnxRuntimeModel ( #10661 )
2025-01-27 09:46:17 -10:00
hlky
41571773d9
[training] Convert to ImageFolder script ( #10664 )
...
* [training] Convert to ImageFolder script
* make
2025-01-27 09:43:51 -10:00
hlky
18f7d1d937
ControlNet Union controlnet_conditioning_scale for multiple control inputs ( #10666 )
2025-01-27 08:15:25 -10:00
Marlon May
f7f36c7d3d
Add community pipeline for semantic guidance for FLUX ( #10610 )
...
* add community pipeline for semantic guidance for flux
* fix imports in community pipeline for semantic guidance for flux
* Update examples/community/pipeline_flux_semantic_guidance.py
Co-authored-by: hlky <hlky@hlky.ac >
* fix community pipeline for semantic guidance for flux
---------
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
Co-authored-by: hlky <hlky@hlky.ac >
2025-01-27 16:19:46 +02:00
Yuqian Hong
4fa24591a3
create a script to train autoencoderkl ( #10605 )
...
* create a script to train vae
* update main.py
* update train_autoencoderkl.py
* update train_autoencoderkl.py
* add a check of --pretrained_model_name_or_path and --model_config_name_or_path
* remove the comment, remove diffusers in requiremnets.txt, add validation_image ote
* update autoencoderkl.py
* quality
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-01-27 16:41:34 +05:30
Jacob Helwig
4f3ec5364e
Add sigmoid scheduler in scheduling_ddpm.py docs ( #10648 )
...
Sigmoid scheduler in scheduling_ddpm.py docs
2025-01-26 15:37:20 -08:00
Leo Jiang
07860f9916
NPU Adaption for Sanna ( #10409 )
...
* NPU Adaption for Sanna
---------
Co-authored-by: J石页 <jiangshuo9@h-partners.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-01-24 09:08:52 -10:00
Wenhao Sun
87252d80c3
Add pipeline_stable_diffusion_xl_attentive_eraser ( #10579 )
...
* add pipeline_stable_diffusion_xl_attentive_eraser
* add pipeline_stable_diffusion_xl_attentive_eraser_make_style
* make style and add example output
* update Docs
Co-authored-by: Other Contributor <a457435687@126.com >
* add Oral
Co-authored-by: Other Contributor <a457435687@126.com >
* update_review
Co-authored-by: Other Contributor <a457435687@126.com >
* update_review_ms
Co-authored-by: Other Contributor <a457435687@126.com >
---------
Co-authored-by: Other Contributor <a457435687@126.com >
2025-01-24 13:52:45 +00:00
Sayak Paul
5897137397
[chore] add a script to extract loras from full fine-tuned models ( #10631 )
...
* feat: add a lora extraction script.
* updates
2025-01-24 11:50:36 +05:30
Yaniv Galron
a451c0ed14
removing redundant requires_grad = False ( #10628 )
...
We already set the unet to requires grad false at line 506
Co-authored-by: Aryan <aryan@huggingface.co >
2025-01-24 03:25:33 +05:30
hlky
37c9697f5b
Add IP-Adapter example to Flux docs ( #10633 )
...
* Add IP-Adapter example to Flux docs
* Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-01-23 22:15:33 +05:30
Raul Ciotescu
9684c52adf
width and height are mixed-up ( #10629 )
...
vars mixed-up
2025-01-23 06:40:22 -10:00
Steven Liu
5483162d12
[docs] uv installation ( #10622 )
...
* uv
* feedback
2025-01-23 08:34:51 -08:00
Sayak Paul
d77c53b6d2
[docs] fix image path in para attention docs ( #10632 )
...
fix image path in para attention docs
2025-01-23 08:22:42 -08:00
Sayak Paul
78bc824729
[Tests] modify the test slices for the failing flax test ( #10630 )
...
* fixes
* fixes
* fixes
* updates
2025-01-23 12:10:24 +05:30
kahmed10
04d40920a7
add onnxruntime-migraphx as part of check for onnxruntime in import_utils.py ( #10624 )
...
add onnxruntime-migraphx to import_utils.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-01-23 07:49:51 +05:30
Dhruv Nair
8d6f6d6b66
[CI] Update HF_TOKEN in all workflows ( #10613 )
...
update
2025-01-22 20:03:41 +05:30
Aryan
ca60ad8e55
Improve TorchAO error message ( #10627 )
...
improve error message
2025-01-22 19:50:02 +05:30
Aryan
beacaa5528
[core] Layerwise Upcasting ( #10347 )
...
* update
* update
* make style
* remove dynamo disable
* add coauthor
Co-Authored-By: Dhruv Nair <dhruv.nair@gmail.com >
* update
* update
* update
* update mixin
* add some basic tests
* update
* update
* non_blocking
* improvements
* update
* norm.* -> norm
* apply suggestions from review
* add example
* update hook implementation to the latest changes from pyramid attention broadcast
* deinitialize should raise an error
* update doc page
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* update docs
* update
* refactor
* fix _always_upcast_modules for asym ae and vq_model
* fix lumina embedding forward to not depend on weight dtype
* refactor tests
* add simple lora inference tests
* _always_upcast_modules -> _precision_sensitive_module_patterns
* remove todo comments about review; revert changes to self.dtype in unets because .dtype on ModelMixin should be able to handle fp8 weight case
* check layer dtypes in lora test
* fix UNet1DModelTests::test_layerwise_upcasting_inference
* _precision_sensitive_module_patterns -> _skip_layerwise_casting_patterns based on feedback
* skip test in NCSNppModelTests
* skip tests for AutoencoderTinyTests
* skip tests for AutoencoderOobleckTests
* skip tests for UNet1DModelTests - unsupported pytorch operations
* layerwise_upcasting -> layerwise_casting
* skip tests for UNetRLModelTests; needs next pytorch release for currently unimplemented operation support
* add layerwise fp8 pipeline test
* use xfail
* Apply suggestions from code review
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* add assertion with fp32 comparison; add tolerance to fp8-fp32 vs fp32-fp32 comparison (required for a few models' test to pass)
* add note about memory consumption on tesla CI runner for failing test
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-01-22 19:49:37 +05:30
Lucain
a647682224
Remove cache migration script ( #10619 )
2025-01-21 07:22:59 -10:00
YiYi Xu
a1f9a71238
fix offload gpu tests etc ( #10366 )
...
* add
* style
2025-01-21 18:52:36 +05:30
Fanli Lin
ec37e20972
[tests] make tests device-agnostic (part 3) ( #10437 )
...
* initial comit
* fix empty cache
* fix one more
* fix style
* update device functions
* update
* update
* Update src/diffusers/utils/testing_utils.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/utils/testing_utils.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/utils/testing_utils.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update tests/pipelines/controlnet/test_controlnet.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/utils/testing_utils.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/utils/testing_utils.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update tests/pipelines/controlnet/test_controlnet.py
Co-authored-by: hlky <hlky@hlky.ac >
* with gc.collect
* update
* make style
* check_torch_dependencies
* add mps empty cache
* bug fix
* Apply suggestions from code review
---------
Co-authored-by: hlky <hlky@hlky.ac >
2025-01-21 12:15:45 +00:00
Muyang Li
158a5a87fb
Remove the FP32 Wrapper when evaluating ( #10617 )
...
Remove the FP32 Wrapper
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-01-21 16:16:54 +05:30
jiqing-feng
012d08b1bc
Enable dreambooth lora finetune example on other devices ( #10602 )
...
* enable dreambooth_lora on other devices
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* enable xpu
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* check cuda device before empty cache
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* fix comment
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* import free_memory
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
---------
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
2025-01-21 14:09:45 +05:30
Sayak Paul
4ace7d0483
[chore] change licensing to 2025 from 2024. ( #10615 )
...
change licensing to 2025 from 2024.
2025-01-20 16:57:27 -10:00
baymax591
75a636da48
bugfix for npu not support float64 ( #10123 )
...
* bugfix for npu not support float64
* is_mps is_npu
---------
Co-authored-by: 白超 <baichao19@huawei.com >
Co-authored-by: hlky <hlky@hlky.ac >
2025-01-20 09:35:24 -10:00
sunxunle
4842f5d8de
chore: remove redundant words ( #10609 )
...
Signed-off-by: sunxunle <sunxunle@ampere.tech >
2025-01-20 08:15:26 -10:00
Sayak Paul
328e0d20a7
[training] set rest of the blocks with requires_grad False. ( #10607 )
...
set rest of the blocks with requires_grad False.
2025-01-19 19:34:53 +05:30
Shenghai Yuan
23b467c79c
[core] ConsisID ( #10140 )
...
* Update __init__.py
* add consisid
* update consisid
* update consisid
* make style
* make_style
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* add doc
* make style
* Rename consisid .md to consisid.md
* Update geodiff_molecule_conformation.ipynb
* Update geodiff_molecule_conformation.ipynb
* Update geodiff_molecule_conformation.ipynb
* Update demo.ipynb
* Update pipeline_consisid.py
* make fix-copies
* Update docs/source/en/using-diffusers/consisid.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/using-diffusers/consisid.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/using-diffusers/consisid.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* update doc & pipeline code
* fix typo
* make style
* update example
* Update docs/source/en/using-diffusers/consisid.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* update example
* update example
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update src/diffusers/pipelines/consisid/pipeline_consisid.py
Co-authored-by: hlky <hlky@hlky.ac >
* update
* add test and update
* remove some changes from docs
* refactor
* fix
* undo changes to examples
* remove save/load and fuse methods
* update
* link hf-doc-img & make test extremely small
* update
* add lora
* fix test
* update
* update
* change expected_diff_max to 0.4
* fix typo
* fix link
* fix typo
* update docs
* update
* remove consisid lora tests
---------
Co-authored-by: hlky <hlky@hlky.ac >
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
Co-authored-by: Aryan <aryan@huggingface.co >
2025-01-19 13:10:08 +05:30
Juan Acevedo
aeac0a00f8
implementing flux on TPUs with ptxla ( #10515 )
...
* implementing flux on TPUs with ptxla
* add xla flux attention class
* run make style/quality
* Update src/diffusers/models/attention_processor.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/attention_processor.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* run style and quality
---------
Co-authored-by: Juan Acevedo <jfacevedo@google.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2025-01-16 08:46:02 -10:00
Leo Jiang
cecada5280
NPU adaption for RMSNorm ( #10534 )
...
* NPU adaption for RMSNorm
* NPU adaption for RMSNorm
---------
Co-authored-by: J石页 <jiangshuo9@h-partners.com >
2025-01-16 08:45:29 -10:00
C
17d99c4d22
[Docs] Add documentation about using ParaAttention to optimize FLUX and HunyuanVideo ( #10544 )
...
* add para_attn_flux.md and para_attn_hunyuan_video.md
* add enable_sequential_cpu_offload in para_attn_hunyuan_video.md
* add comment
* refactor
* fix
* fix
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* fix
* update links
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* fix
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update docs/source/en/optimization/para_attn.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-01-16 10:05:13 -08:00
hlky
08e62fe0c2
Scheduling fixes on MPS ( #10549 )
...
* use np.int32 in scheduling
* test_add_noise_device
* -np.int32, fixes
2025-01-16 07:45:03 -10:00