From 8fe3d6ab50f3ecc38871f986a8a7384df56b2467 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 24 Dec 2022 22:54:24 +0530 Subject: [PATCH] Created Model Merging (markdown) --- Model-Merging.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Model-Merging.md diff --git a/Model-Merging.md b/Model-Merging.md new file mode 100644 index 0000000..d86401f --- /dev/null +++ b/Model-Merging.md @@ -0,0 +1,14 @@ +**This feature is available in versions 2.5.0 and higher** + +You can merge two Stable Diffusion models (in `.ckpt` or `.safetensors` formats). A UI is planned for this, but for now, you can follow these steps to merge models easily: + +1. Double-click the `Developer Console.cmd` file (on Linux: open terminal, and run `./developer_console.sh`) +2. Type `python` and press enter. +3. Type `from sdkit.train import merge_models` +4. Type `merge_models('C:/path/to/first_model.ckpt', 'C:/path/to/second_model.safetensors', ratio=0.3, 'C:/path/to/merged_model.safetensors', use_fp16=True) + +Set the `ratio` to a number between 0 and 1. This decides the contribution of the two models. A ratio of 0 means only the first model will be used, and a ratio of 1 means only the second model will be used. A ratio of 0.5 means half of each model will be used. + +That's it. Your merged model will be stored at the path you mentioned. + +We're working on providing a UI for this as well. \ No newline at end of file