1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00
Commit Graph

2290 Commits

Author SHA1 Message Date
Daniel Gu
7097dd74f5 Update fast tests to use test checkpoints stored on the hub and to better match the reference UniDiffuser implementation. 2023-05-05 07:49:46 -07:00
Daniel Gu
434b255060 Add UniDiffuser classes to __init__ files, modify transformer block to support pre- and post-LN, add fast default tests, fix some bugs. 2023-05-05 07:49:46 -07:00
Will Rice
1d213def63 Add upsample_size to AttnUpBlock2D, AttnDownBlock2D (#3275)
The argument `upsample_size` needs to be added to these modules to allow compatibility with other blocks that require this argument.
2023-05-05 07:23:51 -07:00
Cheng Lu
652dbaad8d Add the SDE variant of DPM-Solver and DPM-Solver++ (#3344)
* add SDE variant of DPM-Solver and DPM-Solver++

* add test

* fix typo

* fix typo
2023-05-05 07:23:51 -07:00
Patrick von Platen
140ab748e8 Fix config dpm (#3343) 2023-05-05 07:23:51 -07:00
Patrick von Platen
458847e25b [Quality] Make style (#3341) 2023-05-05 07:23:51 -07:00
Sayak Paul
b4aa419f9b update controlling generation doc with latest goodies. (#3321) 2023-05-05 07:23:51 -07:00
Cesar Aybar
3e8d3d86ac Update write_own_pipeline.mdx (#3323) 2023-05-05 07:23:51 -07:00
Isamu Isozaki
79295870f7 Added input pretubation (#3292)
* Added input pretubation

* Fixed spelling
2023-05-05 07:23:51 -07:00
Steven Liu
0e8f4f0f49 [docs] Improve LoRA docs (#3311)
* update docs

* add to toctree

* apply feedback
2023-05-05 07:23:51 -07:00
Cheng Lu
7815c41f86 Fix multistep dpmsolver for cosine schedule (suitable for deepfloyd-if) (#3314)
* fix multistep dpmsolver for cosine schedule (deepfloy-if)

* fix a typo

* Update src/diffusers/schedulers/scheduling_dpmsolver_multistep.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Update src/diffusers/schedulers/scheduling_dpmsolver_multistep.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Update src/diffusers/schedulers/scheduling_dpmsolver_multistep.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Update src/diffusers/schedulers/scheduling_dpmsolver_multistep.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Update src/diffusers/schedulers/scheduling_dpmsolver_multistep.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* update all dpmsolver (singlestep, multistep, dpm, dpm++) for cosine noise schedule

* add test, fix style

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2023-05-05 07:23:51 -07:00
Markus Pobitzer
5ea342495a Add Stable Diffusion RePaint to community pipelines (#3320)
* Add Stable Diffsuion RePaint to community pipelines

- Adds Stable Diffsuion RePaint to community pipelines
- Add Readme enty for pipeline

* Fix: Remove wrong import

- Remove wrong import
- Minor change in comments

* Fix: Code formatting of stable_diffusion_repaint

* Fix: ruff errors in stable_diffusion_repaint
2023-05-05 07:23:51 -07:00
Patrick von Platen
5a75a8a153 Correct doc build for patch releases (#3316)
Update build_documentation.yml
2023-05-05 07:23:51 -07:00
Mylo
0d2206459e Fix missing variable assign in DeepFloyd-IF-II (#3315)
Fix missing variable assign

lol
2023-05-05 07:23:51 -07:00
Umar
d38b4d9555 Update stable_diffusion.mdx (#3310)
fixed import statement
2023-05-05 07:23:51 -07:00
Sayak Paul
6e8d065c39 fix: scale_lr and sync example readme and docs. (#3299)
* fix: scale_lr and sync example readme and docs.

* fix doc link.
2023-05-05 07:23:51 -07:00
Patrick von Platen
c8cc4f01ce [Torch 2.0 compile] Fix more torch compile breaks (#3313)
* Fix more torch compile breaks

* add tests

* Fix all

* fix controlnet

* fix more

* Add Horace He as co-author.
>
>
Co-authored-by: Horace He <horacehe2007@yahoo.com>

* Add Horace He as co-author.

Co-authored-by: Horace He <horacehe2007@yahoo.com>

---------

Co-authored-by: Horace He <horacehe2007@yahoo.com>
2023-05-05 07:23:51 -07:00
YiYi Xu
863bb75ea9 Postprocessing refactor img2img (#3268)
* refactor img2img VaeImageProcessor.postprocess

* remove copy from for init, run_safety_checker, decode_latents

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

---------

Co-authored-by: yiyixuxu <yixu@yis-macbook-pro.lan>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2023-05-05 07:23:51 -07:00
Patrick von Platen
6a84a7439d Torch compile graph fix (#3286)
* fix more

* Fix more

* fix more

* Apply suggestions from code review

* fix

* make style

* make fix-copies

* fix

* make sure torch compile

* Clean

* fix test
2023-05-05 07:23:51 -07:00
Ilia Larchenko
c38d004cc2 Typo in tutorial (#3295) 2023-05-05 07:23:51 -07:00
Ilia Larchenko
799015c19c Changed sample[0] to images[0] (#3304)
A pipeline object stores the results in `images` not in `sample`.
Current code blocks don't work.
2023-05-05 07:23:51 -07:00
Will Berman
08fbaaf579 temp disable spectogram diffusion tests (#3278)
The note-seq package throws an error on import because the default installed version of Ipython
is not compatible with python 3.8 which we run in the CI.
https://github.com/huggingface/diffusers/actions/runs/4830121056/jobs/8605954838#step:7:9
2023-05-05 07:23:51 -07:00
YiYi Xu
1b95720f97 [doc] add link to training script (#3271)
add link to training script

Co-authored-by: yiyixuxu <yixu@yis-macbook-pro.lan>
2023-05-05 07:23:51 -07:00
Patrick von Platen
220657b7bd Allow disabling torch 2_0 attention (#3273)
* Allow disabling torch 2_0 attention

* make style

* Update src/diffusers/models/attention.py
2023-05-05 07:23:51 -07:00
Jason Kuan
fd47d7c0ef add constant learning rate with custom rule (#3133)
* add constant lr with rules

* add constant with rules in TYPE_TO_SCHEDULER_FUNCTION

* add constant lr rate with rule

* hotfix code quality

* fix doc style

* change name constant_with_rules to piecewise constant
2023-05-05 07:23:51 -07:00
clarencechen
029a28f06c Diffedit Zero-Shot Inpainting Pipeline (#2837)
* Update Pix2PixZero Auto-correlation Loss

* Add Stable Diffusion DiffEdit pipeline

* Add draft documentation and import code

* Bugfixes and refactoring

* Add option to not decode latents in the inversion process

* Harmonize preprocessing

* Revert "Update Pix2PixZero Auto-correlation Loss"

This reverts commit b218062fed.

* Update annotations

* rename `compute_mask` to `generate_mask`

* Update documentation

* Update docs

* Update Docs

* Fix copy

* Change shape of output latents to batch first

* Update docs

* Add first draft for tests

* Bugfix and update tests

* Add `cross_attention_kwargs` support for all pipeline methods

* Fix Copies

* Add support for PIL image latents

Add support for mask broadcasting

Update docs and tests

Align `mask` argument to `mask_image`

Remove height and width arguments

* Enable MPS Tests

* Move example docstrings

* Fix test

* Fix test

* fix pipeline inheritance

* Harmonize `prepare_image_latents` with StableDiffusionPix2PixZeroPipeline

* Register modules set to `None` in config for `test_save_load_optional_components`

* Move fixed logic to specific test class

* Clean changes to other pipelines

* Update new tests to coordinate with #2953

* Update slow tests for better results

* Safety to avoid potential problems with torch.inference_mode

* Add reference in SD Pipeline Overview

* Fix tests again

* Enforce determinism in noise for generate_mask

* Fix copies

* Widen test tolerance for fp16 based on `test_stable_diffusion_upscale_pipeline_fp16`

* Add LoraLoaderMixin and update `prepare_image_latents`

* clean up repeat and reg

* bugfix

* Remove invalid args from docs

Suppress spurious warning by repeating image before latent to mask gen
2023-05-05 07:23:51 -07:00
Patrick von Platen
10d856a94c Let's make sure that dreambooth always uploads to the Hub (#3272)
* Update Dreambooth README

* Adapt all docs as well

* automatically write model card

* fix

* make style
2023-05-05 07:23:51 -07:00
timegate
ffe6e92577 Add multiple conditions to StableDiffusionControlNetInpaintPipeline (#3125)
* try multi controlnet inpaint

* multi controlnet inpaint

* multi controlnet inpaint
2023-05-05 07:23:51 -07:00
M. Tolga Cangöz
5151f210d8 Update logging.mdx (#2863)
Fix typos
2023-05-05 07:23:51 -07:00
NimenDavid
c1dce2077f [Docs]zh translated docs update (#3245)
* zh translated docs update

* update _toctree
2023-05-05 07:23:51 -07:00
Joqsan
716c255ab5 [Community Pipelines] EDICT pipeline implementation (#3153)
* EDICT pipeline initial commit

- Starting point taking from https://github.com/Joqsan/edict-diffusion

* refactor __init__() method

* minor refactoring

* refactor scheduler code

- remove scheduler and move its methods to the EDICTPipeline class

* make CFG optional
- refactor encode_prompt().
- include optional generator for sampling with vae.
- minor variable renaming

* add EDICT pipeline description to README.md

* replace preprocess() with VaeImageProcessor

* run make style and make quality commands

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2023-05-05 07:23:51 -07:00
Sayak Paul
72a84677cb [LoRA] quality of life improvements in the loading semantics and docs (#3180)
* 👽 qol improvements for LoRA.

* better function name?

* fix: LoRA weight loading with the new format.

* address Patrick's comments.

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* change wording around encouraging the use of load_lora_weights().

* fix: function name.

---------

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2023-05-05 07:23:51 -07:00
Will Berman
a80f6966cf [docs] add notes for stateful model changes (#3252)
* [docs] add notes for stateful model changes

* Update docs/source/en/optimization/fp16.mdx

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* link to accelerate docs for discarding hooks

---------

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2023-05-05 07:23:51 -07:00
YiYi Xu
2c87f6571c update notebook (#3259)
Co-authored-by: yiyixuxu <yixu@yis-macbook-pro.lan>
2023-05-05 07:23:51 -07:00
Patrick von Platen
12868b125a Fix community pipelines (#3266) 2023-05-05 07:23:51 -07:00
Patrick von Platen
79706a7db8 Revert "Revert "[Community Pipelines] Update lpw_stable_diffusion pipeline"" (#3265)
Revert "Revert "[Community Pipelines] Update lpw_stable_diffusion pipeline" (#3201)"

This reverts commit 91a2a80eb2.
2023-05-05 07:23:51 -07:00
Robert Dargavel Smith
9585b2308d AudioDiffusionPipeline - fix encode method after config changes (#3114)
* config fixes

* deprecate get_input_dims
2023-05-05 07:23:51 -07:00
Jair Trejo
5f3b10afb5 Fix typo in textual inversion JAX training script (#3123)
The pipeline is built as `pipe` but then used as `pipeline`.
2023-05-05 07:23:50 -07:00
Xie Zejian
cd13b10431 fix typo in score sde pipeline (#3132) 2023-05-05 07:23:50 -07:00
apolinário
1147c76eca Update IF name to XL (#3262)
Co-authored-by: multimodalart <joaopaulo.passos+multimodal@gmail.com>
2023-05-05 07:23:50 -07:00
Ernie Chu
76e5941cb2 [docs] Update interface in repaint.mdx (#3119)
Update repaint.mdx

accomodate to #1701
2023-05-05 07:23:50 -07:00
Isaac
cf2bf70a4d adding required parameters while calling the get_up_block and get_down_block (#3210)
* removed unnecessary parameters from get_up_block and get_down_block functions

* adding resnet_skip_time_act, resnet_out_scale_factor and cross_attention_norm to get_up_block and get_down_block functions

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2023-05-05 07:23:50 -07:00
Pedro Cuenca
97cf3866db Remove required from tracker_project_name (#3260)
Remove required from tracker_project_name.

As observed by https://github.com/off99555 in https://github.com/huggingface/diffusers/issues/2695#issuecomment-1470755050, it already has a default value.
2023-05-05 07:23:50 -07:00
Nipun Jindal
8def721ec8 [Stochastic Sampler][Slow Test]: Cuda test fixes (#3257)
[Slow Test]: Cuda test fixes

Co-authored-by: njindal <njindal@adobe.com>
2023-05-05 07:23:50 -07:00
Nipun Jindal
7880ed77fb [2064]: Add stochastic sampler (sample_dpmpp_sde) (#3020)
* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* [2064]: Add stochastic sampler

* Review comments

* [Review comment]: Add is_torchsde_available()

* [Review comment]: Test and docs

* [Review comment]

* [Review comment]

* [Review comment]

* [Review comment]

* [Review comment]

---------

Co-authored-by: njindal <njindal@adobe.com>
2023-05-05 07:23:50 -07:00
Pedro Cuenca
a640f1ba96 Write model card in controlnet training script (#3229)
Write model card in controlnet training script.
2023-05-05 07:23:50 -07:00
Pedro Cuenca
59986b6c56 [docs] only mention one stage (#3246)
* [docs] only mention one stage

* add blurb on auto accepting

---------

Co-authored-by: William Berman <WLBberman@gmail.com>
2023-05-05 07:23:50 -07:00
Patrick von Platen
163c33b5ff Post release for 0.16.0 (#3244)
* Post release

* fix more
2023-05-05 07:23:50 -07:00
Patrick von Platen
4cc60b53d8 Release: v0.16.0 2023-05-05 07:23:50 -07:00
Sanchit Gandhi
f83fbbdc56 [AudioLDM] Update docs to use updated ckpt (#3240)
* [AudioLDM] Update docs to use updated ckpt

* make style
2023-05-05 07:23:50 -07:00