How to Use LoRA Models with Automatic1111’s Stable Diffusion Web UI

LoRA (Low-Rank Adaptation of Large Language Models) models have become the standard to extend the Stable Diffusion models. I am going to show you in this article about how to use the LoRA models with Automatic1111’s Stable Diffusion Web UI.

Enable the Extension

  • Click on Extensions tab and then click on Install from URL.
  • Enter https://github.com/kohya-ss/sd-webui-additional-networks.git in the URL box and click on Install.

  • Click on Installed and click on Apply and restart UI.

  • There is already a Lora folder for webui, but that’s not the default folder for this extension. To use this folder, click on Settings -> Additional Networks.
  • Enter the folder path in the first text box. Please modify the path according to the one on your computer. This folder is under models/Lora of your webui folder.

Use a LoRA Model

  • Visit https://civitai.com/models/5200/2b-nierautomata-lora-yorha-edition
  • Click on Download Latest to download the LoRA model.
  • Move the downloaded model to the folder you specified in the settings.
  • Visit https://huggingface.co/andite/anything-v4.0/tree/main and download the anything-v4.5 model if you don’t have it.
  • Restart webui.
  • Enter the following in the Prompt
    yorha no. 2 type b, 1girl, bangs, black blindfold, black dress, black gloves, black hairband, blindfold, blindfold removed, breasts, cleavage cutout, clothing cutout, commentary request, dress, gloves, hairband, half-closed eyes, hand up, highres, io (sinking=carousel), juliet sleeves, long sleeves, looking at viewer, medium breasts, mole, mole under mouth, nier (series), nier automata, no blindfold, parted lips, puffy sleeves, short hair, solo, thighhighs, turtleneck, upper body, white hair, bokeh
    <lora:2bNierAutomataLora_v2b:0.5>
  • Enter the following in the Negative prompt
    (worst quality, low quality:1.3)
  • Enter the rest according to these parameters – Steps: 20, Sampler: DPM++ SDE Karras, CFG scale: 7, Seed: 945719311, Size: 512×512
  • Click on Generate to generate the image.

Notice that there are two pieces of info needed in the prompt to use the LoRA model. I have maked them in red. The first is yorha no. 2 type b. This is trigger words for this model. This is usually given in the description of the model. The second is <lora:2bNierAutomataLora_v2b:0.5>. This is to enable the LoRA model. The format is <lora:lora_model_file_name: weight>. Note that you don’t have to include the LoRA model file name extension in the prompt. For example, the file for this model is 2bNierAutomataLora_v2b.safetensors. You only use 2bNierAutomataLora_v2b in the expression. The weight controlls the effect of the LoRA model over the original model. Most authors recommend the weight to be between 0.4 and 0.6. Also, some models require you to have tokens to describle the character too. The bare minimum is to include the hair color, hair style, and eye color.

You can find more LoRA models here and here.

My other tutorials:

How to Install Latent Consistency Model (lcm) for Automatic1111 Stable Diffusion WebUI for Super Fast Image/Video Generation

Pika Labs Text-to-Video Optional Parameters with Examples

How to Use SDXL 1.0 Models in Automatic1111’s Web UI

This is a webui extension which works with static images.

How to Use roop (face swap) with Automatic1111’s Stable Diffusion Web UI

This is a stand alone application which works with videos.

Roop – One-Click DeepFake (face swap) Installation on Windows

How to Brighten AI Images Using an Upscaler in Automatic1111’s Web UI

How to Use ControlNet with Automatic1111’s Stable Diffusion Web UI

How to Use Infinite Zoom with Automatic1111’s Web UI

How to Use Latent Couple and Composable LoRA with Automatic1111’s Web UI

How to Use LyCORIS/locon/loha Models with Automatic1111’s Stable Diffusion Web UI

How to Use gif2gif with Automatic1111’s Stable Diffusion Web UI

How to Use ControlNet and gif2gif with Automatic1111’s Stable Diffusion Web UI

How to Use 3D Open Pose Editor with Automatic1111’s Stable Diffusion Web UI

How to Use ModelScope text2video with Automatic1111’s Stable Diffusion Web UI

Some of my content using LoRA models:

 

View this post on Instagram

 

A post shared by aigen168 (@aigen168)

The LoRA model and some other Genshin LoRA models can be downloaded here.

 

View this post on Instagram

 

A post shared by aigen168 (@aigen168)

The LoRA model can be downloaded here.

 

View this post on Instagram

 

A post shared by aigen168 (@aigen168)


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.


Be the first to comment

Leave a Reply