Commit Graph

121 Commits

Author SHA1 Message Date
bmaltais
09939ff8a8 Remove legacy 8bit adam checkbox 2023-03-05 10:34:09 -05:00
bmaltais
3f45448f84
Merge branch 'master' into dev 2023-03-04 18:59:33 -05:00
bmaltais
3beeef4414 Add linux support 2023-03-04 18:56:22 -05:00
bmaltais
fa92a5c1e3
Merge branch 'dev' into master 2023-03-04 17:59:31 -05:00
bmaltais
e93de7f8ea Fix issue 296 2023-03-04 17:46:32 -05:00
devdn
129cd5f97d Revert "fix paths with spaces"
This reverts commit 7af9e48d30.
2023-03-04 17:13:02 -05:00
bmaltais
635509f00b Fix caption by git 2023-03-04 08:04:38 -05:00
devdn
7af9e48d30 fix paths with spaces 2023-03-04 00:39:34 -05:00
devNegative-asm
a79d7be063
Merge branch 'bmaltais:master' into master 2023-03-04 00:13:22 -05:00
devdn
bc45bd7e70 fix bugs that make some processes not work on linux 2023-03-04 00:11:23 -05:00
bmaltais
4c1448be72 Fix again the custom model config load
Update resize lora
2023-03-03 22:08:06 -05:00
bmaltais
d30abe5491 Fix issue 277 2023-03-03 07:11:15 -05:00
bmaltais
4c762e3abb Upgrade Gradio
Fix Gradio issues
Fix missing LoCon new GUI
2023-03-02 20:39:07 -05:00
bmaltais
182080bb78 Run blue 2023-03-01 19:24:11 -05:00
bmaltais
5498539fda Fix typos 2023-03-01 19:20:05 -05:00
bmaltais
7f0e5683c6 v21.0.1 2023-03-01 19:02:04 -05:00
bmaltais
1e3055c895 Update tensorboard 2023-03-01 13:14:47 -05:00
bmaltais
9d2e3f85a2 Add tensorboard support 2023-02-26 19:49:22 -05:00
bmaltais
6b5d6303cc Update 2023-02-26 15:11:21 -05:00
bmaltais
f213b15014 Updates 2023-02-24 20:37:51 -05:00
bmaltais
3b93266aae Bug: Fix issue: https://github.com/bmaltais/kohya_ss/issues/231 2023-02-24 07:30:37 -05:00
bmaltais
8775667fc7 Updates 2023-02-23 21:48:45 -05:00
bmaltais
60ad22733c Update to latest code version 2023-02-23 19:21:30 -05:00
bmaltais
bf0344ba9e Adding GUI support for new features 2023-02-22 20:32:57 -05:00
bmaltais
2a5fb346d5 Sinc to latest code update on sd-script 2023-02-22 13:30:29 -05:00
bmaltais
758bfe85dc Adding support for Lion optimizer in gui 2023-02-19 20:13:03 -05:00
bmaltais
bb57c1a36e Update code to latest sd-script version 2023-02-19 06:50:33 -05:00
bmaltais
641a168e55 Integrate new kohya sd-script 2023-02-14 18:52:08 -05:00
bmaltais
a49fb9cb8c 2023/02/11 (v20.7.2):
- ``lora_interrogator.py`` is added in ``networks`` folder. See ``python networks\lora_interrogator.py -h`` for usage.
        - For LoRAs where the activation word is unknown, this script compares the output of Text Encoder after applying LoRA to that of unapplied to find out which token is affected by LoRA. Hopefully you can figure out the activation word. LoRA trained with captions does not seem to be able to interrogate.
        - Batch size can be large (like 64 or 128).
    - ``train_textual_inversion.py`` now supports multiple init words.
    - Following feature is reverted to be the same as before. Sorry for confusion:
        > Now the number of data in each batch is limited to the number of actual images (not duplicated). Because a certain bucket may contain smaller number of actual images, so the batch may contain same (duplicated) images.
    - Add new tool to sort, group and average crop image in a dataset
2023-02-11 11:59:38 -05:00
bmaltais
e5f8ba559f Add server_port and inbrowser support
- to all gui scripts
2023-02-10 08:22:03 -05:00
bmaltais
7bc93821a0 2023/02/09 (v20.7.1)
- Caption dropout is supported in ``train_db.py``, ``fine_tune.py`` and ``train_network.py``. Thanks to forestsource!
        - ``--caption_dropout_rate`` option specifies the dropout rate for captions (0~1.0, 0.1 means 10% chance for dropout). If dropout occurs, the image is trained with the empty caption. Default is 0 (no dropout).
        - ``--caption_dropout_every_n_epochs`` option specifies how many epochs to drop captions. If ``3`` is specified, in epoch 3, 6, 9 ..., images are trained with all captions empty. Default is None (no dropout).
        - ``--caption_tag_dropout_rate`` option specified the dropout rate for tags (comma separated tokens) (0~1.0, 0.1 means 10% chance for dropout). If dropout occurs, the tag is removed from the caption. If ``--keep_tokens`` option is set, these tokens (tags) are not dropped. Default is 0 (no droupout).
        - The bulk image downsampling script is added. Documentation is [here](https://github.com/kohya-ss/sd-scripts/blob/main/train_network_README-ja.md#%E7%94%BB%E5%83%8F%E3%83%AA%E3%82%B5%E3%82%A4%E3%82%BA%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88) (in Jpanaese). Thanks to bmaltais!
        - Typo check is added. Thanks to shirayu!
    - Add option to autolaunch the GUI in a browser and set the server_port. USe either `gui.ps1 --inbrowser --server_port 3456`or `gui.cmd -inbrowser -server_port 3456`
2023-02-09 19:17:24 -05:00
bmaltais
09d3a72cd8 Adding support for caption dropout 2023-02-07 20:58:35 -05:00
bmaltais
8d559ded18 * 2023/02/06 (v20.7.0)
- ``--bucket_reso_steps`` and ``--bucket_no_upscale`` options are added to training scripts (fine tuning, DreamBooth, LoRA and Textual Inversion) and ``prepare_buckets_latents.py``.
    - ``--bucket_reso_steps`` takes the steps for buckets in aspect ratio bucketing. Default is 64, same as before.
        - Any value greater than or equal to 1 can be specified; 64 is highly recommended and a value divisible by 8 is recommended.
        - If less than 64 is specified, padding will occur within U-Net. The result is unknown.
        - If you specify a value that is not divisible by 8, it will be truncated to divisible by 8 inside VAE, because the size of the latent is 1/8 of the image size.
    - If ``--bucket_no_upscale`` option is specified, images smaller than the bucket size will be processed without upscaling.
        - Internally, a bucket smaller than the image size is created (for example, if the image is 300x300 and ``bucket_reso_steps=64``, the bucket is 256x256). The image will be trimmed.
        - Implementation of [#130](https://github.com/kohya-ss/sd-scripts/issues/130).
        - Images with an area larger than the maximum size specified by ``--resolution`` are downsampled to the max bucket size.
    - Now the number of data in each batch is limited to the number of actual images (not duplicated). Because a certain bucket may contain smaller number of actual images, so the batch may contain same (duplicated) images.
    - ``--random_crop`` now also works with buckets enabled.
        - Instead of always cropping the center of the image, the image is shifted left, right, up, and down to be used as the training data. This is expected to train to the edges of the image.
        - Implementation of discussion [#34](https://github.com/kohya-ss/sd-scripts/discussions/34).
2023-02-06 11:04:07 -05:00
bmaltais
cbfc311687 Integrate new bucket parameters in GUI 2023-02-05 20:07:00 -05:00
bmaltais
2486af9903 Update to latest dev code of kohya_s. WIP 2023-02-05 14:16:53 -05:00
bmaltais
2626214f8a Add support for LoRA resizing 2023-02-04 11:55:06 -05:00
bmaltais
045750b46a v20.6.0
- Increase max LoRA rank (dim) size to 1024.
    - Update finetune preprocessing scripts.
        - ``.bmp`` and ``.jpeg`` are supported. Thanks to breakcore2 and p1atdev!
        - The default weights of ``tag_images_by_wd14_tagger.py`` is now ``SmilingWolf/wd-v1-4-convnext-tagger-v2``. You can specify another model id from ``SmilingWolf`` by ``--repo_id`` option. Thanks to SmilingWolf for the great work.
        - To change the weight, remove ``wd14_tagger_model`` folder, and run the script again.
        - ``--max_data_loader_n_workers`` option is added to each script. This option uses the DataLoader for data loading to speed up loading, 20%~30% faster.
        - Please specify 2 or 4, depends on the number of CPU cores.
        - ``--recursive`` option is added to ``merge_dd_tags_to_metadata.py`` and ``merge_captions_to_metadata.py``, only works with ``--full_path``.
        - ``make_captions_by_git.py`` is added. It uses [GIT microsoft/git-large-textcaps](https://huggingface.co/microsoft/git-large-textcaps) for captioning.
        - ``requirements.txt`` is updated. If you use this script, [please update the libraries](https://github.com/kohya-ss/sd-scripts#upgrade).
        - Usage is almost the same as ``make_captions.py``, but batch size should be smaller.
        - ``--remove_words`` option removes as much text as possible (such as ``the word "XXXX" on it``).
        - ``--skip_existing`` option is added to ``prepare_buckets_latents.py``. Images with existing npz files are ignored by this option.
        - ``clean_captions_and_tags.py`` is updated to remove duplicated or conflicting tags, e.g. ``shirt`` is removed when ``white shirt`` exists. if ``black hair`` is with ``red hair``, both are removed.
    - Tag frequency is added to the metadata in ``train_network.py``. Thanks to space-nuko!
        - __All tags and number of occurrences of the tag are recorded.__ If you do not want it, disable metadata storing with ``--no_metadata`` option.
2023-02-04 08:36:35 -05:00
bmaltais
20e62af1a6 Update to latest kohya_ss sd-script code 2023-02-03 14:40:03 -05:00
bmaltais
c8f4c9d6e8 Add support for lr_scheduler_num_cycles, lr_scheduler_power 2023-01-30 08:26:15 -05:00
bmaltais
bc8a4757f8 Sync with kohya 2023/01/29 update 2023-01-29 11:10:06 -05:00
bmaltais
202923b3ce Add support for --keep_token option 2023-01-27 07:33:44 -05:00
bmaltais
03bd2e9b01 Add TI training support 2023-01-26 16:22:58 -05:00
bmaltais
49bada0d25 Update default save model file format to safetensors 2023-01-22 18:21:09 -05:00
bmaltais
511361c80b - Add new tool to verify LoRA weights produced by the trainer. Can be found under "Dreambooth LoRA/Tools/Verify LoRA 2023-01-22 11:40:14 -05:00
bmaltais
2ca17f69dd v20.4.0:
Add support for `network_alpha` under the Training tab and support for `--training_comment` under the Folders tab.
2023-01-22 10:18:00 -05:00
bmaltais
fcad6bfd98 Add default for caption extension tools 2023-01-20 18:41:37 -05:00
bmaltais
31a1c8a71a Merge kohya Jan 19 updates 2023-01-19 15:47:43 -05:00
bmaltais
567221549f Complete training code refactoring 2023-01-15 19:59:40 -05:00
bmaltais
123cf4e3c5 Move cxommon adv train parm to common gui 2023-01-15 15:03:04 -05:00
bmaltais
abccecb093 Move save_state and resume to common gui
Format code
2023-01-15 12:01:59 -05:00
bmaltais
6aed2bb402 Add support for new arguments:
- max_train_epochs
- max_data_loader_n_workers
Move some of the codeto  common gui library.
2023-01-15 11:05:22 -05:00
bmaltais
dc5afbb057 Move functions to common_gui
Add model name support
2023-01-09 11:48:57 -05:00
bmaltais
442eb7a292 Merge latest kohya code release into GUI repo 2023-01-09 07:47:07 -05:00
bmaltais
c79a8a9409 Add find/replace option to Basic Caption utility 2023-01-08 19:12:01 -05:00
bmaltais
34f7cd8e57 Add new Utility to Extract a LoRA from a finetuned model 2023-01-06 18:25:55 -05:00
bmaltais
c20a10d7fd Emergency fix for dreambooth_ui no longer working, sorry
- Add LoRA network merge too GUI. Run `pip install -U -r requirements.txt` after pulling this new release.
2023-01-06 07:13:12 -05:00
bmaltais
1d460a09fd add support for color and flip augmentation to "Dreambooth LoRA" 2023-01-01 22:43:44 -05:00
bmaltais
af46ce4c47 Update LoRA GUI
Various improvements
2023-01-01 14:14:58 -05:00
bmaltais
ee2499d834 Merge latest kohya_ss code update 2023-01-01 13:10:32 -05:00
bmaltais
0c5966f6f4 Fix issue with LR 2022-12-29 21:17:41 -05:00
bmaltais
b44f075f60 Implement open and save config for LoRA 2022-12-29 14:00:02 -05:00
bmaltais
5e3f32f69c Update GUI 2022-12-22 20:18:51 -05:00
bmaltais
f60c8addd5 Making gui more modular by dividing it 2022-12-22 11:51:34 -05:00
bmaltais
6a7e27e100 fix issue with dataset balancing when the number of detected images in the folder is 0 2022-12-21 11:02:49 -05:00
bmaltais
1bc5089db8 Create model and log folder when running th dreambooth folder creation utility 2022-12-20 10:07:22 -05:00
bmaltais
706dfe157f
Merge dreambooth and finetuning in one repo to align with kohya_ss new repo (#10)
* Merge both dreambooth and finetune back in one repo
2022-12-20 09:15:17 -05:00
bmaltais
1f1dd5c4de Add support for:
shuffle_caption,
save_state,
resume,
prior_loss_weight,

Fix issue with config open and save
2022-12-19 21:50:05 -05:00
bmaltais
1d412726b3 Add new prefix and postfic for captions 2022-12-19 11:43:29 -05:00
bmaltais
61a9481903 Fix save as issue 2022-12-19 09:47:35 -05:00
bmaltais
c90aa2cc61 - Fix file/folder opening behind the browser window
- Add WD14 and BLIP captioning to utilities
- Improve overall GUI layout
2022-12-19 09:22:52 -05:00
bmaltais
0ca93a7aa7 v18.1: Model conversion utility 2022-12-18 13:11:10 -05:00