Mohan-diffuser commited on
Commit
cdb1194
·
verified ·
1 Parent(s): df84d52

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -1
README.md CHANGED
@@ -29,4 +29,16 @@ You should use `platypus` to trigger the image generation.
29
  ## Download model
30
 
31
 
32
- [Download](/Mohan-diffuser/lora_platypus_sd_15/tree/main) them in the Files & versions tab.
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ## Download model
30
 
31
 
32
+ [Download](/Mohan-diffuser/lora_platypus_sd_15/tree/main) them in the Files & versions tab.
33
+
34
+ ```python
35
+ import torch
36
+ from diffusers import DiffusionPipeline
37
+
38
+ # switch to "mps" for apple devices
39
+ pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
40
+ pipe.load_lora_weights("Mohan-diffuser/lora_platypus_sd_15")
41
+
42
+ prompt = "platypus"
43
+ image = pipe(prompt).images[0]
44
+ ```