12 LoRA
q5sys (JT) edited this page 2023-12-23 11:23:33 -05:00

LoRAs are small models that can alter the style or behavior of the Stable Diffusion AI model. It can make the same Stable Diffusion model make drastically different styles of images, with control over how much the LoRA affects the image.

Why are LoRA files useful?

Before LoRAs were invented, people trained new Stable Diffusion models for each new concept or styles (with new training images). Each Stable Diffusion model is between 2 to 4 GB in size, so this was not very efficient (for disk space, especially with hundreds of styles).

LoRA models, by contrast, are often between 10 to 100 MB in size (i.e. nearly 100 times smaller), and only contain the changes to be applied to a Stable Diffusion model. This means you can use the same 2 GB Stable Diffusion model, and apply different 10 MB LoRA files to alter the style of the generated images. And the result is often the same as creating an entirely new 2 GB Stable Diffusion model.

You can also mix multiple LoRA files at different strengths dynamically, which you can't do easily with custom Stable Diffusion models.

This is why LoRAs are very powerful, and have become a really useful tool to guide the AI towards particular styles, faces, objects, and images.

How to use

  1. Download the LoRA model file and put it into the models/lora folder.
  2. Click the refresh icon image next to the Stable Diffusion models dropdown.
  3. Select the LoRA from the dropdown in Image Settings, and choose how strongly it should affect the image.

image

  1. Generate an image.

Multiple LoRA files

You can also add multiple LoRAs to an image, by clicking the add another LoRA button. To remove a LoRA, please click the - button on the left-side of the LoRA.

image

Web Resources

Manually using LoRAs

You can include a LoRA in your prompt using the <lora: name: weight> format.

  • name is the name of the LoRA model. However be aware the name may be different from the filename. Refer to the documentation provided by the LoRA creator.
  • weight is the strength that the LoRA model will be applied. It is similar to a keyword weights. The default is 1, and setting the value to 0 disables the LoRA. Some LoRAs also require a trigger keyword to be included for the lora to be activated. Example: <lora:PIXHELL_21:1> pixelart