basakozsoy
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -37,7 +37,7 @@ These are basakozsoy/maya_LoRA LoRA adaption weights for stabilityai/stable-diff
|
|
37 |
|
38 |
The weights were trained using [DreamBooth](https://dreambooth.github.io/).
|
39 |
|
40 |
-
LoRA for the text encoder was enabled:
|
41 |
|
42 |
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
|
43 |
|
@@ -58,7 +58,23 @@ Weights for this model are available in Safetensors format.
|
|
58 |
#### How to use
|
59 |
|
60 |
```python
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
```
|
63 |
|
64 |
#### Limitations and bias
|
|
|
37 |
|
38 |
The weights were trained using [DreamBooth](https://dreambooth.github.io/).
|
39 |
|
40 |
+
LoRA for the text encoder was enabled: True.
|
41 |
|
42 |
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
|
43 |
|
|
|
58 |
#### How to use
|
59 |
|
60 |
```python
|
61 |
+
import torch
|
62 |
+
from diffusers import DiffusionPipeline, AutoencoderKL
|
63 |
+
|
64 |
+
repo_id = 'basakozsoy/maya_LoRA'
|
65 |
+
|
66 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
67 |
+
pipe = DiffusionPipeline.from_pretrained(
|
68 |
+
"stabilityai/stable-diffusion-xl-base-1.0",
|
69 |
+
vae=vae,
|
70 |
+
torch_dtype=torch.float16,
|
71 |
+
variant="fp16",
|
72 |
+
use_safetensors=True
|
73 |
+
)
|
74 |
+
pipe.load_lora_weights(repo_id)
|
75 |
+
_ = pipe.to("cuda")
|
76 |
+
|
77 |
+
pipe.load_lora_weights(repo_id)
|
78 |
```
|
79 |
|
80 |
#### Limitations and bias
|