Patrick von Platen
5c4ea00de7
Efficient Attention ( #366 )
...
* up
* add tests
* correct
* up
* finish
* better naming
* Update README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2022-09-06 18:06:47 +02:00
Anton Lozhkov
7a1229fa29
[Tests] Fix SD slow tests ( #364 )
...
move to fp16, update ddim
2022-09-06 17:01:04 +02:00
Patrick von Platen
cc59b05635
[ModelOutputs] Replace dict outputs with Dict/Dataclass and allow to return tuples ( #334 )
...
* add outputs for models
* add for pipelines
* finish schedulers
* better naming
* adapt tests as well
* replace dict access with . access
* make schedulers works
* finish
* correct readme
* make bcp compatible
* up
* small fix
* finish
* more fixes
* more fixes
* Apply suggestions from code review
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* Update src/diffusers/models/vae.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* Adapt model outputs
* Apply more suggestions
* finish examples
* correct
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
2022-09-05 14:49:26 +02:00
Patrick von Platen
9b704f7688
[Img2Img2] Re-add K LMS scheduler ( #340 )
2022-09-03 12:19:58 +02:00
Anton Lozhkov
66fd3ec70d
[CI] try to fix GPU OOMs between tests and excessive tqdm logging ( #323 )
...
* Fix tqdm and OOM
* tqdm auto
* tqdm is still spamming try to disable it altogether
* rather just set the pipe config, to keep the global tqdm clean
* style
2022-09-02 13:18:49 +02:00
Anton Lozhkov
4724250980
Fix nondeterministic tests for GPU runs ( #314 )
...
* Fix nondeterministic tests for GPU runs
* force SD fast tests to the CPU
2022-09-01 15:25:39 +02:00
Patrick von Platen
e8140304b9
[Tests] Add fast pipeline tests ( #302 )
...
* add fast tests
* Finish
2022-08-31 21:17:02 +02:00
Anton Lozhkov
ab7857019a
Add missing auth tokens for two SD tests ( #296 )
2022-08-31 17:57:46 +02:00
Nouamane Tazi
b64c522759
[PNDM Scheduler] format timesteps attrs to np arrays ( #273 )
...
* format timesteps attrs to np arrays in pndm scheduler
because lists don't get formatted to tensors in `self.set_format`
* convert to long type to use timesteps as indices for tensors
* add scheduler set_format test
* fix `_timesteps` type
* make style with black 22.3.0 and isort 5.10.1
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-08-31 14:12:08 +02:00
Patrick von Platen
a4d5b59f13
Refactor Pipelines / Community pipelines and add better explanations. ( #257 )
...
* [Examples readme]
* Improve
* more
* save
* save
* save more
* up
* up
* Apply suggestions from code review
Co-authored-by: Nathan Lambert <nathan@huggingface.co>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* up
* make deterministic
* up
* better
* up
* add generator to img2img pipe
* save
* make pipelines deterministic
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
* apply all changes
* more correctnios
* finish
* improve table
* more fixes
* up
* Apply suggestions from code review
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* Apply suggestions from code review
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Apply suggestions from code review
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* Apply suggestions from code review
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
* Update src/diffusers/pipelines/README.md
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* add better links
* fix more
* finish
Co-authored-by: Nathan Lambert <nathan@huggingface.co>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Anton Lozhkov <anton@huggingface.co>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-08-30 18:43:42 +02:00
hysts
5e84353eba
Refactor progress bar ( #242 )
...
* Refactor progress bar of pipeline __call__
* Make any tqdm configs available
* remove init
* add some tests
* remove file
* finish
* make style
* improve progress bar test
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-08-30 12:30:06 +02:00
Patrick von Platen
9e1b1ca49d
[Tests] Make sure tests are on GPU ( #269 )
...
* [Tests] Make sure tests are on GPU
* move more models
* speed up tests
2022-08-29 15:58:11 +02:00
Kashif Rasul
47893164ab
added test workflow and fixed failing test ( #237 )
...
* added test workflow and fixed failing test
* 4 decimal places
2022-08-24 13:46:53 +02:00
Kashif Rasul
102cabeb23
split tests_modeling_utils ( #223 )
...
* split tests_modeling_utils
* Fix SD tests .to(device)
* fix merge
* Fix style
Co-authored-by: anton-l <anton@huggingface.co>
2022-08-24 13:27:16 +02:00
anton-l
577a6a65d6
Fix SD tests .to(device)
2022-08-22 10:22:28 +02:00
Nathan Lambert
3f1861ee46
hotfix for pdnm test ( #220 )
2022-08-22 07:23:59 +02:00
Anton Lozhkov
e30e1b89d0
Support one-string prompts and custom image size in LDM ( #212 )
...
* Support one-string prompts in LDM
* Add other features from SD too
2022-08-18 17:55:15 +02:00
Anton Lozhkov
ed22b4fd07
Revive `make quality` ( #203 )
...
* Revive Make utils
* Add datasets for training too
2022-08-17 15:22:04 +02:00
Suraj Patil
3cd20d59d7
fix test_from_pretrained_hub_pass_model ( #194 )
...
init pipeline once
2022-08-17 13:58:18 +05:30
Pedro Cuenca
513f1fbfb0
Allow passing non-default modules to pipeline ( #188 )
...
* Allow passing non-default modules to pipeline.
Override modules are recognized and replaced in the pipeline. However,
no check is performed about mismatched classes yet. This is because the
override module is already instantiated and we have no library or class
name to compare against.
* up
* add test
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-08-16 17:25:25 +02:00
Anton Lozhkov
d7b692083c
Add K-LMS scheduler from k-diffusion ( #185 )
...
* test LMS with LDM
* test LMS with LDM
* Interchangeable sigma and timestep. Added dummy objects
* Debug
* cuda generator
* Fix derivatives
* Update tests
* Rename Lms->LMS
2022-08-16 16:48:35 +02:00
Patrick von Platen
9070c394aa
[Naming] correct config naming of DDIM pipeline ( #187 )
2022-08-16 15:50:36 +02:00
Patrick von Platen
194ed794d8
[PNDM] Stable diffusion ( #186 )
...
* [PNDM] Stable diffusino
* finish
2022-08-16 15:33:13 +02:00
Patrick von Platen
051b34635f
[Half precision] Make sure half-precision is correct ( #182 )
...
* [Half precision] Make sure half-precision is correct
* Update src/diffusers/models/unet_2d.py
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
* correct some tests
* Apply suggestions from code review
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* finalize
* finish
Co-authored-by: Suraj Patil <surajp815@gmail.com>
2022-08-16 10:42:24 +02:00
Suraj Patil
c25d8c905c
add tests for stable diffusion pipeline ( #178 )
...
add tests for sd pipeline
2022-08-14 18:51:02 +05:30
Suraj Patil
5782e0393d
Stable diffusion pipeline ( #168 )
...
* add stable diffusion pipeline
* get rid of multiple if/else
* batch_size is unused
* add type hints
* Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
* fix some bugs
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-08-14 14:43:14 +02:00
Anton Lozhkov
dd10da76a7
Add an alternative Karras et al. stochastic scheduler for VE models ( #160 )
...
* karras + VE, not flexible yet
* Fix inputs incompatibility with the original unet
* Roll back sigma scaling
* Apply suggestions from code review
* Old comment
* Fix doc
2022-08-09 15:58:30 +02:00
Suraj Patil
a2090375ca
[VAE] fix the downsample block in Encoder. ( #156 )
...
* pass downsample_padding in encoder
* update tests
2022-08-06 17:36:07 +05:30
Patrick von Platen
3100bc9670
[Vae and AutoencoderKL] Final clean of LDM checkpoints ( #137 )
...
* [Vae and AutoencoderKL clean]
* save intermediate finished work
* more progress
* more progress
* finish modeling code
* save intermediate
* finish
* Correct tests
2022-07-28 10:14:34 +02:00
Anton Lozhkov
e05f03ae41
Disable test_ddpm_ddim_equality_batched until resolved ( #142 )
...
disable test_ddpm_ddim_equality_batched
2022-07-28 09:29:29 +02:00
Anton Lozhkov
6c15636b0b
Add training and batched inference test for DDPM vs DDIM ( #140 )
...
* Add torch_device to the VE pipeline
* Mark the training test with slow
2022-07-27 15:01:56 +02:00
Patrick von Platen
5311f564ed
Final fixes ( #118 )
...
final fixes before release
2022-07-21 14:36:43 +02:00
Patrick von Platen
394243ce98
finish pndm sampler
2022-07-21 01:50:12 +00:00
Nathan Lambert
fe98574622
fixing tests for numpy and make deterministic (ddpm) ( #106 )
...
* work in progress, fixing tests for numpy and make deterministic
* make tests pass via pytorch
* make pytorch == numpy test cleaner
* change default tensor format pndm --> pt
2022-07-21 02:24:59 +02:00
Patrick von Platen
c5c9399610
correct paths for tests
2022-07-21 00:20:10 +00:00
Patrick von Platen
836f3f35c2
Rename pipelines ( #115 )
...
up
2022-07-21 01:39:46 +02:00
Patrick von Platen
9c3820d05a
Big Model Renaming ( #109 )
...
* up
* change model name
* renaming
* more changes
* up
* up
* up
* save checkpoint
* finish api / naming
* finish config renaming
* rename all weights
* finish really
2022-07-21 01:30:45 +02:00
Nathan Lambert
889aa6008c
PNDM API Updates, Tests Cleaning ( #103 )
...
* organize PNDM tests, begin API change
* clean timestep API PNDM
* update pipeline PNDM
* fix typo
* API clean round 2
* small nit
2022-07-20 12:47:39 -07:00
anton-l
6b275fca49
make PIL the default output type
2022-07-20 18:28:22 +02:00
Anton Lozhkov
1b42732ced
PIL-ify the pipeline outputs ( #111 )
2022-07-20 18:09:51 +02:00
anton-l
9e9d2dbc59
Fix np.abs
2022-07-20 17:38:03 +02:00
Anton Lozhkov
8b4371f70f
Refactor pipeline outputs, return LDM guidance_scale ( #110 )
2022-07-20 17:28:06 +02:00
Sylvain Gugger
ad9d252596
Add a decorator for register_to_config ( #108 )
...
* Add a decorator for register_to_config
* All models and test
2022-07-20 15:42:50 +02:00
Patrick von Platen
3a32b8c916
align API
2022-07-19 16:54:10 +00:00
Patrick von Platen
8c31925b3b
Get diffusers ready 🚀 🚀 🚀 ( #101 )
...
* big purge
* more fixes
* finish for now
2022-07-19 18:02:12 +02:00
Patrick von Platen
37fe8e00b2
upload
2022-07-19 15:05:40 +00:00
Nathan Lambert
182b164f32
Fix VE SDE tests, clean API ( #95 )
...
* clean ddpm api to match ddim
* correct ve sde class
* update pipeline API for ve sde
* make style
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-07-19 12:12:45 +02:00
Patrick von Platen
8b42c7cecc
make all tests pass
2022-07-19 00:24:10 +00:00
Patrick von Platen
66d5a1804c
small fixes
2022-07-19 00:08:41 +00:00
Patrick von Platen
d5acb4110a
Finalize ldm ( #96 )
...
* upload
* make checkpoint work
* finalize
2022-07-19 02:02:23 +02:00