Repository: AUTOMATIC1111/stable-diffusion-webui

Issue #7212: [Bug]: LoRA networks aren't applied to Prompt Matrix
Created: 2023-01-25T21:36:39Z
Is there an existing issue for this?

 I have searched the existing issues and checked the recent builds/commits

What happened?
Setting the script to prompt matrix and trying giving a prompt like "an astronaut on a horse|lora:WhiteHorses:1|lora:BrownHorses:1"
the LoRA parts get treated as regular prompt text and their effects don't get applied
Steps to reproduce the problem

Go to Script
Select Prompt Matrix
Give a prompt like "an astronaut on a horse|lora:WhiteHorses:1|lora:BrownHorses:1" with LoRA networks as the variable parts
Press generate

What should have happened?
The LoRA network being applied correctly
Commit where the problem happens
8b90332
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
--enable-insecure-extension-access --api --medvram --xformers --disable-nan-check --no-half-vae
Additional information, context and logs
torch: 2.0.0 - precision: autocast fp16
xformers: 0.0.16+bc08bbc.d20230123
accelerate: 0.12.0
transformers: 4.19.2
safetensors: 0.2.7
lightning: 1.7.6
Stable Diffusion: [ef2b0ce] 2022-11-25
Taming Transformers: [2426893] 2022-01-13
CodeFormer: [c5b4593] 2022-09-09
BLIP: [48211a1] 2022-06-07
k_diffusion: [5b3af03] 2022-11-23
CUDA version: 11.7
devices: 1
current: NVIDIA GeForce RTX 3050 Ti Laptop GPU
arch: compute_37
capability: (8, 6)
cudnn: 8500

Duplicate issue #7858: [Bug]: I can't use advanced-prompt-matrix to generate images with different LORA
Created: 2023-02-16T20:07:05Z
Is there an existing issue for this?

 I have searched the existing issues and checked the recent builds/commits

What happened?
I'm using this script https://github.com/ArrowM/auto1111-improved-prompt-matrix
I have modified the script replacing < > to # @ to work with LORA prompts.
So, this is my positive prompt:
# ahri, ahri from league of legends, <lora:ahriLeagueOfLegends_ahri45Suggested> |  nier automata,   <lora:2bNierAutomataLora_v2b> @ ,1girl,
The script will choose only one. Ahri or Nier LORA. And 1girl will be present all the images generated.
But, when Images are generated, the next image seems to use the past LORA prompt.
In this example, I'm using Ahri LORA and Nier LORA
This was the first image generated a 100% Ahri

with prompt log showing only Ahri prompts

The second image generated has some nier aspects but ahri too

But the prompt log says only nier.

How LORA are loaded into stable diffusion?
The prompts are correct, but seems that it keeps the last LORA in memory.
Steps to reproduce the problem
Install advanced-prompt-matrix
What should have happened?
Should generated different images considering different prompts
Commit where the problem happens
3715ece
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
I'm using webui.bat
List of extensions
animator_extension | https://github.com/Animator-Anon/animator_extension.git | unknown
seed_travel | https://github.com/yownas/seed_travel.git | unknown
LDSR | built-in |  
Lora | built-in |  
ScuNET | built-in |  
SwinIR | built-in |  
prompt-bracket-checker | built-in |  
Console logs
Prompt matrix parts
[' ahri, ahri from league of legends, <lora:ahriLeagueOfLegends_ahri45Suggested> ', '  nier automata,   <lora:2bNierAutomataLora_v2b> ']
Prompt removed
# ahri, ahri from league of legends, <lora:ahriLeagueOfLegends_ahri45Suggested> |  nier automata,   <lora:2bNierAutomataLora_v2b> @ ,
1girl,

Prompt matrix will create 2 images using a total of 2 batches.
New All prompts
ahri, ahri from league of legends, <lora:ahriLeagueOfLegends_ahri45Suggested> ,
1girl,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
nier automata,   <lora:2bNierAutomataLora_v2b> ,
1girl,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
100%|██████████████████████████████████████████████████████████████████████████████████| 28/28 [00:25<00:00,  1.10it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 28/28 [00:25<00:00,  1.09it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 56/56 [00:52<00:00,  1.07it/s]
Additional information
No response

Closing comment (2023-08-07T04:03:21Z): Duplicate of #7212