Dhruv Nair
56e8fca572
Merge branch 'main' into test-v
2023-11-27 13:36:38 +00:00
Dhruv Nair
c5941a26a4
Merge branch 'test-v' of https://github.com/huggingface/diffusers into test-v
2023-11-27 13:35:36 +00:00
Dhruv Nair
8bc42512fe
remove post quant conv
2023-11-27 13:27:46 +00:00
Patrick von Platen
e550163b9f
[Vae] Make sure all vae's work with latent diffusion models ( #5880 )
...
* add comments to explain the code better
* add comments to explain the code better
* add comments to explain the code better
* add comments to explain the code better
* add comments to explain the code better
* fix more
* fix more
* fix more
* fix more
* fix more
* fix more
2023-11-27 14:17:47 +01:00
patil-suraj
847bd0a479
fix copies
2023-11-27 13:23:31 +01:00
dg845
67d070749a
Add Custom Timesteps Support to LCMScheduler and Supported Pipelines ( #5874 )
...
* Add custom timesteps support to LCMScheduler.
* Add custom timesteps support to StableDiffusionPipeline.
* Add custom timesteps support to StableDiffusionXLPipeline.
* Add custom timesteps support to remaining Stable Diffusion pipelines which support LCMScheduler (img2img, inpaint).
* Add custom timesteps support to remaining Stable Diffusion XL pipelines which support LCMScheduler (img2img, inpaint).
* Add custom timesteps support to StableDiffusionControlNetPipeline.
* Add custom timesteps support to T21 Stable Diffusion (XL) Adapters.
* Clean up Stable Diffusion inpaint tests.
* Manually add support for custom timesteps to AltDiffusion pipelines since make fix-copies doesn't appear to work correctly (it deletes the whole pipeline).
* make style
* Refactor pipeline timestep handling into the retrieve_timesteps function.
2023-11-27 12:39:14 +01:00
Dhruv Nair
3178b16b17
update
2023-11-27 11:37:52 +00:00
Aryan V S
9c357bda3f
Deprecate KarrasVeScheduler and ScoreSdeVpScheduler ( #5269 )
...
* deprecated: KarrasVeScheduler, ScoreSdeVpScheduler
* delete tests relevant to deprecated schedulers
* chore: run make style
* fix: import error caused due to incorrect _import_structure after deprecation
* fix: ScoreSdeVpScheduler was not importable from diffusers
* remove import added by assumption
* Update src/diffusers/schedulers/__init__.py as suggested by @patrickvonplaten
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* make it a part deprecated
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* Fix
* fix
* fix doc
* fix doc....again.......
* remove karras_ve test folder
Co-Authored-By: YiYi Xu <yixu310@gmail.com >
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2023-11-27 12:33:02 +01:00
Dhruv Nair
f7cf8c338c
clean up
2023-11-27 09:53:56 +00:00
Dhruv Nair
ab8076f234
Merge branch 'test-v' of https://github.com/huggingface/diffusers into test-v
2023-11-27 09:50:00 +00:00
Dhruv Nair
7b6a0d48c6
add slow svd test
2023-11-27 09:45:00 +00:00
patil-suraj
af85fb1bc1
clean up unet
2023-11-27 10:03:40 +01:00
Dhruv Nair
760333d524
add unet tests
2023-11-27 08:12:02 +00:00
Junsong Chen
7d6f30e89b
[Fix: pixart-alpha] random 512px resolution bug ( #5842 )
...
* [Fix: pixart-alpha]
add ASPECT_RATIO_512_BIN in use_resolution_binning for random 512px image generation.
* add slow test file for 512px generation without resolution binning
* fix: slow tests for resolution binning.
---------
Co-authored-by: jschen <chenjunsong4@h-partners.com >
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-11-27 13:35:35 +05:30
Patrick von Platen
b978334d71
[@cene555][Kandinsky 3.0] Add Kandinsky 3.0 ( #5913 )
...
* finalize
* finalize
* finalize
* add slow test
* add slow test
* add slow test
* Fix more
* add slow test
* fix more
* fix more
* fix more
* fix more
* fix more
* fix more
* fix more
* fix more
* fix more
* Better
* Fix more
* Fix more
* add slow test
* Add auto pipelines
* add slow test
* Add all
* add slow test
* add slow test
* add slow test
* add slow test
* add slow test
* Apply suggestions from code review
* add slow test
* add slow test
2023-11-24 17:46:00 +01:00
YiYi Xu
ba352aea29
[feat] IP Adapters (author @okotaku ) ( #5713 )
...
* add ip-adapter
---------
Co-authored-by: okotaku <to78314910@gmail.com >
Co-authored-by: sayakpaul <spsayakpaul@gmail.com >
Co-authored-by: yiyixuxu <yixu310@gmail,com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2023-11-21 07:34:30 -10:00
dg845
dc21498b43
Update LCMScheduler Inference Timesteps to be More Evenly Spaced ( #5836 )
...
* Change LCMScheduler.set_timesteps to pick more evenly spaced inference timesteps.
* Change inference_indices implementation to better match previous behavior.
* Add num_inference_steps=26 test case to test_inference_steps.
* run CI
---------
Co-authored-by: patil-suraj <surajp815@gmail.com >
2023-11-20 15:46:10 +01:00
Kashif Rasul
6b04d61cf6
[Styling] stylify using ruff ( #5841 )
...
* ruff format
* not need to use doc-builder's black styling as the doc is styled in ruff
* make fix-copies
* comment
* use run_ruff
2023-11-20 11:48:34 +01:00
Will Berman
2a84e8bb5a
fix memory consistency decoder test ( #5828 )
...
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-11-17 09:31:01 -08:00
Suraj Patil
64cbd8e27a
Support LCM in ControlNet and Adapter pipelines. ( #5822 )
...
* support lcm
* fix tests
* fix tests
2023-11-16 14:59:50 +01:00
Dhruv Nair
cdadb023a2
Make Video Tests faster ( #5787 )
...
* update test
* update
2023-11-15 10:56:01 +05:30
Sayak Paul
ded93f798c
[Refactor] refactor loaders.py to make it cleaner and leaner. ( #5771 )
...
* refactor loaders.py to make it cleaner and leaner.
* refactor loaders init
* inits.
* textual inversion to the init.
* inits.
* remove certain modules from the main init.
* AttnProcsLayers
* fix imports
* avoid circular import.
* fix circular import pt 2.
* address PR comments
* imports
* fix: imports.
* remove from main init for avoiding circular deps.
* remove spurious deps.
* fix-copies.
* fix imports.
* more debug
* more debug
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-14 12:54:28 +01:00
Sayak Paul
a5720e9e31
[PixArt-Alpha] Fix PixArt-Alpha pipeline when number of images to generate is more than 1 ( #5752 )
...
* does this fix things?
* attention mask use
* attention mask order
* better masking.
* add: tesrt
* remove mask_featur
* test
* debug
* fix: tests
* deprecate mask_feature
* add deprecation test
* add slow test
* add print statements to retrieve the assertion values.
* fix for the 1024 fast tes
* fix tesy
* fix the remaining
* Apply suggestions from code review
* more debug
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-14 12:45:35 +01:00
Sourab Mangrulkar
9c8eca702c
add lora delete feature ( #5738 )
...
* add lora delete feature
* added tests and changed condition
* deal with corner cases
* more corner cases
* rename to `delete_adapter_layers` for consistency
---------
Co-authored-by: younesbelkada <younesbelkada@gmail.com >
2023-11-14 10:51:13 +01:00
Sayak Paul
ed759f0aee
[PixArt-Alpha] Introduce resolution binning ( #5739 )
...
* feat: add resolution binning
Co-authored-by: lawrence-cj <jschen@mail.dlut.edu.cn >
* rename
* debug
* add :test
* remove unused variable
* set resolution_binning to False.
---------
Co-authored-by: lawrence-cj <jschen@mail.dlut.edu.cn >
2023-11-14 08:34:59 +05:30
Kashif Rasul
c9f847a70f
[Wuerstchen] fix for when USE_PEFT_BACKEND is True ( #5704 )
...
* fix for when USE_PEFT_BACKEND is True
* Update modeling_wuerstchen_prior.py
* revert change
* add lora tests
2023-11-13 18:37:55 +01:00
Sayak Paul
1477865e48
post release v0.23.0 ( #5730 )
...
* post release
* fix: variant test
* up
* fix: test
2023-11-10 16:35:44 +05:30
Patrick von Platen
3d7eaf83d7
LCM Add Tests ( #5707 )
...
* lcm add tests
* uP
* Fix all
* uP
* Add
* all
* uP
* uP
* uP
* uP
* uP
* uP
* uP
2023-11-09 15:45:11 +01:00
Patrick von Platen
bf406ea886
Correct consist dec ( #5722 )
...
* uP
* Update src/diffusers/models/consistency_decoder_vae.py
* uP
* uP
2023-11-09 13:10:24 +01:00
Will Berman
2fd46405cd
consistency decoder ( #5694 )
...
* consistency decoder
* rename
* Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py
* uP
* Apply suggestions from code review
* uP
* uP
* uP
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-11-09 12:21:41 +01:00
Dhruv Nair
65ef7a0c5c
Fix prompt bug in AnimateDiff ( #5702 )
...
* fix prompt bug
* add test
2023-11-08 21:49:09 +01:00
Sayak Paul
78be400761
[PixArt-Alpha] fix mask feature condition. ( #5695 )
...
* fix mask feature condition.
* debug
* remove identical test
* set correct
* Empty-Commit
2023-11-08 17:42:46 +05:30
Patrick von Platen
c803a8f8c0
[LCM] Fix img2img ( #5698 )
...
* [LCM] Fix img2img
* make fix-copies
* make fix-copies
* make fix-copies
* up
2023-11-08 11:51:46 +01:00
YiYi Xu
69996938cf
speed up Shap-E fast test ( #5686 )
...
skip rendering
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2023-11-08 11:43:20 +01:00
dg845
aab6de22c3
Improve LCMScheduler ( #5681 )
...
* Refactor LCMScheduler.step such that prev_sample == denoised at the last timestep in the schedule.
* Make timestep scaling when calculating boundary conditions configurable.
* Reparameterize timestep_scaling to be a multiplicative rather than division scaling.
* make style
* fix dtype conversion
* make style
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-07 18:48:18 +01:00
Sayak Paul
1dc231d14a
[PixArt-Alpha] Support non-square images ( #5672 )
...
* debug
* support non-square images
* add: test
* fix: test
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-07 18:21:33 +01:00
Sayak Paul
a8523bffa8
[PixArt-Alpha] fix mask_feature so that precomputed embeddings work with a batch size > 1 ( #5677 )
...
* fix embeds
* remove todo
* add: test
* better name
2023-11-07 17:12:47 +01:00
Dhruv Nair
71f56c771a
Model tests xformers fixes ( #5679 )
...
* fix model xformers test
* update
2023-11-07 20:50:41 +05:30
Sayak Paul
d61889fc17
[Feat] PixArt-Alpha ( #5642 )
...
* init pixart alpha pipeline
* fix: import
* script
* script
* script
* add: vae to the pipeline
* add: vae_scale_factor
* add: checkpoint_path
* clean conversion script a bit.
* size embeddings.
* fix: size embedding
* update scrip
* support for interpolation of position embedding.
* support for conditioning.
* ..
* ..
* ..
* final layer
* final layer
* align if encode_prompt
* support for caption embedding
* refactor
* refactor
* refactor
* start cross attention
* start cross attention
* cross_attention_dim
* cross
* cross
* support for resolution and aspect_ratio
* support for caption projection
* refactor patch embeddings
* batch_size
* up
* commit
* commit
* commit.
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze
* squeeze.
* squeeze.
* fix final block./
* fix final block./
* fix final block./
* clean
* fix: interpolation scale.
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging'
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* make --checkpoint_path non-required.
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* debugging
* remove num_tokens
* timesteps -> timestep
* timesteps -> timestep
* timesteps -> timestep
* timesteps -> timestep
* timesteps -> timestep
* timesteps -> timestep
* debug
* debug
* update conversion script.
* update conversion script.
* update conversion script.
* debug
* debug
* debug
* clean
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* debug
* deug
* debug
* debug
* debug
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* clean
* fix
* fix
* boom
* boom
* some changes
* boom
* save
* up
* remove i
* fix more tests
* DPMSolverMultistepScheduler
* fix
* offloading
* fix conversion script
* fix conversion script
* remove print
* remove support for negative prompt embeds.
* typo.
* remove extra kwargs
* bring conversion script to where it was
* fix
* trying mu luck
* trying my luck again
* again
* again
* again
* clean up
* up
* up
* update example
* support for 512
* remove spacing
* finalize docs.
* test debug
* fix: assertion values.
* debug
* debug
* debug
* fix: repeat
* remove prints.
* Apply suggestions from code review
* Apply suggestions from code review
* Correct more
* Apply suggestions from code review
* Change all
* Clean more
* fix more
* Fix more
* Fix more
* Correct more
* address patrick's comments.
* remove unneeded args
* clean up pipeline.
* sty;e
* make the use of additional conditions better conditioned.
* None better
* dtype
* height and width validation
* add a note about size brackets.
* fix
* spit out slow test outputs.
* fix?
* fix optional test
* fix more
* remove unneeded comment
* debug
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-06 08:40:04 +01:00
YiYi Xu
2b23ec82e8
add callbacks to denoising step ( #5427 )
...
* draft1
* update
* style
* move to the end of loop
* update
* update callbak_on_step_end_inputs
* Revert "update"
This reverts commit 5f9b153183 .
* Revert "update callbak_on_step_end_inputs"
This reverts commit 44889f4dab .
* update
* update test required_optional_params
* remove self.lora_scale
* img2img
* inpaint
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* fix
* apply feedbacks on img2img + inpaint: keep only important pipeline attributes
* depth
* pix2pix
* make _callback_tensor_inputs an class variable so that we can use it for testing
* add a basic tst for callback
* add a read-only tensor input timesteps + fix tests
* add second test for callback cfg
* sdxl
* sdxl img2img
* sdxl inpaint
* kandinsky prior
* kandinsky decoder
* kandinsky img2img + combined
* kandinsky inpaint
* fix copies
* fix
* consistent default inputs
* fix copies
* wuerstchen_prior prior
* test_wuerstchen_decoder + fix test for prior
* wuerstchen_combined pipeline + skip tests
* skip test for kandinsky combined
* lcm
* remove timesteps etc
* add doc string
* copies
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* make style and improve tests
* up
* up
* fix more
* fix cfg test
* tests for callbacks
* fix for real
* update
* lcm img2img
* add doc
* add doc page to index
---------
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 >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-11-05 20:00:41 +01:00
Sayak Paul
dd9a5caf61
[Core] support for tiny autoencoder in img2img ( #5636 )
...
* support for tiny autoencoder in img2img
Co-authored-by: slep0v <37597789+slep0v@users.noreply.github.com >
* copy fix
* line space
* line space
* clean up
* spit out expected value
* spit out expected value
* assertion values.
* assertion values.
---------
Co-authored-by: slep0v <37597789+slep0v@users.noreply.github.com >
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-03 15:31:53 +01:00
dg845
beb8f216ed
Clean up LCM Pipeline and Test Code. ( #5641 )
...
* Clean up LCM pipeline and pipeline test code.
* Add comment for LCM img2img sampling loop.
2023-11-03 13:50:48 +01:00
YiYi Xu
d122206466
fix a bug in AutoPipeline.from_pipe() when creating a controlnet pipeline from an existing controlnet ( #5638 )
...
fix
Co-authored-by: yiyixuxu <yixu310@gmail,com>
2023-11-03 12:14:19 +01:00
Patrick von Platen
072e00897a
[LCM] Make sure img2img works ( #5632 )
...
* [LCM] Clean up implementations
* Add all
* correct more
* correct more
* finish
* up
2023-11-02 19:50:47 +01:00
Dhruv Nair
2a8cf8e39f
Animatediff Proposal ( #5413 )
...
* draft design
* clean up
* clean up
* clean up
* clean up
* clean up
* clean up
* clean up
* clean up
* clean up
* update pipeline
* clean up
* clean up
* clean up
* add tests
* change motion block
* clean up
* clean up
* clean up
* update
* update
* update
* update
* update
* update
* update
* update
* clean up
* update
* update
* update model test
* update
* update
* update
* update
* make style
* update
* fix embeddings
* update
* merge upstream
* max fix copies
* fix bug
* fix mistake
* add docs
* update
* clean up
* update
* clean up
* clean up
* fix docstrings
* fix docstrings
* update
* update
* clean up
* update
2023-11-02 15:04:03 +01:00
Patrick von Platen
9723f8a557
[Tests] Fix cpu offload test ( #5626 )
...
* fix more
* fix more
2023-11-02 12:49:58 +01:00
Younes Belkada
02ba50c610
[PEFT / LoRA] Fix civitai bug when network alpha is an empty dict ( #5608 )
...
* fix civitai bug
* add test
* up
* fix test
* added slow test.
* style
* Update src/diffusers/utils/peft_utils.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/utils/peft_utils.py
---------
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
2023-11-01 22:08:22 +01:00
Patrick von Platen
839c2a5ece
fix
2023-11-01 21:39:30 +01:00
ilisparrow
5712c3d2ef
[Core] enable lora for sdxl adapters too and add slow tests. ( #5555 )
...
* Enable lora for sdxl adapters too.
Issue #5516
* fix: assertion values.
* Use numpy_cosine_similarity_distance on the arrays
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* Use numpy_cosine_similarity_distance on the arrays
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* Changed imports orders to pass tests
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
---------
Co-authored-by: Ilias A <iliasamri00@gmail.com >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-11-01 21:25:38 +01:00
clarencechen
151998e1c2
Update final CPU offloading code for more diffusion pipelines ( #5589 )
...
* Update final model offload for more pipelines
Add test to ensure all pipeline components are returned to CPU after
execution with model offloading
* Add comment to explain early UNet offload in Text-to-Video pipeline
* Style
2023-11-01 21:22:56 +01:00