tonyassi commited on
Commit
09881dc
·
1 Parent(s): af36081

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
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
  ![mgm film bettie page outside a mansion with two poodle](https://cdn.discordapp.com/attachments/1120417968032063538/1182003731013836810/mgm_film_bettie_page_outside_a_mansion_with_two_poodles.png?ex=65831dc2&is=6570a8c2&hm=07cdb13d371f45b7f7ceb7a4b89c6daa775707804e901df23eb7b01093e877d3&)
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
  ![mgm film bettie page outside a mansion with two poodle](https://cdn.discordapp.com/attachments/1120417968032063538/1182003731013836810/mgm_film_bettie_page_outside_a_mansion_with_two_poodles.png?ex=65831dc2&is=6570a8c2&hm=07cdb13d371f45b7f7ceb7a4b89c6daa775707804e901df23eb7b01093e877d3&)
49
  **mgm film bettie page outside a mansion with two poodles**
50