Kohya S
bf91bea2e4
fix flip_aug, alpha_mask, random_crop issue in caching
2024-09-26 20:51:40 +09:00
Kohya S
da94fd934e
fix typos
2024-09-26 08:27:48 +09:00
Kohya S
56a7bc171d
new block swap for FLUX.1 fine tuning
2024-09-26 08:26:31 +09:00
sdbds
1beddd84e5
delete code for cleaning
2024-09-25 22:58:26 +08:00
Kohya S
65fb69f808
Merge branch 'dev' into sd3
2024-09-25 20:56:16 +09:00
Kohya S
e74f58148c
update README
2024-09-25 20:55:50 +09:00
Kohya S.
c1d16a76d6
Merge pull request #1628 from recris/huber-timesteps
...
Make timesteps work in the standard way when Huber loss is used
2024-09-25 20:52:55 +09:00
sdbds
ab7b231870
init
2024-09-25 19:38:52 +08:00
Kohya S.
fba769222b
Merge branch 'dev' into sd3
2024-09-23 21:20:02 +09:00
Kohya S
29177d2f03
retain alpha in pil_resize backport #1619
2024-09-23 21:14:03 +09:00
recris
e1f23af1bc
make timestep sampling behave in the standard way when huber loss is used
2024-09-21 13:21:56 +01:00
Kohya S.
95ff9dba0c
Merge pull request #1619 from emcmanus/patch-1
...
Retain alpha in `pil_resize` for `--alpha_mask`
2024-09-20 22:24:49 +09:00
Kohya S
583d4a436c
add compatibility for int LR (D-Adaptation etc.) #1620
2024-09-20 22:22:24 +09:00
Kohya S.
24f8975fb7
Merge pull request #1620 from Akegarasu/sd3
...
fix: backward compatibility for text_encoder_lr
2024-09-20 22:16:39 +09:00
Akegarasu
0535cd29b9
fix: backward compatibility for text_encoder_lr
2024-09-20 10:05:22 +08:00
Ed McManus
de4bb657b0
Update utils.py
...
Cleanup
2024-09-19 14:38:32 -07:00
Ed McManus
3957372ded
Retain alpha in pil_resize
...
Currently the alpha channel is dropped by `pil_resize()` when `--alpha_mask` is supplied and the image width does not exceed the bucket.
This codepath is entered on the last line, here:
```
def trim_and_resize_if_required(
random_crop: bool, image: np.ndarray, reso, resized_size: Tuple[int, int]
) -> Tuple[np.ndarray, Tuple[int, int], Tuple[int, int, int, int]]:
image_height, image_width = image.shape[0:2]
original_size = (image_width, image_height) # size before resize
if image_width != resized_size[0] or image_height != resized_size[1]:
# リサイズする
if image_width > resized_size[0] and image_height > resized_size[1]:
image = cv2.resize(image, resized_size, interpolation=cv2.INTER_AREA) # INTER_AREAでやりたいのでcv2でリサイズ
else:
image = pil_resize(image, resized_size)
```
2024-09-19 14:30:03 -07:00
Kohya S
b844c70d14
Merge branch 'dev' into sd3
2024-09-19 21:51:33 +09:00
Kohya S.
0b7927e50b
Merge pull request #1615 from Maru-mee/patch-1
...
Bug fix: alpha_mask load
2024-09-19 21:49:49 +09:00
Kohya S
706a48d50e
Merge branch 'dev' into sd3
2024-09-19 21:15:39 +09:00
Kohya S
d7e14721e2
Merge branch 'main' into dev
2024-09-19 21:15:19 +09:00
Kohya S
9c757c2fba
fix SDXL block index to match LBW
2024-09-19 21:14:57 +09:00
Maru-mee
e7040669bc
Bug fix: alpha_mask load
2024-09-19 15:47:06 +09:00
Kohya S
1286e00bb0
fix to call train/eval in schedulefree #1605
2024-09-18 21:31:54 +09:00
Kohya S
e74502117b
update README
2024-09-18 08:04:32 +09:00
Kohya S.
bbd160b4ca
sd3 schedule free opt ( #1605 )
...
* New ScheduleFree support for Flux (#1600 )
* init
* use no schedule
* fix typo
* update for eval()
* fix typo
* update
* Update train_util.py
* Update requirements.txt
* update sfwrapper WIP
* no need to check schedulefree optimizer
* remove debug print
* comment out schedulefree wrapper
* update readme
---------
Co-authored-by: 青龍聖者@bdsqlsz <865105819@qq.com >
2024-09-18 07:55:04 +09:00
Kohya S
a2ad7e5644
blocks_to_swap=0 means no swap
2024-09-17 21:42:14 +09:00
Kohya S
0cbe95bcc7
fix text_encoder_lr to work with int closes #1608
2024-09-17 21:21:28 +09:00
Kohya S
d8d15f1a7e
add support for specifying blocks in FLUX.1 LoRA training
2024-09-16 23:14:09 +09:00
Kohya S
96c677b459
fix to work lienar/cosine lr scheduler closes #1602 ref #1393
2024-09-16 10:42:09 +09:00
Kohya S
be078bdaca
fix typo
2024-09-15 13:59:17 +09:00
Kohya S
9f44ef1330
add diffusers to FLUX.1 conversion script
2024-09-15 13:52:23 +09:00
Kohya S
6445bb2bc9
update README
2024-09-14 22:37:26 +09:00
Kohya S
c9ff4de905
Add support for specifying rank for each layer in FLUX.1
2024-09-14 22:17:52 +09:00
Kohya S
2d8ee3c280
OFT for FLUX.1
2024-09-14 15:48:16 +09:00
Kohya S
0485f236a0
Merge branch 'dev' into sd3
2024-09-13 22:39:24 +09:00
Kohya S
93d9fbf607
improve OFT implementation closes #944
2024-09-13 22:37:11 +09:00
Kohya S
c15a3a1a65
Merge branch 'dev' into sd3
2024-09-13 21:30:49 +09:00
Kohya S
43ad73860d
Merge branch 'main' into dev
2024-09-13 21:29:51 +09:00
Kohya S
b755ebd0a4
add LBW support for SDXL merge LoRA
2024-09-13 21:29:31 +09:00
Kohya S
f4a0bea6dc
format by black
2024-09-13 21:26:06 +09:00
terracottahaniwa
734d2e5b2b
Support Lora Block Weight (LBW) to svd_merge_lora.py ( #1575 )
...
* support lora block weight
* solve license incompatibility
* Fix issue: lbw index calculation
2024-09-13 20:45:35 +09:00
Kohya S
f3ce80ef8f
Merge branch 'dev' into sd3
2024-09-13 19:49:16 +09:00
Kohya S
9d2860760d
Merge branch 'main' into dev
2024-09-13 19:48:53 +09:00
Kohya S
3387dc7306
formatting, update README
2024-09-13 19:45:42 +09:00
Kohya S
57ae44eb61
refactor to make safer
2024-09-13 19:45:00 +09:00
Maru-mee
1d7118a622
Support : OFT merge to base model ( #1580 )
...
* Support : OFT merge to base model
* Fix typo
* Fix typo_2
* Delete unused parameter 'eye'
2024-09-13 19:01:36 +09:00
Kohya S
cefe52629e
fix to work old notation for TE LR in .toml
2024-09-12 12:36:07 +09:00
Kohya S
237317fffd
update README
2024-09-11 22:23:43 +09:00
Plat
a823fd9fb8
Improve wandb logging ( #1576 )
...
* fix: wrong training steps were recorded to wandb, and no log was sent when logging_dir was not specified
* fix: checking of whether wandb is enabled
* feat: log images to wandb with their positive prompt as captions
* feat: logging sample images' caption for sd3 and flux
* fix: import wandb before use
2024-09-11 22:21:16 +09:00