Update README.md
Browse files
README.md
CHANGED
@@ -18,6 +18,33 @@ license: openrail++
|
|
18 |
## Trigger words
|
19 |
Use **mgm film** in the prompt to trigger the MGM style.
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |

|
22 |
**mgm film bettie page outside a mansion with two poodles**
|
23 |
|
|
|
18 |
## Trigger words
|
19 |
Use **mgm film** in the prompt to trigger the MGM style.
|
20 |
|
21 |
+
### How to use
|
22 |
+
```python
|
23 |
+
import torch
|
24 |
+
from diffusers import DiffusionPipeline, AutoencoderKL
|
25 |
+
|
26 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
27 |
+
pipe = DiffusionPipeline.from_pretrained(
|
28 |
+
"stabilityai/stable-diffusion-xl-base-1.0",
|
29 |
+
vae=vae,
|
30 |
+
torch_dtype=torch.float16,
|
31 |
+
variant="fp16",
|
32 |
+
use_safetensors=True
|
33 |
+
)
|
34 |
+
pipe.load_lora_weights("tonyassi/mgm")
|
35 |
+
pipe.to("cuda")
|
36 |
+
|
37 |
+
prompt = "mgm film megan fox pinup girl"
|
38 |
+
|
39 |
+
image = pipe(prompt=prompt,
|
40 |
+
height=1024,
|
41 |
+
width=1024,
|
42 |
+
num_inference_steps=50,
|
43 |
+
negative_prompt="ugly, deformed face, deformed body").images[0]
|
44 |
+
image
|
45 |
+
|
46 |
+
```
|
47 |
+
|
48 |

|
49 |
**mgm film bettie page outside a mansion with two poodles**
|
50 |
|