# Confusing diffusers documentation on usage of kohya \_ss Lora + SDXL

**URL:** <https://discuss.huggingface.co/t/confusing-diffusers-documentation-on-usage-of-kohya-ss-lora-sdxl/62398>\
**Category:** 🧨 Diffusers\
**Created:** [November 15, 2023, 7:46pm UTC](https://discuss.huggingface.co/t/confusing-diffusers-documentation-on-usage-of-kohya-ss-lora-sdxl/62398 "2023-11-15T19:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csegalin](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@csegalin](https://discuss.huggingface.co/u/csegalin)\
**Post date:** [November 15, 2023, 7:46pm UTC](https://discuss.huggingface.co/t/confusing-diffusers-documentation-on-usage-of-kohya-ss-lora-sdxl/62398/1 "2023-11-15T19:46:00Z")

</div>

In diffusers documentation there are several ways to load and use Lora models with SDXL but it starts to get quite confusing what is the correct way to do it

I have trained a lora model on SDXL model using Kohya\_ss  
Now I want to load it form the .safetensors file in the pipeline and generate an image with lora scale=1.

There are these 2 links

- [Load LoRAs for inference](https://huggingface.co/docs/diffusers/main/en/tutorials/using_peft_for_inference)
- [Low-Rank Adaptation of Large Language Models (LoRA)](https://huggingface.co/docs/diffusers/training/lora#kohya--stable-diffusion-xl)

What is confusing is when we load lora in the pipeline is :

- do I need to use PEFT and set the adapters?
- do I need to fuse\_lora() in the pipeline and specify the lora\_scale?
- are these mutually exclusive or doing both won’t affect the result?

What is confusing when generating the image is:

- do I need to format the prompt as in auto1111 adding `<lora:model_name-step:lora_scale>` to it or just use the token+class ?
- do I need to pass `cross_attention_kwargs={"scale": lora_scale}` when generating the image?

Anyone can clarify what are the correct steps?  
thank you
