Unverified Commit 8d7dc853 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

add note about serialization (#6764)

parent 87a92f77
...@@ -206,3 +206,13 @@ pipe.fuse_lora(adapter_names=["pixel", "toy"]) ...@@ -206,3 +206,13 @@ pipe.fuse_lora(adapter_names=["pixel", "toy"])
prompt = "toy_face of a hacker with a hoodie, pixel art" 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] 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")
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment