SDxl, when I use StableDiffusionXLPipeline.from_single_file loading safetensors, how can Lora load it?

like this:

pipe = StableDiffusionXLPipeline.from_single_file(BASE_MODEL,…)

and I have a xl lora, /path/lora/lora.safetensors

How should I write the code or which class to use to successfully load this Lora into the pipe?

Can provide a simple code example thanks

2 Likes