Carolinabanana
3376252d71
Fix gradient checkpointing issue for Stable Diffusion 3 ( #8542 )
...
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-06-18 11:36:23 -10:00
Yongsen Mao
16170c69ae
add sd1.5 compatibility to controlnet-xs and fix unused_parameters error during training ( #8606 )
...
* add sd1.5 compatibility to controlnet-xs
* set use_linear_projection by base_block
* refine code style
2024-06-18 11:35:34 -10:00
kkj15dk
4408047ac5
self.upsample = Upsample1D ( #8580 )
...
Making self.upsample actually be Upsample1D
2024-06-18 11:34:07 -10:00
Gæros
298ce67999
[LoRA] text encoder: read the ranks for all the attn modules ( #8324 )
...
* [LoRA] text encoder: read the ranks for all the attn modules
* In addition to out_proj, read the ranks of adapters for q_proj, k_proj, and v_proj
* Allow missing adapters (UNet already supports this)
* ruff format loaders.lora
* [LoRA] add tests for partial text encoders LoRAs
* [LoRA] update test_simple_inference_with_partial_text_lora to be deterministic
* [LoRA] comment justifying test_simple_inference_with_partial_text_lora
* style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-18 21:10:50 +01:00
Sayak Paul
cd3082008e
[Core] Add shift_factor to SD3 tiny autoencoder ( #8618 )
...
* shift factor argument to tiny
* remove shift factor rejigging from the sd3 docs
2024-06-18 18:28:02 +01:00
Álvaro Somoza
f3209b5b55
[SD3 Inference] T5 Token limit ( #8506 )
...
* max_sequence_length for the T5
* updated img2img
* apply suggestions
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-06-18 06:46:38 -10:00
Marc Sun
96399c3ec6
Fix sharding when no device_map is passed ( #8531 )
...
* Fix sharding when no device_map is passed
* style
* add tests
* align
* add docstring
* format
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-18 05:47:23 -10:00
Dhruv Nair
f69511ecc6
[Single File Loading] Handle unexpected keys in CLIP models when accelerate isn't installed. ( #8462 )
...
* update
* update
* update
* update
* update
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-18 16:39:30 +01:00
Sayak Paul
4edde134f6
[SD3 training] refactor the density and weighting utilities. ( #8591 )
...
refactor the density and weighting utilities.
2024-06-18 14:44:38 +01:00
YiYi Xu
a6375d4101
Image processor latent ( #8513 )
...
* fix
* up
---------
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2024-06-16 22:34:55 -10:00
Sayak Paul
130dd936bb
pin accelerate to 0.31.0 ( #8563 )
...
* pin accelerate to 0.31.0
* update dep table
* empty
2024-06-16 08:37:00 -10:00
Tolga Cangöz
9c6e9684a2
Refactor StableDiffusion3Img2ImgPipeline to remove redundant code ( #8533 )
2024-06-13 07:36:46 -10:00
Sayak Paul
2e4841ef1e
post release 0.29.0 ( #8492 )
...
post release
2024-06-13 06:14:20 -10:00
YiYi Xu
614d0c64e9
remove the deprecated prepare_mask_and_masked_image function ( #8512 )
...
remove prepare mask fn
Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-13 14:59:21 +01:00
Dhruv Nair
b1a2c0d577
Expand Single File support in SD3 Pipeline ( #8517 )
...
* update
* update
2024-06-13 18:29:19 +05:30
ちくわぶ
896fb6d8d7
Fix duplicate variable assignments in SD3's JointAttnProcessor ( #8516 )
...
* Fix duplicate variable assignments.
* Fix duplicate variable assignments.
2024-06-12 21:52:35 -10:00
Beinsezii
7f51f286a5
Add Hunyuan AutoPipe mapping ( #8505 )
2024-06-12 16:11:55 -10:00
kkj15dk
829f6defa4
Fix spelling in scheduling_flow_match_euler_discrete.py ( #8497 )
...
Update scheduling_flow_match_euler_discrete.py
Spelling:
Foward -> Forward
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-06-12 12:37:47 -10:00
Beinsezii
24bdf4b215
Add SD3 AutoPipeline mappings ( #8489 )
2024-06-12 12:31:36 -10:00
Sayak Paul
6cf0be5d3d
fix warning log for Transformer SD3 ( #8496 )
...
fix warning log
2024-06-12 12:25:18 -10:00
Sayak Paul
ec068f9b5b
fix dual transformer2d import ( #8491 )
...
fix
2024-06-12 21:10:27 +01:00
Dhruv Nair
04717fd861
Add Stable Diffusion 3 ( #8483 )
...
* up
* add sd3
* update
* update
* add tests
* fix copies
* fix docs
* update
* add dreambooth lora
* add LoRA
* update
* update
* update
* update
* import fix
* update
* Update src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* import fix 2
* update
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* update
* update
* update
* fix ckpt id
* fix more ids
* update
* missing doc
* Update src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py
Co-authored-by: YiYi Xu <yixu310@gmail.com >
* Update docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_3.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_3.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* update'
* fix
* update
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
* Update src/diffusers/models/autoencoders/autoencoder_kl.py
* note on gated access.
* requirements
* licensing
---------
Co-authored-by: sayakpaul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-06-12 20:44:00 +01:00
Greg Hunkins
1066fe4cbc
🤫 Quiet IP Adapter Mask Warning ( #8475 )
...
* quiet attn parameters
* fix lint
* make style && make quality
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-12 16:50:13 +01:00
Sayak Paul
d38f69ea25
change max_shard_size to 10GB ( #8445 )
...
* change max_shard_size to 10GB
* add notes to the documentation
* Update src/diffusers/models/modeling_utils.py
Co-authored-by: Lucain <lucainp@gmail.com >
* change to abs limit
---------
Co-authored-by: Lucain <lucainp@gmail.com >
2024-06-12 13:49:13 +01:00
Patrick
0a1c13af79
image_processor.py: Fixed an error in ValueError's message ( #8447 )
...
* image_processor.py: Fixed an error in ValueError's message , as the string's join method tried to join types, instead of strings
Bug that occurred:
f"Input is in incorrect format. Currently, we only support {', '.join(supported_formats)}"
TypeError: sequence item 0: expected str instance, type found
* Fixed: C417 Unnecessary `map` usage (rewrite using a generator expression)
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-11 08:09:24 -10:00
YiYi Xu
0028c34432
fix SEGA pipeline ( #8467 )
...
* fix
* style
---------
Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-06-11 06:37:49 -10:00
Jianqi Pan
1d9a6a81b9
🔧 chore: use modeling_outputs.Transformer2DModelOutput ( #8436 )
...
* 🔧 chore: use modeling_outputs.Transformer2DModelOutput
* 🔧 chore: isort
* 🔧 chore: isort
* style
---------
Co-authored-by: sayakpaul <spsayakpaul@gmail.com >
2024-06-10 12:11:41 +01:00
Lucain
0d68ddf327
Move away from cached_download ( #8419 )
...
* Move away from
* unused constant
* Add custom error
2024-06-07 15:43:00 +05:30
Sayak Paul
7d887118b9
[Core] support saving and loading of sharded checkpoints ( #7830 )
...
* feat: support saving a model in sharded checkpoints.
* feat: make loading of sharded checkpoints work.
* add tests
* cleanse the loading logic a bit more.
* more resilience while loading from the Hub.
* parallelize shard downloads by using snapshot_download()/
* default to a shard size.
* more fix
* Empty-Commit
* debug
* fix
* uality
* more debugging
* fix more
* initial comments from Benjamin
* move certain methods to loading_utils
* add test to check if the correct number of shards are present.
* add a test to check if loading of sharded checkpoints from the Hub is okay
* clarify the unit when passed as an int.
* use hf_hub for sharding.
* remove unnecessary code
* remove unnecessary function
* lucain's comments.
* fixes
* address high-level comments.
* fix test
* subfolder shenanigans./
* Update src/diffusers/utils/hub_utils.py
Co-authored-by: Lucain <lucainp@gmail.com >
* Apply suggestions from code review
Co-authored-by: Lucain <lucainp@gmail.com >
* remove _huggingface_hub_version as not needed.
* address more feedback.
* add a test for local_files_only=True/
* need hf hub to be at least 0.23.2
* style
* final comment.
* clean up subfolder.
* deal with suffixes in code.
* _add_variant default.
* use weights_name_pattern
* remove add_suffix_keyword
* clean up downloading of sharded ckpts.
* don't return something special when using index.json
* fix more
* don't use bare except
* remove comments and catch the errors better
* fix a couple of things when using is_file()
* empty
---------
Co-authored-by: Lucain <lucainp@gmail.com >
2024-06-07 14:49:10 +05:30
Sayak Paul
a3faf3f260
[Core] fix: legacy model mapping ( #8416 )
...
* fix: legacy model mapping
* remove print
2024-06-06 20:35:05 +05:30
Tolga Cangöz
98730c5dd7
Errata ( #8322 )
...
* Fix typos
* Trim trailing whitespaces
* Remove a trailing whitespace
* chore: Update MarigoldDepthPipeline checkpoint to prs-eth/marigold-lcm-v1-0
* Revert "chore: Update MarigoldDepthPipeline checkpoint to prs-eth/marigold-lcm-v1-0"
This reverts commit fd742b30b4 .
* pokemon -> naruto
* `DPMSolverMultistep` -> `DPMSolverMultistepScheduler`
* Improve Markdown stylization
* Improve style
* Improve style
* Refactor pipeline variable names for consistency
* up style
2024-06-05 13:59:09 -07:00
Sayak Paul
48207d6689
[Scheduler] fix: EDM schedulers when using the exp sigma schedule. ( #8385 )
...
* fix: euledm when using the exp sigma schedule.
* fix-copies
* remove print.
* reduce friction
* yiyi's suggestioms
2024-06-04 19:31:43 -10:00
Sayak Paul
2f6f426f66
[Hunyuan] allow Hunyuan DiT to run under 6GB for GPU VRAM ( #8399 )
...
* allow hunyuan dit to run under 6GB for GPU VRAM
* add section in the docs/
2024-06-05 08:24:19 +04:00
Sayak Paul
a0542c1917
[LoRA] Remove legacy LoRA code and related adjustments ( #8316 )
...
* remove legacy code from load_attn_procs.
* finish first draft
* fix more.
* fix more
* add test
* add serialization support.
* fix-copies
* require peft backend for lora tests
* style
* fix test
* fix loading.
* empty
* address benjamin's feedback.
2024-06-05 08:15:30 +04:00
Sayak Paul
a8ad6664c2
[Hunyuan] feat: support chunked ff. ( #8397 )
...
feat: support chunked ff.
2024-06-05 08:12:18 +04:00
Sayak Paul
14f7b545bd
[Hunyuan DiT] feat: enable fusing qkv projections when doing attention ( #8396 )
...
* feat: introduce qkv fusion for Hunyuan
* fix copies
2024-06-05 07:58:03 +04:00
leaps
07cd20041c
Update code example in pipeline_stable_unclip_img2img.py EXAMPLE_DOC_STRING ( #8401 )
...
Update code example in pipeline_stable_unclip_img2img.py
Previous code caused an error when run
2024-06-04 17:22:46 -10:00
Sayak Paul
6ddbf6222c
[Transformer2DModel] Handle norm_type safely while remapping ( #8370 )
...
* handle norm_type of transformer2d_model safely.
* log an info when old model class is being returned.
* Apply suggestions from code review
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* remove extra stuff
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2024-06-04 13:39:19 +04:00
Sayak Paul
3ff39e8e86
[HunyuanDiT] minor docs changes in hunyuandit ( #8395 )
...
minor docs changes in hunyuandit
2024-06-04 12:18:53 +04:00
townwish4git
6be43bd855
Fix AsymmetricAutoencoderKL forward ( #8378 )
2024-06-03 17:25:11 -10:00
XCL
413604405f
Tencent Hunyuan Team: add HunyuanDiT related updates ( #8240 )
...
* Hunyuan Team: add HunyuanDiT related updates
---------
Co-authored-by: XCLiu <liuxc1996@gmail.com >
Co-authored-by: yiyixuxu <yixu310@gmail.com >
2024-06-01 12:41:21 -10:00
39th president of the United States, probably
bc108e1533
Fix DREAM training ( #8302 )
...
Co-authored-by: Jimmy <39@🇺🇸 .com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-06-01 11:27:57 +04:00
Sayak Paul
983dec3bf7
[Core] Introduce class variants for Transformer2DModel ( #7647 )
...
* init for patches
* finish patched model.
* continuous transformer
* vectorized transformer2d.
* style.
* inits.
* fix-copies.
* introduce DiTTransformer2DModel.
* fixes
* use REMAPPING as suggested by @DN6
* better logging.
* add pixart transformer model.
* inits.
* caption_channels.
* attention masking.
* fix use_additional_conditions.
* remove print.
* debug
* flatten
* fix: assertion for sigma
* handle remapping for modeling_utils
* add tests for dit transformer2d
* quality
* placeholder for pixart tests
* pixart tests
* add _no_split_modules
* add docs.
* check
* check
* check
* check
* fix tests
* fix tests
* move Transformer output to modeling_output
* move errors better and bring back use_additional_conditions attribute.
* add unnecessary things from DiT.
* clean up pixart
* fix remapping
* fix device_map things in pixart2d.
* replace Transformer2DModel with appropriate classes in dit, pixart tests
* empty
* legacy mixin classes./
* use a remapping dict for fetching class names.
* change to specifc model types in the pipeline implementations.
* move _fetch_remapped_cls_from_config to modeling_loading_utils.py
* fix dependency problems.
* add deprecation note.
2024-05-31 13:40:27 +05:30
Dhruv Nair
f9fa8a868c
Change checkpoint key used to identify CLIP models in single file checkpoints ( #8319 )
...
update
2024-05-31 11:20:31 +05:30
Jonah
05be622b1c
Fix depth pipeline "input/weight type should be the same" error at fp16 ( #8321 )
...
Fix "input/weight type should be the same"
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-05-30 13:59:49 -10:00
Dhruv Nair
42cae93b94
Fix StableDiffusionPipeline when text_encoder=None ( #8297 )
...
* update
* update
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-05-29 09:00:51 -10:00
Tolga Cangöz
a2ecce26bc
Fix Copying Mechanism typo/bug ( #8232 )
...
* Fix copying mechanism typos
* fix copying mecha
* Revert, since they are in TODO
* Fix copying mechanism
2024-05-29 09:37:18 -07:00
Tolga Cangöz
f4a44b7707
Simplify platform_info assignment in diffusers-cli env ( #8298 )
...
chore: Simplify `platform_info` assignment
2024-05-29 17:57:42 +05:30
Sayak Paul
581d8aacf7
post release v0.28.0 ( #8286 )
...
* post release v0.28.0
* style
2024-05-29 07:13:22 +05:30
Sayak Paul
ba1bfac20b
[Core] Refactor IPAdapterPlusImageProjection a bit ( #7994 )
...
* use IPAdapterPlusImageProjectionBlock in IPAdapterPlusImageProjection
* reposition IPAdapterPlusImageProjection
* refactor complete?
* fix heads param retrieval.
* update test dict creation method.
2024-05-29 06:30:47 +05:30