hlky
f2d348d904
Remove negative_* from SDXL callback ( #10203 )
...
* Remove `negative_*` from SDXL callback
* Change example and add XL version
2024-12-12 20:58:50 +00:00
Sayak Paul
8170dc368d
[WIP][Training] Flux Control LoRA training script ( #10130 )
...
* update
* add
* update
* add control-lora conversion script; make flux loader handle norms; fix rank calculation assumption
* control lora updates
* remove copied-from
* create separate pipelines for flux control
* make fix-copies
* update docs
* add tests
* fix
* Apply suggestions from code review
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* remove control lora changes
* apply suggestions from review
* Revert "remove control lora changes"
This reverts commit 73cfc519c9 .
* update
* update
* improve log messages
* updates.
* updates
* support register_config.
* fix
* fix
* fix
* updates
* updates
* updates
* fix-copies
* fix
* apply suggestions from review
* add tests
* remove conversion script; enable on-the-fly conversion
* bias -> lora_bias.
* fix-copies
* peft.py
* fix lora conversion
* changes
Co-authored-by: a-r-r-o-w <contact.aryanvs@gmail.com >
* fix-copies
* updates for tests
* fix
* alpha_pattern.
* add a test for varied lora ranks and alphas.
* revert changes in num_channels_latents = self.transformer.config.in_channels // 8
* revert moe
* add a sanity check on unexpected keys when loading norm layers.
* contro lora.
* fixes
* fixes
* fixes
* tests
* reviewer feedback
* fix
* proper peft version for lora_bias
* fix-copies
* updates
* updates
* updates
* remove debug code
* update docs
* integration tests
* nis
* fuse and unload.
* fix
* add slices.
* more updates.
* button up readme
* train()
* add full fine-tuning version.
* fixes
* Apply suggestions from code review
Co-authored-by: Aryan <aryan@huggingface.co >
* set_grads_to_none remove.
* readme
---------
Co-authored-by: Aryan <aryan@huggingface.co >
Co-authored-by: yiyixuxu <yixu310@gmail.com >
Co-authored-by: a-r-r-o-w <contact.aryanvs@gmail.com >
2024-12-12 15:34:57 +05:30
Ethan Smith
26e80e0143
fix min-snr implementation ( #8466 )
...
* fix min-snr implementation
https://github.com/kohya-ss/sd-scripts/blob/main/library/custom_train_functions.py#L66
* Update train_dreambooth.py
fix variable name mse_loss_weights
* fix divisor
* make style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-12-12 09:55:59 +05:30
Linoy Tsaban
43534a8d1f
[community pipeline rf-inversion] - fix example in doc ( #10179 )
...
* fix example in doc
* remove redundancies
* change param
2024-12-11 00:30:05 +02:00
hlky
4c4b323c1f
Use torch in get_3d_rotary_pos_embed/_allegro ( #10161 )
...
Use torch in get_3d_rotary_pos_embed/_allegro
2024-12-10 08:56:26 -10:00
Linoy Tsaban
c9e4fab42c
[community pipeline] Add RF-inversion Flux pipeline ( #9816 )
...
* initial commit
* update denoising loop
* fix scheduling
* style
* fix import
* fixes
* fixes
* style
* fixes
* change invert
* change denoising & check inputs
* shape & timesteps fixes
* timesteps fixes
* style
* remove redundancies
* small changes
* update documentation a bit
* update documentation a bit
* update documentation a bit
* style
* change strength param, remove redundancies
* style
* forward ode loop change
* add inversion progress bar
* fix image_seq_len
* revert to strength but == 1 by default.
* style
* add "copied from..." comments
* credit authors
* make style
* return inversion outputs without self-assigning
* adjust denoising loop to generate regular images if inverted latents are not provided
* adjust denoising loop to generate regular images if inverted latents are not provided
* fix import
* comment
* remove redundant line
* modify comment on ti
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* Update examples/community/pipeline_flux_rf_inversion.py
Co-authored-by: hlky <hlky@hlky.ac >
* fix syntax error
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: hlky <hlky@hlky.ac >
2024-12-10 12:41:12 +02:00
Yu Zheng
6131a93b96
support sd3.5 for controlnet example ( #9860 )
...
* support sd3.5 in controlnet
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2024-12-06 10:59:27 -10:00
Juan Acevedo
3cb7b8628c
Update ptxla training ( #9864 )
...
* update ptxla example
---------
Co-authored-by: Juan Acevedo <jfacevedo@google.com >
Co-authored-by: Pei Zhang <zpcore@gmail.com >
Co-authored-by: Pei Zhang <piz@google.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Pei Zhang <pei@Peis-MacBook-Pro.local >
Co-authored-by: hlky <hlky@hlky.ac >
2024-12-06 10:50:13 -10:00
suzukimain
6394d905da
[community] Load Models from Sources like Civitai into Existing Pipelines ( #9986 )
...
* Added example of model search.
* Combine processing into one file
* Add parameters for base model
* Bug Fixes
* bug fix
* Create README.md
* Update search_for_civitai_and_HF.py
* Create requirements.txt
* bug fix
* Update README.md
* bug fix
* Correction of typos
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* apply the changes
* Replace search_for_civitai_and_HF.py with pipeline_easy.py
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update examples/model_search/README.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update README.md
* Organize the table of parameters
* Update README.md
* Update README.md
* Update README.md
* make style
* Fixing the style of pipeline
* Fix pipeline style
* fix
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2024-12-06 07:48:45 -08:00
aihao
b58f67f2d5
update ( #7067 )
...
* add data_dir parameter to load_dataset
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: YiYi Xu <yixu310@gmail.com >
Co-authored-by: hlky <hlky@hlky.ac >
2024-12-03 11:26:47 -10:00
Parag Ekbote
cf258948b2
Notebooks for Community Scripts-4 ( #10094 )
...
* Add Diffuser Notebooks for Community Scripts.
* Add missing link.
* Styling Improvement.
2024-12-03 10:23:00 -08:00
Dimitri Barbot
069186fac5
Add sdxl controlnet reference community pipeline ( #9893 )
...
* Add reference_attn & reference_adain support for sdxl with other controlnet
* Update README.md
* Update README.md by replacing human example with a cat one
Replace human example with a cat one
* Replace default human example with a cat one
* Use example images from huggingface documentation-images repository
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-28 17:12:07 +05:30
cjkangme
69c83d6eed
[Community Pipeline] Add some feature for regional prompting pipeline ( #9874 )
...
* [Fix] fix bugs of regional_prompting pipeline
* [Feat] add base prompt feature
* [Fix] fix __init__ pipeline error
* [Fix] delete unused args
* [Fix] improve string handling
* [Docs] docs to use_base in regional_prompting
* make style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-28 16:54:23 +05:30
Dimitri Barbot
e44fc75acb
Update sdxl reference pipeline to latest sdxl pipeline ( #9938 )
...
* Update sdxl reference community pipeline
* Update README.md
Add example images.
* Style & quality
* Use example images from huggingface documentation-images repository
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-28 16:34:56 +05:30
Parag Ekbote
8d477daed5
Notebooks for Community Scripts-3 ( #10032 )
...
* Add Notebooks for Community Scripts
in ReadME.
* Minor Script Improvement.
2024-11-26 23:05:45 -10:00
SkyCol
074e12358b
Add prompt about wandb in examples/dreambooth/readme. ( #10014 )
...
Add files via upload
2024-11-25 18:42:06 +05:30
Linoy Tsaban
c4b5d2ff6b
[SD3 dreambooth lora] smol fix to checkpoint saving ( #9993 )
...
* smol change to fix checkpoint saving & resuming (as done in train_dreambooth_sd3.py)
* style
* modify comment to explain reasoning behind hidden size check
2024-11-24 18:51:06 +02:00
Parag Ekbote
cc7d88f247
Move IP Adapter Scripts to research project ( #9960 )
...
* Move files to research-projects.
* docs: add IP Adapter training instructions
* Delete venv
* Update examples/ip_adapter/tutorial_train_sdxl.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Cherry-picked commits and re-moved files
to research_projects.
* make style.
* Update toctree and delete ip_adapter.
* Nit Fix
* Fix nit.
* Fix nit.
* Create training script for single GPU and set
model format to .safetensors
* Add sample inference script and restore _toctree
* Restore toctree.yaml
* fix spacing.
* Update toctree.yaml
---------
Co-authored-by: AMohamedAakhil <a.aakhilmohamed@gmail.com >
Co-authored-by: BootesVoid <78485654+AMohamedAakhil@users.noreply.github.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-19 10:37:22 -08:00
Linoy Tsaban
acf479bded
[advanced flux training] bug fix + reduce memory cost as in #9829 ( #9838 )
...
* memory improvement as done here: https://github.com/huggingface/diffusers/pull/9829
* fix bug
* fix bug
* style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-19 08:43:36 +05:30
Parag Ekbote
03bf77c4af
Notebooks for Community Scripts-2 ( #9952 )
...
4 Notebooks for Community Scripts and minor
script improvements.
2024-11-18 12:58:57 -08:00
Grant Sherrick
c3c94fe71b
Add server example ( #9918 )
...
* Add server example.
* Minor updates to README.
* Add fixes after local testing.
* Apply suggestions from code review
Updates to README from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* More doc updates.
* Maybe this will work to build the docs correctly?
* Fix style issues.
* Fix toc.
* Minor reformatting.
* Move docs to proper loc.
* Fix missing tick.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Sync docs changes back to README.
* Very minor update to docs to add space.
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2024-11-18 09:26:13 -08:00
Parag Ekbote
e255920719
Move Wuerstchen Dreambooth to research_projects ( #9935 )
...
update file paths to research_projects folder.
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-16 18:56:16 +05:30
Parag Ekbote
1dbd26fa23
Notebooks for Community Scripts Examples ( #9905 )
...
* Add Notebooks on Community Scripts
2024-11-12 14:08:48 -10:00
Sayak Paul
d720b2132e
[Advanced LoRA v1.5] fix: gradient unscaling problem ( #7018 )
...
fix: gradient unscaling problem
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2024-11-08 19:31:43 -04:00
SahilCarterr
9cc96a64f1
[FIX] Fix TypeError in DreamBooth SDXL when use_dora is False ( #9879 )
...
* fix use_dora
* fix style and quality
* fix use_dora with peft version
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-08 19:09:24 -04:00
Michael Tkachuk
5b972fbd6a
Enabling gradient checkpointing in eval() mode ( #9878 )
...
* refactored
2024-11-08 09:03:26 -10:00
Sayak Paul
ded3db164b
[Core] introduce controlnet module ( #8768 )
...
* move vae flax module.
* controlnet module.
* prepare for PR.
* revert a commit
* gracefully deprecate controlnet deps.
* fix
* fix doc path
* fix-copies
* fix path
* style
* style
* conflicts
* fix
* fix-copies
* sparsectrl.
* updates
* fix
* updates
* updates
* updates
* fix
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2024-11-06 22:08:55 -04:00
SahilCarterr
76b7d86a9a
Updated _encode_prompt_with_clip and encode_prompt in train_dreamboth_sd3 ( #9800 )
...
* updated encode prompt and clip encod prompt
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-05 15:08:50 -10:00
Sookwan Han
e2b3c248d8
Add new community pipeline for 'Adaptive Mask Inpainting', introduced in [ECCV2024] ComA ( #9228 )
...
* Add new community pipeline for 'Adaptive Mask Inpainting', introduced in [ECCV2024] Beyond the Contact: Discovering Comprehensive Affordance for 3D Objects from Pre-trained 2D Diffusion Models
2024-11-05 15:05:58 -10:00
Dorsa Rohani
c10f875ff0
Add Diffusion Policy for Reinforcement Learning ( #9824 )
...
* enable cpu ability
* model creation + comprehensive testing
* training + tests
* all tests working
* remove unneeded files + clarify docs
* update train tests
* update readme.md
* remove data from gitignore
* undo cpu enabled option
* Update README.md
* update readme
* code quality fixes
* diffusion policy example
* update readme
* add pretrained model weights + doc
* add comment
* add documentation
* add docstrings
* update comments
* update readme
* fix code quality
* Update examples/reinforcement_learning/README.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* Update examples/reinforcement_learning/diffusion_policy.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* suggestions + safe globals for weights_only=True
* suggestions + safe weights loading
* fix code quality
* reformat file
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-02 09:18:44 +05:30
Leo Jiang
a98a839de7
Reduce Memory Cost in Flux Training ( #9829 )
...
* Improve NPU performance
* Improve NPU performance
* Improve NPU performance
* Improve NPU performance
* [bugfix] bugfix for npu free memory
* [bugfix] bugfix for npu free memory
* [bugfix] bugfix for npu free memory
* Reduce memory cost for flux training process
---------
Co-authored-by: 蒋硕 <jiangshuo9@h-partners.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-01 12:19:32 +05:30
Boseong Jeon
3deed729e6
Handling mixed precision for dreambooth flux lora training ( #9565 )
...
Handling mixed precision and add unwarp
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2024-11-01 10:16:05 +05:30
ScilenceForest
7ffbc2525f
Update train_controlnet_flux.py,Fix size mismatch issue in validation ( #9679 )
...
Update train_controlnet_flux.py
Fix the problem of inconsistency between size of image and size of validation_image which causes np.stack to report error.
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-11-01 10:15:10 +05:30
Leo Jiang
9dcac83057
NPU Adaption for FLUX ( #9751 )
...
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
* NPU implementation for FLUX
---------
Co-authored-by: 蒋硕 <jiangshuo9@h-partners.com >
2024-11-01 09:03:15 +05:30
Abhipsha Das
c75431843f
[Model Card] standardize advanced diffusion training sd15 lora ( #7613 )
...
* modelcard generation edit
* add missed tag
* fix param name
* fix var
* change str to dict
* add use_dora check
* use correct tags for lora
* make style && make quality
---------
Co-authored-by: Aryan <aryan@huggingface.co >
2024-11-01 03:23:00 +05:30
Sayak Paul
8ce37ab055
[training] use the lr when using 8bit adam. ( #9796 )
...
* use the lr when using 8bit adam.
* remove lr as we pack it in params_to_optimize.
---------
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2024-10-31 15:51:42 +05:30
Sayak Paul
09b8aebd67
[training] fixes to the quantization training script and add AdEMAMix optimizer as an option ( #9806 )
...
* fixes
* more fixes.
2024-10-31 15:46:00 +05:30
Raul Ciotescu
c5376c5695
adds the pipeline for pixart alpha controlnet ( #8857 )
...
* add the controlnet pipeline for pixart alpha
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: junsongc <cjs1020440147@icloud.com >
2024-10-28 08:48:04 -10:00
Linoy Tsaban
743a5697f2
[flux dreambooth lora training] make LoRA target modules configurable + small bug fix ( #9646 )
...
* make lora target modules configurable and change the default
* style
* make lora target modules configurable and change the default
* fix bug when using prodigy and training te
* fix mixed precision training as proposed in https://github.com/huggingface/diffusers/pull/9565 for full dreambooth as well
* add test and notes
* style
* address sayaks comments
* style
* fix test
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-10-28 17:27:41 +02:00
Linoy Tsaban
db5b6a9630
[SD 3.5 Dreambooth LoRA] support configurable training block & layers ( #9762 )
...
* configurable layers
* configurable layers
* update README
* style
* add test
* style
* add layer test, update readme, add nargs
* readme
* test style
* remove print, change nargs
* test arg change
* style
* revert nargs 2/2
* address sayaks comments
* style
* address sayaks comments
2024-10-28 16:07:54 +02:00
Biswaroop
493aa74312
[Fix] remove setting lr for T5 text encoder when using prodigy in flux dreambooth lora script ( #9473 )
...
* fix: removed setting of text encoder lr for T5 as it's not being tuned
* fix: removed setting of text encoder lr for T5 as it's not being tuned
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2024-10-28 13:07:30 +02:00
Vinh H. Pham
3b5b1c5698
[Fix] train_dreambooth_lora_flux_advanced ValueError: unexpected save model: <class 'transformers.models.t5.modeling_t5.T5EncoderModel'> ( #9777 )
...
fix save state te T5
2024-10-28 12:52:27 +02:00
Sayak Paul
fddbab7993
[research_projects] Update README.md to include a note about NF5 T5-xxl ( #9775 )
...
Update README.md
2024-10-26 22:13:03 +09:00
Ina
73b59f5203
[refactor] enhance readability of flux related pipelines ( #9711 )
...
* flux pipline: readability enhancement.
2024-10-25 11:01:51 -10:00
Sayak Paul
df073ba137
[research_projects] add flux training script with quantization ( #9754 )
...
* add flux training script with quantization
* remove exclamation
2024-10-26 00:07:57 +09:00
Linoy Tsaban
bfa0aa4ff2
[SD3-5 dreambooth lora] update model cards ( #9749 )
...
* improve readme
* style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2024-10-23 23:16:53 +03:00
Sayak Paul
e45c25d03a
post-release 0.31.0 ( #9742 )
...
* post-release
* style
2024-10-22 20:42:30 +05:30
Yu Zheng
b0ffe92230
Update sd3 controlnet example ( #9735 )
...
* use make_image_grid in diffusers.utils
* use checkpoint on the Hub
2024-10-22 09:02:16 +05:30
Tolga Cangöz
1b64772b79
Fix schedule_shifted_power usage in 🪆 Matryoshka Diffusion Models ( #9723 )
...
* [matryoshka.py] Add schedule_shifted_power attribute and update get_schedule_shifted method
2024-10-21 14:23:50 -10:00
G.O.D
63a0c9e5f7
[bugfix] reduce float value error when adding noise ( #9004 )
...
* Update train_controlnet.py
reduce float value error for bfloat16
* Update train_controlnet_sdxl.py
* style
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: yiyixuxu <yixu310@gmail.com >
2024-10-21 13:26:05 -10:00