Kohya S
e24d9606a2
add clean_memory_on_device and use it from training
2024-02-12 11:10:52 +09:00
Kohya S
75ecb047e2
Merge branch 'dev' into dev_device_support
2024-02-11 19:51:28 +09:00
BootsofLagrangian
03f0816f86
the reason not working grad accum steps found. it was becasue of my accelerate settings
2024-02-09 17:47:49 +09:00
BootsofLagrangian
a98fecaeb1
forgot setting mixed_precision for deepspeed. sorry
2024-02-07 17:19:46 +09:00
BootsofLagrangian
62556619bd
fix full_fp16 compatible and train_step
2024-02-07 16:42:05 +09:00
BootsofLagrangian
3970bf4080
maybe fix branch to run offloading
2024-02-05 22:40:43 +09:00
BootsofLagrangian
2824312d5e
fix vae type error during training sdxl
2024-02-05 20:13:28 +09:00
BootsofLagrangian
64873c1b43
fix offload_optimizer_device typo
2024-02-05 17:11:50 +09:00
Yuta Hayashibe
5f6bf29e52
Replace print with logger if they are logs ( #905 )
...
* Add get_my_logger()
* Use logger instead of print
* Fix log level
* Removed line-breaks for readability
* Use setup_logging()
* Add rich to requirements.txt
* Make simple
* Use logger instead of print
---------
Co-authored-by: Kohya S <52813779+kohya-ss@users.noreply.github.com >
2024-02-04 18:14:34 +09:00
Kohya S
e793d7780d
reduce peak VRAM in sample gen
2024-02-04 17:31:01 +09:00
BootsofLagrangian
dfe08f395f
support deepspeed
2024-02-04 03:12:42 +09:00
Kohya S
2f9a344297
fix typo
2024-02-03 23:26:57 +09:00
Kohya S
11aced3500
simplify multi-GPU sample generation
2024-02-03 22:25:29 +09:00
DKnight54
1567ce1e17
Enable distributed sample image generation on multi-GPU enviroment ( #1061 )
...
* Update train_util.py
Modifying to attempt enable multi GPU inference
* Update train_util.py
additional VRAM checking, refactor check_vram_usage to return string for use with accelerator.print
* Update train_network.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
remove sample image debug outputs
* Update train_util.py
* Update train_util.py
* Update train_network.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_network.py
* Update train_util.py
* Update train_network.py
* Update train_network.py
* Update train_network.py
* Cleanup of debugging outputs
* adopt more elegant coding
Co-authored-by: Aarni Koskela <akx@iki.fi >
* Update train_util.py
Fix leftover debugging code
attempt to refactor inference into separate function
* refactor in function generate_per_device_prompt_list() generation of distributed prompt list
* Clean up missing variables
* fix syntax error
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* true random sample image generation
update code to reinitialize random seed to true random if seed was set
* true random sample image generation
* simplify per process prompt
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_util.py
* Update train_network.py
* Update train_network.py
* Update train_network.py
---------
Co-authored-by: Aarni Koskela <akx@iki.fi >
2024-02-03 21:46:31 +09:00
Kohya S
5cca1fdc40
add highvram option and do not clear cache in caching latents
2024-02-01 21:55:55 +09:00
Disty0
a6a2b5a867
Fix IPEX support and add XPU device to device_utils
2024-01-31 17:32:37 +03:00
Kohya S
2ca4d0c831
Merge pull request #1054 from akx/mps
...
Device support improvements (MPS)
2024-01-31 21:30:12 +09:00
Kohya S
c576f80639
Fix ControlNetLLLite training issue #1069
2024-01-25 18:43:07 +09:00
Aarni Koskela
afc38707d5
Refactor memory cleaning into a single function
2024-01-23 14:28:50 +02:00
Aarni Koskela
2e4bee6f24
Log accelerator device
2024-01-23 14:20:40 +02:00
Kohya S
fef172966f
Add network_multiplier for dataset and train LoRA
2024-01-20 16:24:43 +09:00
Kohaku-Blueleaf
9cfa68c92f
[Experimental Feature] FP8 weight dtype for base model when running train_network (or sdxl_train_network) ( #1057 )
...
* Add fp8 support
* remove some debug prints
* Better implementation for te
* Fix some misunderstanding
* as same as unet, add explicit convert
* better impl for convert TE to fp8
* fp8 for not only unet
* Better cache TE and TE lr
* match arg name
* Fix with list
* Add timeout settings
* Fix arg style
* Add custom seperator
* Fix typo
* Fix typo again
* Fix dtype error
* Fix gradient problem
* Fix req grad
* fix merge
* Fix merge
* Resolve merge
* arrangement and document
* Resolve merge error
* Add assert for mixed precision
2024-01-20 09:46:53 +09:00
Kohya S
09ef3ffa8b
Merge branch 'main' into dev
2024-01-14 21:49:25 +09:00
Nir Weingarten
ab716302e4
Added cli argument for wandb session name
2024-01-03 11:52:38 +02:00
Plat
62e7516537
feat: support torch.compile
2023-12-27 02:17:24 +09:00
Kohya S
3efd90b2ad
fix sampling in training with mutiple gpus ref #989
2023-12-15 22:35:54 +09:00
Kohya S
d309a27a51
change option names, add ddp kwargs if needed ref #1000
2023-12-13 21:02:26 +09:00
Kohya S
471d274803
Merge pull request #1000 from Isotr0py/dev
...
Fix multi-gpu SDXL training
2023-12-13 20:52:11 +09:00
Kohya S
35f4c9b5c7
fix an error when keep_tokens_separator is not set ref #975
2023-12-12 21:43:21 +09:00
Kohya S
034a49c69d
Merge pull request #975 from Linaqruf/dev
...
Add keep_tokens_separator as alternative for keep_tokens
2023-12-12 21:28:32 +09:00
Isotr0py
bb5ae389f7
fix DDP SDXL training
2023-12-12 19:58:44 +08:00
Kohya S
4a2cef887c
fix lllite training not working ref #913
2023-12-10 09:23:37 +09:00
Kohya S
42750f7846
fix error on pool_workaround in sdxl TE training ref #994
2023-12-10 09:18:33 +09:00
Isotr0py
db84530074
Fix gradients synchronization for multi-GPUs training ( #989 )
...
* delete DDP wrapper
* fix train_db vae and train_network
* fix train_db vae and train_network unwrap
* network grad sync
---------
Co-authored-by: Kohya S <52813779+kohya-ss@users.noreply.github.com >
2023-12-07 22:01:42 +09:00
Kohya S
81a440c8e8
Merge pull request #955 from xzuyn/paged_adamw
...
Add PagedAdamW
2023-12-03 21:22:38 +09:00
Kohya S
f24a3b5282
show seed in generating samples
2023-12-03 21:15:30 +09:00
Kohya S
383b4a2c3e
Merge pull request #907 from shirayu/add_option_sample_at_first
...
Add option --sample_at_first
2023-12-03 21:00:32 +09:00
Kohya S
df59822a27
Merge pull request #906 from shirayu/accept_scheduler_designation_in_training
...
Accept sampler designation in sampling of training
2023-12-03 20:46:16 +09:00
Furqanil Taqwa
1bdd83a85f
remove unnecessary debug print
2023-11-28 17:26:27 +07:00
Furqanil Taqwa
1624c239c2
added keep_tokens_separator to dynamically keep token for being shuffled
2023-11-28 17:23:55 +07:00
Kohya S
f312522cef
Merge pull request #913 from KohakuBlueleaf/custom-seperator
...
Add custom seperator for shuffle caption
2023-11-19 21:32:01 +09:00
xzuyn
da5a144589
Add PagedAdamW
2023-11-18 07:47:27 -05:00
Kohya S
6231aa91e2
common lr logging, set default None to ddp_timeout
2023-11-05 19:09:17 +09:00
Kohaku-Blueleaf
583e2b2d01
Fix typo
2023-10-30 20:02:04 +08:00
Kohaku-Blueleaf
5dc2a0d3fd
Add custom seperator
2023-10-30 19:55:30 +08:00
Yuta Hayashibe
fea810b437
Added --sample_at_first to generate sample images before training
2023-10-29 21:44:57 +09:00
Yuta Hayashibe
40d917b0fe
Removed incorrect comments
2023-10-29 21:02:44 +09:00
Yuta Hayashibe
cf876fcdb4
Accept --ss to set sample_sampler dynamically
2023-10-29 20:15:04 +09:00
Yuta Hayashibe
291c29caaf
Added a function line_to_prompt_dict() and removed duplicated initializations
2023-10-29 19:57:25 +09:00
Yuta Hayashibe
01e00ac1b0
Make a function get_my_scheduler()
2023-10-29 19:46:02 +09:00