# Lora extension with weight

**URL:** <https://discuss.huggingface.co/t/lora-extension-with-weight/48897>\
**Category:** 🧨 Diffusers\
**Created:** [August 1, 2023, 1:03am UTC](https://discuss.huggingface.co/t/lora-extension-with-weight/48897 "2023-08-01T01:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lelady](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@lelady](https://discuss.huggingface.co/u/lelady)\
**Post date:** [August 1, 2023, 1:03am UTC](https://discuss.huggingface.co/t/lora-extension-with-weight/48897/1 "2023-08-01T01:03:44Z")

</div>

First of all. Thank you for your effort.

I have some question when loading lora weight in sd.

1. Is it the right way that putting sd model in this way? I mean it doesn’t have to be converted with like “convert\_models\_diffuser\_to\_diffusers.py” in diffusers?

`model_base = "/hdd/jinnnn/anylora.safetensors"`  
`pipeline = StableDiffusionImg2ImgPipeline.from_single_file(model_base, torch_dtype=torch.float16, safety_checker=None, requires_safety_checker=False).to('cuda')`

1. Then how can I adjust the weight of the lora weight like `<lora:light_and_shadow:0.7>` in webui?  
Is there any option that put any argument like “lora\_weight” in “load\_lora\_weights” function?

2. How can I use the trigger word in prompt? For example if my trigger word is ‘iom’, just putting ‘iom’ in my prompt is applied in generation?  
In connection with question 3, can I adjust the lora applied weight with text prompt?

3. When using `load_lora_weights` is it automatically setting the rank and alpha that was used in trainig in webui?
