1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-24 20:59:27 +03:00
Commit Graph

3400 Commits

Author SHA1 Message Date
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
Patrick von Platen
b135b6e905 [From_pretrained] Fix warning (#5948) 2023-11-27 14:35:19 +01:00
T. Xu
14a0d21d2e [Community Pipeline] Diffusion Posterior Sampling for General Noisy Inverse Problems (#5939)
* [community pipeline] dps impl

* add type checking

* pass ruff check

* ruff formatter
2023-11-27 14:29:42 +01:00
Dhruv Nair
8bc42512fe remove post quant conv 2023-11-27 13:27:46 +00:00
Patrick von Platen
ebf581e85f [Tests] Make sure that we don't run tests multiple times (#5949)
* [Tests] Make sure that we don't run tests mulitple times

* [Tests] Make sure that we don't run tests mulitple times

* [Tests] Make sure that we don't run tests mulitple times
2023-11-27 14:18:56 +01: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
55b4d09080 fix upcasting 2023-11-27 14:11:26 +01:00
patil-suraj
c452d9c042 up 2023-11-27 13:59:30 +01:00
patil-suraj
ee9f7d2493 make added_time_ids is tensor 2023-11-27 13:55:02 +01:00
Dhruv Nair
8620851aa0 update forward pass for gradient checkpointing 2023-11-27 12:50:58 +00:00
patil-suraj
90d8e832f8 upcast vae 2023-11-27 13:50:10 +01:00
Viktor Grygorchuk
20f0cbc88f fix: error on device for lpw_stable_diffusion_xl pipeline if pipe.enable_sequential_cpu_offload() enabled (#5885)
fix: set device for pipe.enable_sequential_cpu_offload()
2023-11-27 13:47:47 +01:00
patil-suraj
18930e0b85 doc 2023-11-27 13:40:30 +01:00
Chi
d72a24b790 Replace multiple variables with one variable. (#5715)
* I added a new doc string to the class. This is more flexible to understanding other developers what are doing and where it's using.

* Update src/diffusers/models/unet_2d_blocks.py

This changes suggest by maintener.

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

* Update src/diffusers/models/unet_2d_blocks.py

Add suggested text

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

* Update unet_2d_blocks.py

I changed the Parameter to Args text.

* Update unet_2d_blocks.py

proper indentation set in this file.

* Update unet_2d_blocks.py

a little bit of change in the act_fun argument line.

* I run the black command to reformat style in the code

* Update unet_2d_blocks.py

similar doc-string add to have in the original diffusion repository.

* I enhanced the code by replacing multiple redundant variables with a single variable, as they all served the same purpose. Additionally, I utilized the get_activation function for improved flexibility in choosing activation functions.

* Using as black package to reformated my file

* reverte some changes

* Remove conv_out_padding variables and using as conv_in_padding

* conv_out_padding create and add them into the code.

* run black command to solving styling problem

* add little bit space between comment and import statement

* I am utilizing the ruff library to address the style issues in my Makefile.

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2023-11-27 13:34:52 +01:00
ginjia
d3cda804e7 add LoRA weights load and fuse support for IPEX pipeline (#5920)
add IPEX pipeline LoRA weights loading support
2023-11-27 13:32:43 +01:00
patil-suraj
847bd0a479 fix copies 2023-11-27 13:23:31 +01:00
dg845
07eac4d65a Fix LCM Stable Diffusion distillation bug related to parsing unet_time_cond_proj_dim (#5893)
* Fix bug related to parsing unet_time_cond_proj_dim.

* Fix analogous bug in the SD-XL LCM distillation script.
2023-11-27 13:00:40 +01:00
Iván de Prado
c079cae3d4 Avoid computing min() that is expensive when do_normalize is False in the image processor (#5896)
Avoid computing min() that is expensive when do_normalize is False

Avoid extra computing when do_normalize is False
2023-11-27 12:46:26 +01:00
Wang, Yi
c7bfb8b22a set the model to train state before accelerator prepare (#5099)
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2023-11-27 12:43:49 +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
patil-suraj
a08ef009d1 use math for log 2023-11-27 12:16:02 +01:00
patil-suraj
804bdebe51 Merge branch 'test-v' of https://github.com/huggingface/diffusers into test-v 2023-11-27 12:01:11 +01:00
patil-suraj
a193e49dff use c_noise values for timesteps 2023-11-27 12:01:08 +01:00
Dhruv Nair
c9d1727613 clean up 2023-11-27 11:00:02 +00:00
Sayak Paul
3f7c3511dc [Core] add support for gradient checkpointing in transformer_2d (#5943)
add support for gradient checkpointing in transformer_2d
2023-11-27 16:21:12 +05:30
Dhruv Nair
82cf60828f Merge branch 'test-v' of https://github.com/huggingface/diffusers into test-v 2023-11-27 10:50:12 +00:00
Dhruv Nair
26ed460265 clean up 2023-11-27 10:49:58 +00:00
Dhruv Nair
403a81c30d clean up temp decoder 2023-11-27 10:21:22 +00:00
patil-suraj
1b3cf2db5e Merge branch 'test-v' of https://github.com/huggingface/diffusers into test-v 2023-11-27 11:13:20 +01:00
patil-suraj
b8d84c4320 fix norm eps in TransformerSpatioTemporalModel 2023-11-27 11:13:18 +01:00
Dhruv Nair
3fbe123d84 make temb optional in Decoder mid block 2023-11-27 10:09:41 +00: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
6adae54046 clean TransformerSpatioTemporalModel 2023-11-27 10:34:44 +01: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
6d2e19f746 [Examples] Allow downloading variant model files (#5531)
* add variant

* add variant

* Apply suggestions from code review

* reformat

* fix: textual_inversion.py

* fix: variant in model_info

---------

Co-authored-by: sayakpaul <spsayakpaul@gmail.com>
2023-11-27 10:43:20 +05:30
patil-suraj
f651c12ef8 don't scale image latents 2023-11-26 17:13:04 +01:00
patil-suraj
d614a33a09 use AutoencoderKLTemporalDecoder 2023-11-26 17:00:22 +01:00
patil-suraj
13b646edd3 remove hack 2023-11-26 16:59:21 +01:00
patil-suraj
cb49cbdd29 add pipeline and vae in init 2023-11-26 16:58:59 +01:00
patil-suraj
1ce8ff51e6 accept fps as arg 2023-11-26 16:20:22 +01:00
patil-suraj
fdd182f335 allow passing PIL to export_video 2023-11-26 16:19:25 +01:00
patil-suraj
2a46326c25 up 2023-11-26 16:07:24 +01:00
patil-suraj
e34e9d9a33 take guidance scale as input 2023-11-26 16:06:44 +01:00