LoRA

What are LoRA models

LoRA stands for Low-rank Adaption of Large models. The good thing is most of us need not understand what it is to use it. The key aspects of LoRA are

  • You use it on top of a base model like SD-1.5, SD-2.0.
  • It is a small file, so you can download it quickly.
  • It is super simple to use.

To use it with Automatic 1111, we can follow these steps.

  1. Download the LoRA model
  2. Move the model to the right directory
  3. Choose the LoRA model
  4. Make awesome images

Download the LoRA model

Civitai has a huge collection of LoRA models, it also includes some cool images and the data used to generate them.

From the home page, you can apply filter to show only LoRA models.

Civitai

For this example lets take a look at Sport Uniforms Collection model.

Civitai

Right click on the download button and copy the link address.

From the terminal run the following command to download the weights. Replace the url with the one you copied.

wget --content-disposition https://civitai.com/api/download/models/98725

Move the model to the right directory

Once the model weights are downloaded, lets move it to the right directory.

mv /home/golf_outfit-10.safetensors /home/stable-diffusion-webui/models/Lora/

Choose the LoRA model

Click on the show extra networks button 🎴 under the Generate button (purple icon)

Go to the Lora tab and refresh if needed

Make Awesome images

You can now use the LoRA models to generate awesome images.

LoRA example

I used the following settings to generate the image below, source.

 
Prompt: 

photo of a woman, (wearing golf_outfit, wearing golf_cap, white outfit:1.3),
good hand,4k, high-res, masterpiece, best quality, head:1.3,
((Hasselblad photography)),finely detailed skin, sharp focus,
 (cinematic lighting), night, soft lighting, dynamic angle,
  [:(detailed face:1.2):0.2], medium breasts,(((tennis field))), outside,
 <lora:golf_outfit-10:0.5>


Negative prompt: 

NG_DeepNagetive_V1_75T,(greyscale:1.2),
paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2),
 lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, 
 age spot, glans


Size: 512x768

Seed: 2072564667

Model: chilloutmix_NiPrunedFp32Fix

Steps: 30

Sampler: DPM++ 2M Karras

CFG scale: 7

Model hash: fc2511737a

Face restoration: CodeFormer

note If you are trying to replicate the image, you need to use the same base model. In the above example it is chilloutmix_NiPrunedFp32Fix. If the base model is not available in the preloaded models, you can download the model and move it to /home/stable-diffusion-webui/models/stable_diffusion/

Previous
Upscale