invokeAI-docs

InvokeAI provides the ability to merge two or three diffusers-type models into a new merged model. The resulting model will combine characteristics of the original, and can be used to teach an old model new tricks.

How to Merge Models

Model Merging can be be done by navigating to the Model Manager and clicking the “Merge Models” tab. From there, you can select the models and settings you want to use to merge th models.

Settings

You may run the merge script by starting the invoke launcher (invoke.sh or invoke.bat) and choosing the option (4) for merge models. This will launch a text-based interactive user interface that prompts you to select the models to merge, how to merge them, and the merged model name.

Alternatively you may activate InvokeAI’s virtual environment from the command line, and call the script via merge_models --gui to open up a version that has a nice graphical front end. To get the commandline- only version, omit --gui.

The user interface for the text-based interactive script is straightforward. It shows you a series of setting fields. Use control-N (^N) to move to the next field, and control-P (^P) to move to the previous one. You can also use TAB and shift-TAB to move forward and backward. Once you are in a multiple choice field, use the up and down cursor arrows to move to your desired selection, and press or

to select it. Change text fields by typing in them, and adjust scrollbars using the left and right arrow keys. Once you are happy with your settings, press the OK button. Note that there may be two pages of settings, depending on the height of your screen, and the OK button may be on the second page. Advance past the last field of the first page to get to the second page, and reverse this to get back. If the merge runs successfully, it will create a new diffusers model under the selected name and register it with InvokeAI.