HomeAI News
[Stable Diffusion Advanced Skills] How to train and use the HyperNetwork model
5

[Stable Diffusion Advanced Skills] How to train and use the HyperNetwork model

Noodleplan-icon
Noodle
March 15th, 2023
View OriginalTranslated by Google
Foreword: Please refer to this article for the installation environment of the training model and the preparation of the preliminary pictures .

Compared with learning the embedding of a single character, HyperNetworks is more suitable for AI to learn the overall style of the picture. HyperNetwork I use the Anything model to train.

operation process

1. Start SD WebUI

2. Switch to the Train page and enter the name in Create hypernetwork . Number of vectors per token is set to 7 or more. Click Create hypernetwork .

3. Switch to the Train page, select the hypernetwork just created, and enter the path of the training data in Dataset directory . Prompt template file select hypernetwork.txt.

4. Max Step set the training to 10000 steps to stop.

5. Finally, click Train HyperNetwork to start. SD WebUI will display the remaining time, and HyperNetwork will be longer than Embedding.

6. You can also go to texual_inversions/hypernetwork in the SD WebUI root directory to view the training results. There will be an images directory to store the results of the training in the first few steps.

7. After the training is completed, go to texual_Inversions/hypernetworks under the root directory of SD WeBUI, and select a suitable finished product according to the pictures in images directory.

8. For example, if you think 9500 steps are good, put the pt file in models/hypernetwork under the root directory of SD WebUI.

How to use the HyperNetwork model

1. On the drawing interface of SD WebUI, click Show Extra Networks in the upper right corner

2. Then select the Hypernetwork to be used, and click to add the prompt word

3. Then use the prompt words used during training, so that the calculated picture will have the characters of the HyperNetwork, and the style of painting will be restored very well.

How to train LoRA and Embedding models please click here.

Comments

no dataCoffee time! Feel free to comment