sayakpaul
62ece6ab5a
debug
2023-10-16 11:45:49 +05:30
sayakpaul
7722f5b67c
debug
2023-10-16 11:44:45 +05:30
sayakpaul
0281e85827
debug
2023-10-16 11:36:48 +05:30
sayakpaul
9106e66382
debug
2023-10-16 11:32:50 +05:30
sayakpaul
2fb3d141c2
debug
2023-10-16 11:30:39 +05:30
sayakpaul
6e1b06c01c
debug
2023-10-16 11:25:46 +05:30
sayakpaul
50f2544697
debug
2023-10-16 11:21:06 +05:30
sayakpaul
fc5fc8c8d2
debug
2023-10-16 10:44:03 +05:30
sayakpaul
030bb528ba
debug
2023-10-16 10:39:51 +05:30
sayakpaul
f803d3d1f5
Merge branch 'main' into fix/lora-dtype
2023-10-16 09:46:56 +05:30
Sayak Paul
07b297e7de
[Bot] FIX stale.py uses timezone-aware datetime ( #5396 )
...
reflect stalebot change from https://github.com/huggingface/peft/pull/1016/
2023-10-16 00:54:50 +05:30
Younes Belkada
2bfa55f4ed
[core / PEFT / LoRA] Integrate PEFT into Unet ( #5151 )
...
* v1
* add tests and fix previous failing tests
* fix CI
* add tests + v1 `PeftLayerScaler`
* style
* add scale retrieving mechanism system
* fix CI
* up
* up
* simple approach --> not same results for some reason
* fix issues
* fix copies
* remove unneeded method
* active adapters!
* fix merge conflicts
* up
* up
* kohya - test-1
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* fix scale
* fix copies
* add comment
* multi adapters
* fix tests
* oops
* v1 faster loading - in progress
* Revert "v1 faster loading - in progress"
This reverts commit ac925f8132 .
* kohya same generation
* fix some slow tests
* peft integration features for unet lora
1. Support for Multiple ranks/alphas
2. Support for Multiple active adapters
3. Support for enabling/disabling LoRAs
* fix `get_peft_kwargs`
* Update loaders.py
* add some tests
* add unfuse tests
* fix tests
* up
* add set adapter from sourab and tests
* fix multi adapter tests
* style & quality
* style
* remove comment
* fix `adapter_name` issues
* fix unet adapter name for sdxl
* fix enabling/disabling adapters
* fix fuse / unfuse unet
* nit
* fix
* up
* fix cpu offloading
* fix another slow test
* fix another offload test
* add more tests
* all slow tests pass
* style
* fix alpha pattern for unet and text encoder
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/models/attention.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* up
* up
* clarify comment
* comments
* change comment order
* change comment order
* stylr & quality
* Update tests/lora/test_lora_layers_peft.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* fix bugs and add tests
* Update src/diffusers/models/modeling_utils.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/models/modeling_utils.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* refactor
* suggestion
* add break statemebt
* add compile tests
* move slow tests to peft tests as I modified them
* quality
* refactor a bit
* style
* change import
* style
* fix CI
* refactor slow tests one last time
* style
* oops
* oops
* oops
* final tweak tests
* Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update src/diffusers/loaders.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* comments
* Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* remove comments
* more comments
* try
* revert
* add `safe_merge` tests
* add comment
* style, comments and run tests in fp16
* add warnings
* fix doc test
* replace with `adapter_weights`
* add `get_active_adapters()`
* expose `get_list_adapters` method
* better error message
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* style
* trigger slow lora tests
* fix tests
* maybe fix last test
* revert
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* move `MIN_PEFT_VERSION`
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* let's not use class variable
* fix few nits
* change a bit offloading logic
* check earlier
* rm unneeded block
* break long line
* return empty list
* change logic a bit and address comments
* add typehint
* remove parenthesis
* fix
* revert to fp16 in tests
* add to gpu
* revert to old test
* style
* Update src/diffusers/loaders.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* change indent
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com >
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2023-10-13 16:47:03 +02:00
Sayak Paul
9bc55e8b7f
[Core] Add FreeU to all the core pipelines and their (mostly-used) derivatives ( #5376 )
...
* add: freeu to the core sdxl pipeline.
* add: freeu to video2video
* add: freeu to the core SD pipelines.
* add: freeu to image variation for sdxl.
* add: freeu to SD ControlNet pipelines.
* add: freeu to SDXL controlnet pipelines.
* add: freu to t2i adapter pipelines.
* make fix-copies.
2023-10-13 17:16:16 +05:30
Sayak Paul
3758d7a8b0
debug
2023-10-13 15:51:32 +05:30
Sayak Paul
3a794b54c9
derbug
2023-10-13 15:44:39 +05:30
Sayak Paul
fe623f3bea
derbug
2023-10-13 15:34:48 +05:30
Sayak Paul
bc65f829b7
debug
2023-10-13 14:41:43 +05:30
Sayak Paul
c22be1a557
debug
2023-10-13 14:36:48 +05:30
Sayak Paul
05f716d4ac
debug
2023-10-13 14:12:28 +05:30
Sayak Paul
25b0d5b8c4
debug
2023-10-13 14:09:12 +05:30
Dhruv Nair
4d2c981d55
New xformers test runner ( #5349 )
...
* move xformers to dedicated runner
* fix
* remove ptl from test runner images
2023-10-13 00:32:39 +05:30
Steven Liu
cf03f5b718
[docs] Minor fixes ( #5369 )
...
minor fixes
2023-10-11 17:18:29 -07:00
Patrick von Platen
5313aa6231
make style
2023-10-11 11:19:35 +00:00
Chi
ea8364e581
I Added Doc-String Into The class. ( #5293 )
...
* 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
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-11 13:19:06 +02:00
Soumik Rakshit
e00df25aee
Fix StableDiffusionXLImg2ImgPipeline creation in sdxl tutorial ( #5367 )
...
fix: StableDiffusionXLImg2ImgPipeline creation in sdxl tutorial
2023-10-11 13:07:53 +02:00
Aryan V S
91fd181245
Improve typehints and docs in diffusers/models ( #5312 )
...
* improvement: add missing typehints and docs to diffusers/models/attention.py
* chore: convert doc strings to raw python strings
add missing typehints
* improvement: add missing typehints and docs to diffusers/models/adapter.py
* improvement: add missing typehints and docs to diffusers/models/lora.py
* docs: include suggestion by @sayakpaul in src/diffusers/models/adapter.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* docs: include suggestion by @sayakpaul in src/diffusers/models/adapter.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* docs: include suggestion by @sayakpaul in src/diffusers/models/adapter.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* docs: include suggestion by @sayakpaul in src/diffusers/models/adapter.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update src/diffusers/models/lora.py
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-10-11 13:04:59 +02:00
Sayak Paul
0fa32bd674
[Examples] use loralinear instead of depecrecated lora attn procs. ( #5331 )
...
* use loralinear instead of depecrecated lora attn procs.
* fix parameters()
* fix saving
* add back support for add kv proj.
* fix: param accumul,ation.
* propagate the changes.
2023-10-11 13:02:42 +02:00
ssusie
aea73834f6
Adding PyTorch XLA support for sdxl inference ( #5273 )
...
* Added mark_step for sdxl to run with pytorch xla. Also updated README with instructions for xla
* adding soft dependency on torch_xla
* fix some styling
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-10-11 12:35:37 +02:00
Steven Liu
a139213578
[docs] Create a mask for inpainting ( #5322 )
...
add mask making section
2023-10-10 08:29:27 -07:00
Humphrey009
9c82b68f07
fix problem of 'accelerator.is_main_process' to run in mutiple GPUs ( #5340 )
...
fix problem of 'accelerator.is_main_process' to run in mutiple GPUs or NPUs
Co-authored-by: jiaqiw <wangjiaqi50@huawei.com >
2023-10-10 15:39:22 +05:30
Julien Simon
d3e0750d5d
Add missing dependency in requirements file ( #5345 )
...
Update requirements_sdxl.txt
Add missing 'datasets'
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-10 15:37:58 +05:30
Roy Hvaara
4ac205e32f
[JAX] Replace uses of jnp.array in types with jnp.ndarray. ( #4719 )
...
`jnp.array` is a function, not a type:
https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.array.html
so it never makes sense to use `jnp.array` in a type annotation.
Presumably the intent was to write `jnp.ndarray` aka `jax.Array`. Change uses of `jnp.array` to `jnp.ndarray`.
Co-authored-by: Peter Hawkins <phawkins@google.com >
2023-10-09 22:04:40 +02:00
Patrick von Platen
ed2f956072
Fix loading broken LoRAs that could give NaN ( #5316 )
...
* Fix fuse Lora
* improve a bit
* make style
* Update src/diffusers/models/lora.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
* ciao C file
* ciao C file
* test & make style
---------
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
2023-10-09 18:01:55 +02:00
Jake Vanderplas
a844065384
replace references to deprecated KeyArray & PRNGKeyArray ( #5324 )
2023-10-09 17:31:50 +02:00
Jonathan Whitaker
35952e61c1
Fix links in docs to adapter code ( #5323 )
...
Update adapter.md to fix links to adapter pipelines
2023-10-09 17:20:12 +02:00
Patrick von Platen
d199bc62ec
make style
2023-10-09 17:12:12 +02:00
Aryan V S
8d314c96ee
[HacktoberFest] Add missing docstrings to diffusers/models ( #5248 )
...
* add missing docstrings
* chore: run make quality
* improvement: include docs suggestion by @yiyixuxu
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-10-09 17:09:16 +02:00
Brian Yarbrough
e2c0208c86
Add py.typed for PEP 561 compliance ( #5326 )
...
See #5325
2023-10-09 17:08:55 +02:00
Aryan V S
bd72927c63
Improve typehints and docs in diffusers/models ( #5299 )
...
* improvement: add typehints and docs to diffusers/models/activations.py
* improvement: add typehints and docs to diffusers/models/resnet.py
2023-10-09 16:29:23 +02:00
__mo_san__
c4d66200b7
make-fast-test-for-StableDiffusionControlNetPipeline-faster ( #5292 )
...
* decrease UNet2DConditionModel & ControlNetModel blocks
* decrease UNet2DConditionModel & ControlNetModel blocks
* decrease even more blocks & number of norm groups
* decrease vae block out channels and n of norm goups
* fix code style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-09 14:56:27 +05:30
Sebastian
2ed7e05fc2
Improve performance of fast test by reducing down blocks ( #5290 )
...
* Reduce number of down block channels
* Remove debug code
* Set new excepted image slice values for sdxl euler test
2023-10-09 14:49:56 +05:30
Pu Cao
cc2c4ae759
fix inference in custom diffusion ( #5329 )
...
* Update train_custom_diffusion.py
* make style
* Empty-Commit
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-09 10:08:01 +02:00
chuzh
6bd55b54bc
Fix [core/GLIGEN]: TypeError when iterating over 0-d tensor with In-painting mode when EulerAncestralDiscreteScheduler is used ( #5305 )
...
* fix(gligen_inpaint_pipeline): 🐛 Wrap the timestep() 0-d tensor in a list to convert to 1-d tensor. This avoids the TypeError caused by trying to directly iterate over a 0-dimensional tensor in the denoising stage
* test(gligen/gligen_text_image): unit test using the EulerAncestralDiscreteScheduler
---------
Co-authored-by: zhen-hao.chu <zhen-hao.chu@vitrox.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-09 09:54:01 +02:00
Zeng Xian
0513a8cfd8
fix typo in train dreambooth lora description ( #5332 )
2023-10-08 14:54:33 +02:00
Shubham S Jagtap
306dc6e751
Update README.md ( #5267 )
...
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2023-10-06 14:50:18 -07:00
vedant2003
dd25ef5679
[Hacktoberfest]Fixing issues #5241 ( #5255 )
...
* Update pipeline_wuerstchen_prior.py
* prior_num_inference_steps updated
* height, width, num_inference_steps, and guidance_scale synced
* parameters synced
* latent_mean, latent_std, and resolution_multiple synced
* prior_num_inference_steps changed
* Formatted pipeline_wuerstchen_prior.py
* Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py
---------
Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com >
2023-10-06 14:19:38 -07:00
TimothyAlexisVass
016866792d
Minor fixes ( #5309 )
...
tiny fixes
2023-10-06 11:20:06 -07:00
Steven Liu
f0a2c63753
[docs] Improved inpaint docs ( #5210 )
...
* start
* finish draft
* add section
* edits
* feedback
* make fix-copies
* rebase
2023-10-06 09:44:24 -07:00
Sayak Paul
7eaae83f16
[LoRA] fix: torch.compile() for lora conv ( #5298 )
...
fix: torch.compile() for lora conv
2023-10-06 17:14:47 +02:00
Dhruv Nair
872ae1dd12
Add from single file to StableDiffusionUpscalePipeline and StableDiffusionLatentUpscalePipeline ( #5194 )
...
* add from single file
* clean up
* make style
* add single file loading for upscaling
2023-10-06 13:18:13 +02:00