Skip to content

pull the latest code #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Dec 8, 2024
Merged

pull the latest code #1

merged 57 commits into from
Dec 8, 2024

Conversation

staoxiao
Copy link
Owner

@staoxiao staoxiao commented Dec 8, 2024

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

ParagEkbote and others added 30 commits November 26, 2024 23:05
* Add Notebooks for Community Scripts
in  ReadME.

* Minor Script Improvement.
* add model/pipeline

Co-authored-by: Sayak Paul <[email protected]>
…eteScheduler` (#10001)

Add beta, exponential and karras sigmas to FlowMatchEuler
* 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 <[email protected]>
…#9874)

* [Fix] fix bugs of  regional_prompting pipeline

* [Feat] add base prompt feature

* [Fix] fix __init__ pipeline error

* [Fix] delete unused args

* [Fix] improve string handling

* [Docs] docs to use_base in regional_prompting

* make style

---------

Co-authored-by: Sayak Paul <[email protected]>
* Add reference_attn & reference_adain support for sdxl with other controlnet

* Update README.md

* Update README.md by replacing human example with a cat one

Replace human example with a cat one

* Replace default human example with a cat one

* Use example images from huggingface documentation-images repository

---------

Co-authored-by: Sayak Paul <[email protected]>
change image_gen_aux repo url
* 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

* enable

* enable esingle g

* add 2 more

* update decorator

* update

* update

* update

* Update tests/pipelines/deepfloyd_if/test_if.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update src/diffusers/utils/testing_utils.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff.py

Co-authored-by: Dhruv Nair <[email protected]>

* Update tests/pipelines/animatediff/test_animatediff_controlnet.py

Co-authored-by: Dhruv Nair <[email protected]>

* update float16

* no unitest.skipt

* update

* apply style check

* adapt style

---------

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Dhruv Nair <[email protected]>
* add quantization to nightly CI.

* prep.

* fix lib name.

* remove deps that are not needed.

* fix slice.
Minor fixes and script improvement in evaluation
docs.
* fix link in the docs

* fix same issue for ko
* Workaround for upscale with large output tensors.

Fixes #10040.

* Fix scale when output_size is given

* Style

---------

Co-authored-by: Sayak Paul <[email protected]>
* fix: missing AutoencoderKL lora adapter

* fix

---------

Co-authored-by: Sayak Paul <[email protected]>
…mo (#9579)

* Fix some documentation in ./src/diffusers/models/embeddings.py as demonstration.


---------

Co-authored-by: DaAccursed05 <[email protected]>
Co-authored-by: Aryan <[email protected]>
Co-authored-by: Aryan <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
…9932)

* fix progress bar updates in SD 1.5 PAG Img2Img pipeline



---------

Co-authored-by: Vinh H. Pham <[email protected]>
Co-authored-by: Sayak Paul <[email protected]>
* Add Diffuser Notebooks for Community Scripts.

* Add missing link.

* Styling Improvement.
* Fix wrong output on 3n-1 steps count

* Add sde handling to 3 order

* make

* copies

---------

Co-authored-by: hlky <[email protected]>
* add data_dir parameter to load_dataset

---------

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: hlky <[email protected]>
* Avoid creating a progress bar when it is disabled.

This is useful when exporting a pipeline, and allows a compiler to avoid trying to compile away tqdm.

* Prevent the PyTorch compiler from compiling progress bars.

* Update pipeline_utils.py
AnandK27 and others added 27 commits December 3, 2024 13:57
…railing" and "linspace" options (#9384)

* Update scheduling_ddpm.py

* fix copies

---------

Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: hlky <[email protected]>
* Fix multi-prompt inference

Fix generation of multiple images with multiple prompts, e.g len(prompts)>1, num_images_per_prompt>1

* make

* fix copies

---------

Co-authored-by: Nikita Balabin <[email protected]>
* Test `skip_guidance_layers` in pipelines

* Move to test_pipeline_stable_diffusion_3
Sometimes, the decoder might lack parameters and only buffers (e.g., this happens when we manually need to convert all the parameters to buffers — e.g. to avoid packing fp16 and fp32 parameters with FSDP)
* add: autoencoderkl tests

* autoencodertiny.

* fix

* asymmetric autoencoder.

* more

* integration tests for stable audio decoder.

* consistency decoder vae tests

* remove grad check from consistency decoder.

* cog

* bye test_models_vae.py

* fix

* fix

* remove allegro

* fixes

* fixes

* fixes

---------

Co-authored-by: Dhruv Nair <[email protected]>
…h bnb components (#9840)

* allow device placement when using bnb quantization.

* warning.

* tests

* fixes

* docs.

* require accelerate version.

* remove print.

* revert to()

* tests

* fixes

* fix: missing AutoencoderKL lora adapter (#9807)

* fix: missing AutoencoderKL lora adapter

* fix

---------

Co-authored-by: Sayak Paul <[email protected]>

* fixes

* fix condition test

* updates

* updates

* remove is_offloaded.

* fixes

* better

* empty

---------

Co-authored-by: Emmanuel Benazera <[email protected]>
Update broken links in ReadME.
* add multiple prompts to flux redux

---------

Co-authored-by: hlky <[email protected]>
* fix a judging state dict bug in ip_adapter.py

* make

---------

Co-authored-by: hlky <[email protected]>
… index (#10065)

* wip

---------

Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: Sayak Paul <[email protected]>
* load_lora_adapter

* save

---------

Co-authored-by: Sayak Paul <[email protected]>
…10069)

* update

* apply review suggestion

---------

Co-authored-by: Sayak Paul <[email protected]>
* fix condition argument in xfail.

* revert init changes.
* xfail incompatible SD configs.

* fix
* Fix get_1d_rotary_pos_embed in embedding.py

* Update embeddings.py

---------

Co-authored-by: hlky <[email protected]>
* chore: initial draft

* Apply suggestions from code review

Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Steven Liu <[email protected]>

* chore: link in place

* chore: review suggestions

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* chore: review suggestions

* Update docs/source/en/quantization/bitsandbytes.md

Co-authored-by: Steven Liu <[email protected]>

* review suggestions

* chore: review suggestions

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* adding same changes to 4 bit section

* review suggestions

---------

Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
…elines (#9986)

* Added example of model search.

* Combine processing into one file

* Add parameters for base model

* Bug Fixes

* bug fix

* Create README.md

* Update search_for_civitai_and_HF.py

* Create requirements.txt

* bug fix

* Update README.md

* bug fix

* Correction of typos

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* apply the changes

* Replace search_for_civitai_and_HF.py with pipeline_easy.py

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update examples/model_search/README.md

Co-authored-by: Steven Liu <[email protected]>

* Update README.md

* Organize the table of parameters

* Update README.md

* Update README.md

* Update README.md

* make style

* Fixing the style of pipeline

* Fix pipeline style

* fix

---------

Co-authored-by: Steven Liu <[email protected]>
…8x compression ratio); (#9708)

* first add a script for DC-AE;

* DC-AE init

* replace triton with custom implementation

* 1. rename file and remove un-used codes;

* no longer rely on omegaconf and dataclass

* replace custom activation with diffuers activation

* remove dc_ae attention in attention_processor.py

* iinherit from ModelMixin

* inherit from ConfigMixin

* dc-ae reduce to one file

* update downsample and upsample

* clean code

* support DecoderOutput

* remove get_same_padding and val2tuple

* remove autocast and some assert

* update ResBlock

* remove contents within super().__init__

* Update src/diffusers/models/autoencoders/dc_ae.py

Co-authored-by: YiYi Xu <[email protected]>

* remove opsequential

* update other blocks to support the removal of build_norm

* remove build encoder/decoder project in/out

* remove inheritance of RMSNorm2d from LayerNorm

* remove reset_parameters for RMSNorm2d

Co-authored-by: YiYi Xu <[email protected]>

* remove device and dtype in RMSNorm2d __init__

Co-authored-by: YiYi Xu <[email protected]>

* Update src/diffusers/models/autoencoders/dc_ae.py

Co-authored-by: YiYi Xu <[email protected]>

* Update src/diffusers/models/autoencoders/dc_ae.py

Co-authored-by: YiYi Xu <[email protected]>

* Update src/diffusers/models/autoencoders/dc_ae.py

Co-authored-by: YiYi Xu <[email protected]>

* remove op_list & build_block

* remove build_stage_main

* change file name to autoencoder_dc

* move LiteMLA to attention.py

* align with other vae decode output;

* add DC-AE into init files;

* update

* make quality && make style;

* quick push before dgx disappears again

* update

* make style

* update

* update

* fix

* refactor

* refactor

* refactor

* update

* possibly change to nn.Linear

* refactor

* make fix-copies

* replace vae with ae

* replace get_block_from_block_type to get_block

* replace downsample_block_type from Conv to conv for consistency

* add scaling factors

* incorporate changes for all checkpoints

* make style

* move mla to attention processor file; split qkv conv to linears

* refactor

* add tests

* from original file loader

* add docs

* add standard autoencoder methods

* combine attention processor

* fix tests

* update

* minor fix

* minor fix

* minor fix & in/out shortcut rename

* minor fix

* make style

* fix paper link

* update docs

* update single file loading

* make style

* remove single file loading support; todo for DN6

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* add abstract

---------

Co-authored-by: Junyu Chen <[email protected]>
Co-authored-by: YiYi Xu <[email protected]>
Co-authored-by: chenjy2003 <[email protected]>
Co-authored-by: Aryan <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
* fixed a dtype bfloat16 bug in torch_utils.py

when generating 1024*1024 image with bfloat16 dtype, there is an exception:
  File "/opt/conda/lib/python3.10/site-packages/diffusers/utils/torch_utils.py", line 107, in fourier_filter
    x_freq = fftn(x, dim=(-2, -1))
RuntimeError: Unsupported dtype BFloat16

* remove whitespace in torch_utils.py

* Update src/diffusers/utils/torch_utils.py

* Update torch_utils.py

---------

Co-authored-by: hlky <[email protected]>
depcrecate save_attn_procs().
* update ptxla example

---------

Co-authored-by: Juan Acevedo <[email protected]>
Co-authored-by: Pei Zhang <[email protected]>
Co-authored-by: Pei Zhang <[email protected]>
Co-authored-by: Sayak Paul <[email protected]>
Co-authored-by: Pei Zhang <[email protected]>
Co-authored-by: hlky <[email protected]>
* support sd3.5 in controlnet

---------

Co-authored-by: YiYi Xu <[email protected]>
@staoxiao staoxiao merged commit cdd500e into staoxiao:main Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.