MilkClouds
3517fb9430
fix: enabled num_images_per_prompt>1 for lpw_stable_diffusion_xl (community pipeline) ( #5807 )
...
* fix: enabled num_images_per_prompt>1 for lpw_stable_diffusion_xl
* style: fixed isort
2023-11-15 07:40:29 -10:00
Kadir Nar
c7260ce253
🔧 Fix import codes in diffusers library ( #5792 )
...
* 🔧 Fix import codes in diffusers library
* ✨ Refactor imports in community examples
2023-11-14 11:37:59 -08:00
Sayak Paul
ded93f798c
[Refactor] refactor loaders.py to make it cleaner and leaner. ( #5771 )
...
* refactor loaders.py to make it cleaner and leaner.
* refactor loaders init
* inits.
* textual inversion to the init.
* inits.
* remove certain modules from the main init.
* AttnProcsLayers
* fix imports
* avoid circular import.
* fix circular import pt 2.
* address PR comments
* imports
* fix: imports.
* remove from main init for avoiding circular deps.
* remove spurious deps.
* fix-copies.
* fix imports.
* more debug
* more debug
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-14 12:54:28 +01:00
co63oc
069123f66e
Update checkpoint_merger.py ( #5780 )
2023-11-14 10:46:11 +01:00
Long(Tony) Lian
5b231aa38b
Fix the pipeline name in the examples for LMD+ pipeline. Add a colab link to pipeline README. ( #5775 )
...
* Fix the pipeline name in the examples for LMD+ pipeline
* Add LMD+ colab link
* Apply code formatting
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-11-14 07:43:37 +05:30
Thuan H. Nguyen
8fcd52febb
Correct code for distributed training of RealFill ( #5740 )
...
Correct code for distributed training
2023-11-13 19:01:15 +01:00
Nicolas Hug
0488810f61
Fix realfill example compatibility with latest torchvision version ( #5736 )
2023-11-13 18:55:17 +01:00
Patrick von Platen
ef7787ea59
make style
2023-11-13 18:54:53 +01:00
Jianqi Pan
1ce4b5f3e3
fix: fix forward function signature of controlnet reference_only pipeline example ( #5717 )
...
fix: ignore other args
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-11-13 18:54:21 +01:00
Younes Belkada
8789d0b6c7
fix styling issues on main ( #5754 )
...
fix styling issues
2023-11-13 20:05:15 +05:30
Long(Tony) Lian
b1fbef544c
Add LLM-grounded Diffusion (LMD+) pipeline ( #5634 )
...
* Add LLM-grounded Diffusion (LMD+) pipeline
* Update the formatting
* Applied formatting
2023-11-11 12:51:05 +05:30
Sayak Paul
1477865e48
post release v0.23.0 ( #5730 )
...
* post release
* fix: variant test
* up
* fix: test
2023-11-10 16:35:44 +05:30
aihao
1f87f83e68
add load_datasete data_dir parameter ( #5747 )
2023-11-09 23:03:14 -10:00
Suraj Patil
db2d8e76f8
Add LCM Scripts ( #5727 )
...
* add lcm scripts
* Co-authored-by: dgu8957@gmail.com
2023-11-09 17:29:12 +01:00
Sayak Paul
64603389da
post release (v0.22.0) ( #5658 )
...
post release
2023-11-06 16:23:38 +01:00
Patrick von Platen
4f2bf67355
Revert "Fix the order of width and height of original size in SDXL training script" ( #5614 )
...
Revert "Fix the order of width and height of original size in SDXL training script (#5382 )"
This reverts commit 45db049973 .
2023-11-01 22:04:47 +01:00
M. Tolga Cangöz
442017ccc8
[Docs] Fix typos ( #5583 )
...
* Add Copyright info
* Fix typos, improve, update
* Update deepfloyd_if.md
* Update ldm3d_diffusion.md
* Update opt_overview.md
2023-10-31 10:04:08 -07:00
YiYi Xu
ce9484b139
fix a mistake in text2image training script for kandinsky2.2 ( #5244 )
...
fix
Co-authored-by: yiyixuxu <yixu@Yis-MacBook-Pro.local >
2023-10-30 23:06:16 -10:00
Jincheng Miao
ed00ead345
[Community Pipelines] add textual inversion support for stable_diffusion_ipex ( #5571 )
2023-10-31 11:54:16 +05:30
Thuan H. Nguyen
5b087e82d1
Add realfill ( #5456 )
...
* Add realfill
* Move realfill folder
* Fix some format issues
2023-10-30 15:21:40 +01:00
jiaqiw09
e140c0562e
fix error reported 'find_unused_parameters' running in mutiple GPUs ( #5355 )
...
* fix error reported 'find_unused_parameters' running in mutiple GPUs or NPUs
* fix code check of importing module by its alphabetic order
---------
Co-authored-by: jiaqiw <wangjiaqi50@huawei.com >
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2023-10-27 22:49:14 +05:30
nickkolok
0d4b459be6
Update train_dreambooth.py - fix typos ( #5539 )
2023-10-26 13:35:05 -07:00
Ran Ran
8959c5b9de
Add from_pt flag to enable model from PT ( #5501 )
...
* Add from_pt flag to enable model from PT
* Format the file
* Reformat the file
2023-10-25 23:07:34 +02:00
Patrick von Platen
d420d71398
make style
2023-10-25 16:12:14 +02:00
Logan
a1fad8286f
Add a new community pipeline ( #5477 )
...
* Add a new community pipeline
examples/community/latent_consistency_img2img.py
which can be called like this
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"SimianLuo/LCM_Dreamshaper_v7", custom_pipeline="latent_consistency_txt2img", custom_revision="main")
# To save GPU memory, torch.float16 can be used, but it may compromise image quality.
pipe.to(torch_device="cuda", torch_dtype=torch.float32)
img2img=LatentConsistencyModelPipeline_img2img(
vae=pipe.vae,
text_encoder=pipe.text_encoder,
tokenizer=pipe.tokenizer,
unet=pipe.unet,
#scheduler=pipe.scheduler,
scheduler=None,
safety_checker=None,
feature_extractor=pipe.feature_extractor,
requires_safety_checker=False,
)
img = Image.open("thisismyimage.png")
result = img2img(prompt,img,strength,num_inference_steps=4)
* Apply suggestions from code review
Fix name formatting for scheduler
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* update readme (and run formatter on latent_consistency_img2img.py)
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-10-25 16:11:56 +02:00
Patrick von Platen
1ade42f729
make style
2023-10-23 19:43:54 +02:00
Shyam Marjit
677df5ac12
fixed SDXL text encoder training bug #5016 ( #5078 )
...
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-23 19:43:43 +02:00
Andrei Filatov
16851efa0f
Update README.md ( #5497 )
...
Right now, only "main" branch has this community pipeline code. So, adding it manually into pipeline
2023-10-23 18:57:43 +02:00
linjiapro
45db049973
Fix the order of width and height of original size in SDXL training script ( #5382 )
...
* wip
* wip
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-18 22:38:52 +02:00
Liang Hou
a68f5062fb
style(sdxl): remove identity assignments ( #5418 )
2023-10-18 22:38:20 +02:00
Patrick von Platen
85dccab7fd
Add latent consistency ( #5438 )
...
* Add latent consistency
* Update examples/community/README.md
* Add latent consistency
* make fix copies
* Apply suggestions from code review
2023-10-18 14:18:31 +02:00
Susheel Thapa
324d18fba2
Chore: Typo fixed in multiple files ( #5422 )
2023-10-17 08:17:03 -07:00
Sayak Paul
cc12f3ec92
[Examples] Update with HFApi ( #5393 )
...
* update training examples to use HFAPI.
* update training example.
* reflect the changes in the korean version too.
* Empty-Commit
2023-10-16 19:34:46 +05:30
Heinz-Alexander Fuetterer
0ea78f9707
chore: fix typos ( #5386 )
...
* chore: fix typos
* Update src/diffusers/pipelines/shap_e/renderer.py
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com >
---------
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com >
2023-10-16 15:23:37 +02:00
Kashif Rasul
d03c9099bc
[Wuerstchen] text to image training script ( #5052 )
...
* initial script
* formatting
* prior trainer wip
* add efficient_net_encoder
* add CLIPTextModel
* add prior ema support
* optimizer
* fix typo
* add dataloader
* prompt_embeds and image_embeds
* intial training loop
* fix output_dir
* fix add_noise
* accelerator check
* make effnet_transforms dynamic
* fix training loop
* add validation logging
* use loaded text_encoder
* use PreTrainedTokenizerFast
* load weigth from pickle
* save_model_card
* remove unused file
* fix typos
* save prior pipeilne in its own folder
* fix imports
* fix pipe_t2i
* scale image_embeds
* remove snr_gamma
* format
* initial lora prior training
* log_validation and save
* initial gradient working
* remove save/load hooks
* set set_attn_processor on prior_prior
* add lora script
* typos
* use LoraLoaderMixin for prior pipeline
* fix usage
* make fix-copies
* yse repo_id
* write_lora_layers is a staitcmethod
* use defualts
* fix defaults
* undo
* Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* Update src/diffusers/loaders.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* Update src/diffusers/loaders.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* Update src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py
* Update src/diffusers/loaders.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* Update src/diffusers/loaders.py
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
* add graident checkpoint support to prior
* gradient_checkpointing
* formatting
* Update examples/wuerstchen/text_to_image/README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/README.md
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/train_text_to_image_lora_prior.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update src/diffusers/loaders.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* Update examples/wuerstchen/text_to_image/train_text_to_image_prior.py
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
* use default unet and text_encoder
* fix test
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
Co-authored-by: Pedro Cuenca <pedro@huggingface.co >
2023-10-16 15:00:33 +02:00
Sayak Paul
93df5bb670
[Examples] fix unconditioning generation training example for mixed-precision training ( #5407 )
...
* fix: unconditional generation example
* fix: float in loss.
* apply styling.
2023-10-16 14:11:35 +05:30
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
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
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
Bagheera
02a8d664a2
Min-SNR Gamma: correct the fix for SNR weighted loss in v-prediction … ( #5238 )
...
Min-SNR Gamma: correct the fix for SNR weighted loss in v-prediction by adding 1 to SNR rather than the resulting loss weights
Co-authored-by: bghira <bghira@users.github.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2023-10-05 20:52:27 +02:00
Patrick von Platen
dfcce3ca6e
[Research folder] Add SDXL example ( #5275 )
...
* [SDXL Flax] Add research folder
* Add co-author
Co-authored-by: Juan Acevedo <jfacevedo@google.com >
---------
Co-authored-by: Juan Acevedo <jfacevedo@google.com >
2023-10-03 07:51:46 +02:00
Patrick von Platen
bdd16116f3
[Schedulers] Fix callback steps ( #5261 )
...
* fix all
* make fix copies
* make fix copies
2023-10-02 19:52:53 +02:00
Sayak Paul
d56825e4b4
fix: how print training resume logs. ( #5117 )
...
* fix: how print training resume logs.
* propagate changes to text-to-image scripts.
* propagate changes to instructpix2pix.
* propagate changes to dreambooth
* propagate changes to custom diffusion and instructpix2pix
* propagate changes to kandinsky
* propagate changes to textual inv.
* debug
* fix: checkpointing.
* debug
* debug
* debug
* back to the square
* debug
* debug
* change condition order.
* debug
* debug
* debug
* debug
* revert to original
* clean
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com >
2023-10-02 18:29:52 +02:00
Nicholas Bardy
1c4c4c48d9
Correct file name in t2i adapter training readme ( #5207 )
...
Update README_sdxl.md
2023-09-28 14:51:02 +02:00
Benjamin Paine
693a0d08e4
Remove Offensive Language from Community Pipelines ( #5206 )
...
* Update run_onnx_controlnet.py
* Update run_tensorrt_controlnet.py
2023-09-27 22:02:25 +02:00
Sayak Paul
cdcc01be0e
[Examples] add compute_snr() to training utils. ( #5188 )
...
add compute_snr() to training utils.
2023-09-27 21:42:20 +05:30