Patrick von Platen
187de44352
Fix device on save/load tests
2022-11-09 22:18:14 +00:00
Anton Lozhkov
7d0c272939
Match the generator device to the pipeline for DDPM and DDIM ( #1222 )
...
* Match the generator device to the pipeline for DDPM and DDIM
* style
* fix
* update values
* fix fast tests
* trigger slow tests
* deprecate
* last value fixes
* mps fixes
2022-11-09 23:00:23 +01:00
Patrick von Platen
3d98dc763a
Factor out encode text with Copied from ( #1224 )
...
* up
* more fixes
* fix
* finalize
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
* upload models
* up
2022-11-09 22:18:57 +01:00
exo-pla-net
13f388eeb2
Improve documentation for the LPW pipeline ( #1182 )
2022-11-09 21:39:27 +01:00
Pedro Cuenca
af279434d0
Flax tests: don't hardcode number of devices ( #1175 )
...
Flax tests: don't hardcode number of devices.
This makes it possible to test on CPU/GPU. However, expected slices are
only checked when there are 8 devices.
2022-11-09 20:04:43 +01:00
Jesse Casey
4969f46511
apply `repeat_interleave` fix for `mps` to stable diffusion image2image pipeline ( #1135 )
...
copy from other pipeline
2022-11-09 20:01:31 +01:00
Patrick von Platen
6c0335c7f9
DDIM docs ( #1219 )
2022-11-09 16:02:11 +01:00
Patrick von Platen
0248541dea
[Conversion] Improve conversion script ( #1218 )
...
up
2022-11-09 15:46:08 +01:00
Duong A. Nguyen
5a59f9b717
Add LDM Super Resolution pipeline ( #1116 )
...
* Add ldm super resolution pipeline
* style
* fix copies
* style
* fix doc
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* add doc
* address comments
* address comments
* fix doc
* minor
* add tests
* add tests
* load text encoder from subfolder
* fix test
* fix test
* style
* style
* handle mps latents
* unfix typo
* unfix typo
* Update tests/pipelines/latent_diffusion/test_latent_diffusion_superresolution.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* fix set_timesteps mps
* fix set_timesteps mps
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* style
* test 64x64 instead of 256x256
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2022-11-09 13:42:16 +01:00
Patrick von Platen
b93fe08545
[Loading] Make sure loading edge cases work ( #1192 )
...
* [Loading] Make edge cases work
* up
* finish
* up
2022-11-09 12:28:56 +01:00
Duong A. Nguyen
3f7edc5f72
Fix layer names convert LDM script ( #1206 )
...
fix script convert LDM
2022-11-09 12:08:30 +01:00
Suraj Patil
cd77a03651
[CLIPGuidedStableDiffusion] support DDIM scheduler ( #1190 )
...
add ddim in clip guided
2022-11-09 11:46:12 +01:00
camenduru
663f0c1963
[Flax] fix extra copy pasta 🍝 ( #1187 )
2022-11-09 11:34:15 +01:00
Patrick von Platen
6cf72a9b1e
Fix slow tests ( #1210 )
...
* fix tests
* Fix more
* more
2022-11-09 11:22:12 +01:00
Anton Lozhkov
24895a1f49
Fix cpu offloading ( #1177 )
...
* Fix cpu offloading
* get offloaded devices locally for SD pipelines
2022-11-09 10:28:10 +01:00
Nathan Lambert
598ff76bbf
add licenses to pipelines ( #1201 )
...
add licenses
2022-11-09 10:06:49 +01:00
Patrick von Platen
249d9bc0e7
[Scheduler] Move predict epsilon to init ( #1155 )
...
* [Scheduler] Move predict epsilon to init
* up
* uP
* uP
* Apply suggestions from code review
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* up
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2022-11-08 18:08:08 +01:00
Suraj Patil
5786b0e2f7
handle dtype xformers attention ( #1196 )
...
handle dtype xformers
2022-11-08 17:15:23 +01:00
Mishig
32b0736d8a
Update pr docs actions ( #1194 )
2022-11-08 16:38:09 +01:00
Pedro Cuenca
614c182f94
Restore compatibility with deprecated `StableDiffusionOnnxPipeline` ( #1191 )
...
* Restore compatibility with old ONNX pipeline.
I think it broke in #552 .
* Add missing attribute `vae_encoder`
2022-11-08 15:08:35 +01:00
Anton Lozhkov
11f7d6f3cc
[ONNX] Improve ONNXPipeline scheduler compatibility, fix safety_checker ( #1173 )
...
* [ONNX] Improve ONNX scheduler compatibility, fix safety_checker
* typo
2022-11-08 14:39:11 +01:00
Yuta Hayashibe
555203e1fa
Warning for invalid options without "--with_prior_preservation" ( #1065 )
...
* Make errors for invalid options without "--with_prior_preservation"
* Make --instance_prompt required
* Removed needless check because --instance_data_dir is marked with required
* Updated messages
* Use logger.warning instead of raise errors
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-08 14:31:13 +01:00
Pedro Cuenca
813744e5f3
MPS schedulers: don't use float64 ( #1169 )
...
* Schedulers: don't use float64 on mps
* Test set_timesteps() on device (float schedulers).
* SD pipeline: use device in set_timesteps.
* SD in-painting pipeline: use device in set_timesteps.
* Tests: fix mps crashes.
* Skip test_load_pipeline_from_git on mps.
Not compatible with float16.
* Use device.type instead of str in Euler schedulers.
2022-11-08 13:11:33 +01:00
Suraj Patil
5a8b356922
[DDIMScheduler] fix noise device in ddim step ( #1189 )
...
* fix noise device in ddim sched
* fix typo
* self.device -> device
* remove duplicated if
* use str device
* don't use str for device
2022-11-08 13:11:12 +01:00
Pedro Cuenca
20a05d6a50
Fix small typo ( #1178 )
...
Unless it's intentional, lol
2022-11-08 12:30:51 +01:00
Patrick von Platen
c3dcb6749b
Update config.yml
2022-11-08 11:31:15 +01:00
Pedro Cuenca
fa6e5209a8
Link to Dreambooth blog post instead of W&B report ( #1180 )
...
Link to Dreambooth blog post instead of W&B report.
2022-11-07 21:59:36 +01:00
Duong A. Nguyen
ac4c695d97
[Flax examples] Load text encoder from subfolder ( #1147 )
...
load text encoder from subfolder
2022-11-07 21:26:59 +01:00
JuanCarlosPi
01733238a6
[Community Pipeline] Add multilingual stable diffusion to community pipelines ( #1142 )
...
* Add multilingual_stable_diffusion.py file
* Add multilingual stable diffusion to examples README file
* Update examples/community/README.md
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-07 21:11:59 +01:00
Alex McKinney
bcdb3d594c
Community pipeline img2img inpainting ( #1114 )
...
* adds image to image inpainting with `PIL.Image.Image` inputs
the base implementation claims to support `torch.Tensor` but seems it
would also fail in this case.
* `make style` and `make quality`
* updates community examples readme
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-07 21:06:52 +01:00
Patrick von Platen
72eae64d67
Fix dtype safety checker inpaint legacy ( #1137 )
...
* [Stable Diffusion Inpaint Legacy] Fiix some things
* uP
2022-11-07 20:57:45 +01:00
Patrick von Platen
de7536281a
fix image docs
2022-11-07 17:25:13 +01:00
Patrick von Platen
b500df1155
[Docs] Add loading script ( #1174 )
...
* add loading script
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* correct
* Apply suggestions from code review
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* uP
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2022-11-07 17:15:41 +01:00
Pedro Cuenca
0dd8c6b4db
Fix community pipeline links ( #1162 )
...
* Change title to match the sidebar in _toctree.
* Fix custom pipe link, add link to contribute.
* Fix community pipeline links.
2022-11-07 14:32:51 +01:00
Duong A. Nguyen
cd502b25cf
Fix typo latens -> latents ( #1171 )
...
fix typo
2022-11-07 13:34:45 +01:00
Pedro Cuenca
e86a280c45
Remove warning about half precision on MPS ( #1163 )
...
Remove warning about half precision on MPS.
2022-11-07 12:27:17 +01:00
Cheng Lu
b4a1ed8544
Add multistep DPM-Solver discrete scheduler ( #1132 )
...
* add dpmsolver discrete pytorch scheduler
* fix some typos in dpm-solver pytorch
* add dpm-solver pytorch in stable-diffusion pipeline
* add jax/flax version dpm-solver
* change code style
* change code style
* add docs
* add `add_noise` method for dpmsolver
* add pytorch unit test for dpmsolver
* add dummy object for pytorch dpmsolver
* Update src/diffusers/schedulers/scheduling_dpmsolver_discrete.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update tests/test_config.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update tests/test_config.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* resolve the code comments
* rename the file
* change class name
* fix code style
* add auto docs for dpmsolver multistep
* add more explanations for the stabilizing trick (for steps < 15)
* delete the dummy file
* change the API name of predict_epsilon, algorithm_type and solver_type
* add compatible lists
Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-11-06 22:49:55 +01:00
Pedro Cuenca
08a6dc8a58
Flax: Flip sin to cos in time embeddings ( #1149 )
...
Flip sin to cos in t embeddings.
This was assumed in the previous implementation, but now the default is
the opposite.
Fixes #1145 .
2022-11-05 22:17:41 +01:00
Chen Wu (吴尘)
9d8943b7e7
Add CycleDiffusion pipeline using Stable Diffusion ( #888 )
...
* Add CycleDiffusion pipeline for Stable Diffusion
* Add the option of passing noise to DDIMScheduler
Add the option of providing the noise itself to DDIMScheduler, instead of the random seed generator.
* Update README.md
* Update README.md
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update scheduling_ddim.py
* Update import format
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update scheduling_ddim.py
* Update src/diffusers/schedulers/scheduling_ddim.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/schedulers/scheduling_ddim.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/schedulers/scheduling_ddim.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/schedulers/scheduling_ddim.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update src/diffusers/schedulers/scheduling_ddim.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update scheduling_ddim.py
* Update scheduling_ddim.py
* Update scheduling_ddim.py
* add two tests
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Update README.md
* Rename pipeline name as suggested in the latest reviewer comment
* Update test_pipelines.py
* Update test_pipelines.py
* Update test_pipelines.py
* Update pipeline_stable_diffusion_cycle_diffusion.py
* Remove the generator
This generator does not control all randomness during sampling, which can be misleading.
* Update optimal hyperparameters
* Update src/diffusers/pipelines/stable_diffusion/README.md
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/stable_diffusion/README.md
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Update src/diffusers/pipelines/stable_diffusion/README.md
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Apply suggestions from code review
* uP
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_cycle_diffusion.py
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* up
* up
* Replace assert with ValueError
* finish docs
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-11-04 20:51:06 +01:00
Pi Esposito
1172c9634b
add enable sequential cpu offloading to other stable diffusion pipelines ( #1085 )
...
* add enable sequential cpu offloading to other stable diffusion pipelines
* trigger ci
* fix styling
* interpolate before converting to device to avoid breking when cpu_offload is enabled with fp16
Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com>
* style again I need to stop forgething this thing
* fix inpainting bug that could cause device misalignment
Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com>
* Apply suggestions from code review
Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-04 19:25:28 +01:00
Anton Lozhkov
2fcae69f2a
Bump to 0.8.0.dev0 ( #1131 )
...
* Bump to 0.8.0.dev0
* deprecate int timesteps
* style
2022-11-04 19:06:24 +01:00
SkyTNT
a480229463
[Community Pipeline] lpw_stable_diffusion: add xformers_memory_efficient_attention and sequential_cpu_offload ( #1130 )
...
lpw_stable_diffusion: xformers and cpu_offload
2022-11-04 18:38:37 +01:00
Chenguo Lin
5b20d3b3d7
fix the parameter naming in `self.downsamplers` ( #1108 )
...
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-04 18:05:19 +01:00
Lewington-pitsos
2c108693cc
Test precision increases ( #1113 )
...
* increase the precision of slice-based tests and make the default test case easier to single out
* increase precision of unit tests which already rely on float comparisons
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-11-04 17:54:01 +01:00
webbigdata-jp
af7b1c3bf2
fix 404 link in example/README.mb ( #1136 )
...
fix 404 link in README.mb
2022-11-04 16:45:58 +01:00
Patrick von Platen
1d0f3c211e
Move accelerate to a soft-dependency ( #1134 )
...
* finish
* finish
* Update src/diffusers/modeling_utils.py
* Update src/diffusers/pipeline_utils.py
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
* more fixes
* fix
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
2022-11-04 14:58:52 +01:00
Duong A. Nguyen
c62b3a2e7e
[Flax] Fix sample batch size DreamBooth ( #1129 )
...
fix sample batch size
2022-11-04 13:49:57 +01:00
Patrick von Platen
bde4880c9c
make style
2022-11-03 17:57:51 +00:00
Patrick von Platen
a24862cdaf
Correct VQDiffusion Pipeline import
2022-11-03 17:55:14 +00:00
Patrick von Platen
9eb389f298
Merge branch 'main' of https://github.com/huggingface/diffusers into main
2022-11-03 17:55:03 +00:00