diff --git a/docs/source/en/tutorials/using_peft_for_inference.md b/docs/source/en/tutorials/using_peft_for_inference.md index 35b36b0ab269..f89912f3a185 100644 --- a/docs/source/en/tutorials/using_peft_for_inference.md +++ b/docs/source/en/tutorials/using_peft_for_inference.md @@ -206,3 +206,13 @@ pipe.fuse_lora(adapter_names=["pixel", "toy"]) prompt = "toy_face of a hacker with a hoodie, pixel art" image = pipe(prompt, num_inference_steps=30, generator=torch.manual_seed(0)).images[0] ``` + +## Saving a pipeline after fusing the adapters + +To properly save a pipeline after it's been loaded with the adapters, it should be serialized like so: + +```python +pipe.fuse_lora(lora_scale=1.0) +pipe.unload_lora_weights() +pipe.save_pretrained("path-to-pipeline") +```