Skip to content

[Bug]: Switching to another model and then back leads to different image (SDXL) #12619

@djdookie

Description

@djdookie

Is there an existing issue for this?

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

What happened?

If I generate an image with sdxl_base_1.0_0.9vae with one self trained LoRa (with strength 0.8),
then switch the model to another custom SDXL1.0 model, generate another image with the exact same prompt,
and then switch back to the first model and generate an image with the exact same parameters again, it looks different/broken.

This only happens if I use a LoRa.

When I completely restart the webUI I can generate the correct first image again.

So for me it seems that something is not unloaded/replaced in memory correctly.

Edit: It looks like the LoRa is applied with strength 1.0 (instead of 0.8) after switching model and switching back.
And it is always applied even if I set it to strength 0.0 or remove it from prompt!

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

the last image should be the same as the first

Version or Commit where the problem happens

v1.5.1, also tried current dev branch build, same issue

What Python version are you running on ?

Python 3.11.x (above, no supported yet)

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

sdp

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

no

List of extensions

openpose-editor, sd-webui-controlnet, sd-webui-openpose-editor, sd-webui-refiner, sd-webui-roop-nsfw, ultimate-upscale-for-automatic1111

Console logs

nothing relevant

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReport of a confirmed bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions