Prepare for release

doc: add description about new things on README.md
fix_update
bbc_mc 2023-01-12 02:26:29 +09:00
parent d301fbece7
commit 373658a9ce
8 changed files with 66 additions and 30 deletions

View File

@ -4,12 +4,14 @@
- Implementation GUI of [Merge Block Weighted] (https://note.com/kohya_ss/n/n9a485a066d5b) idea by kohya_ss
- change some part of script to adjust for AUTO1111, basic method is not changed.
# Recent Update
- 2022/12/25: Add new feature and new UI
- 2023/01/12: Add some function
- Save as half
- Save as safetensors
- Select of "Skip/Reset CKIP `position_ids`"
- 2022/12/25: Add new feature and new UI
- Read "README" [English](README_each.md)/[日本語](README_each.ja.md)
#
@ -21,21 +23,30 @@
## Table of contents
<!--ts-->
* [How to Install](#how-to-install)
* [How to use](#how-to-use)
* [Select `model_A` and `model_B`, and input `Output model name`](#select-model_a-and-model_b-and-input-output-model-name)
* [Set merge ratio for each block of U-Net](#set-merge-ratio-for-each-block-of-u-net)
* [Setting values](#setting-values)
* [Other settings](other-settings)
* [Other function](#other-function)
* [Save Merge Log](#save-merge-log)
* [Sample/Example](#sampleexample)
* [result (x/y)](#result-xy)
* [後述1: weight1](#%E5%BE%8C%E8%BF%B01-weight1)
* [後述2: weight2](#%E5%BE%8C%E8%BF%B02-weight2)
* [Preset's grids](#presets-grids)
* [Examples of Sigmoid-like Functions](#examples-of-sigmoid-like-functions)
* [Special Thanks](#special-thanks)
<!--te-->
## How to Install
@ -78,10 +89,12 @@
- Weights must have 25 values and comma separated
### Setting values
## Setting values
![](misc/bw05.png)
### base_alpha
- set "base_alpha"
| base_alpha | |
@ -98,6 +111,27 @@
- Merged output is saved in normal "Model" folder.
### Save as half / safetensors
![](misc/bw09.png)
- Settings about save
- "Save as half" mean float16
- "Save as safetensors". If you set your output file ext as `.safetensors`, automaticaly saved as safetensors with/without this setting.
### Skip/Reset CKIP `position_ids`key value
![](misc/bw10.png)
- In this function, you can select treatment of `position_ids` value in CLIP.
- Values in this key controls matching of your prompt and embeddings.
- I've try to found the cause of 'Some model ignore No.1 token(word)' problem, and write some report about that. (https://note.com/bbcmc/n/n12c05bf109cc)
- Arenatemp already have spectation of inside of models, and published Extension to fix this CLIP key problem. See also,
- [stable-diffusion-webui-model-toolkit](https://github.com/arenatemp/stable-diffusion-webui-model-toolkit)
- MBW is also affected by this problem, because some model may (potensialy) have this issue, and causes/transfer some trouble to merged result model.
## Other function
### Save Merge Log

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

BIN
misc/bw09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
misc/bw10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -17,11 +17,11 @@ def on_ui_tabs():
with gr.Column():
with gr.Row():
with gr.Column(variant="panel"):
html_output_block_weight_info = gr.HTML()
with gr.Row():
btn_do_merge_block_weighted = gr.Button(value="Run Merge", variant="primary")
btn_clear_weight = gr.Button(value="Clear values")
btn_reload_checkpoint_mbw = gr.Button(value="Reload checkpoint")
html_output_block_weight_info = gr.HTML()
with gr.Column():
dd_preset_weight = gr.Dropdown(label="Preset Weights", choices=presetWeights.get_preset_name_list())
txt_block_weight = gr.Text(label="Weight values", placeholder="Put weight sets. float number x 25")
@ -32,10 +32,11 @@ def on_ui_tabs():
chk_allow_overwrite = gr.Checkbox(label="Allow overwrite output-model", value=False)
with gr.Row():
with gr.Column(scale=3):
with gr.Row():
chk_save_as_half = gr.Checkbox(label="Save as half", value=False)
chk_save_as_safetensors = gr.Checkbox(label="Save as safetensors", value=False)
with gr.Column(scale=4):
radio_position_ids = gr.Radio(label="Skip/Reset CLIP position_ids", choices=["None", "Skip", "Force Reset"], value="Skip", type="index")
radio_position_ids = gr.Radio(label="Skip/Reset CLIP position_ids", choices=["None", "Skip", "Force Reset"], value="None", type="index")
with gr.Row():
model_A = gr.Dropdown(label="Model A", choices=sd_models.checkpoint_tiles())
model_B = gr.Dropdown(label="Model B", choices=sd_models.checkpoint_tiles())

View File

@ -17,13 +17,13 @@ def on_ui_tabs():
with gr.Column():
with gr.Row():
with gr.Column(variant="panel"):
with gr.Row():
txt_multi_process_cmd = gr.TextArea(label="Multi Proc Cmd", placeholder="Keep empty if dont use.")
html_output_block_weight_info = gr.HTML()
with gr.Row():
btn_do_merge_block_weighted = gr.Button(value="Run Merge", variant="primary")
btn_clear_weighted = gr.Button(value="Clear values")
btn_reload_checkpoint_mbw = gr.Button(value="Reload checkpoint")
with gr.Row():
txt_multi_process_cmd = gr.TextArea(label="Multi Proc Cmd", placeholder="Keep empty if dont use.")
html_output_block_weight_info = gr.HTML()
with gr.Column():
dd_preset_weight = gr.Dropdown(label="Preset_Weights", choices=presetWeights.get_preset_name_list())
txt_block_weight = gr.Text(label="Weight_values", placeholder="Put weight sets. float number x 25")
@ -34,10 +34,11 @@ def on_ui_tabs():
chk_allow_overwrite = gr.Checkbox(label="Allow overwrite output-model", value=False)
with gr.Row():
with gr.Column(scale=3):
with gr.Row():
chk_save_as_half = gr.Checkbox(label="Save as half", value=False)
chk_save_as_safetensors = gr.Checkbox(label="Save as safetensors", value=False)
with gr.Column(scale=4):
radio_position_ids = gr.Radio(label="Skip/Reset CLIP position_ids", choices=["None", "Skip", "Force Reset"], value="Skip", type="index")
radio_position_ids = gr.Radio(label="Skip/Reset CLIP position_ids", choices=["None", "Skip", "Force Reset"], value="None", type="index")
with gr.Row():
dd_model_A = gr.Dropdown(label="Model_A", choices=sd_models.checkpoint_tiles())
dd_model_B = gr.Dropdown(label="Model_B", choices=sd_models.checkpoint_tiles())