Update README.md
Browse files
README.md
CHANGED
|
@@ -22,6 +22,22 @@ Compare result:
|
|
| 22 |
|
| 23 |

|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# License
|
| 26 |
|
| 27 |
This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies:
|
|
|
|
| 22 |
|
| 23 |

|
| 24 |
|
| 25 |
+
# Usage
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
import torch
|
| 29 |
+
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
|
| 30 |
+
|
| 31 |
+
repo_id = "mrdabin/poison"
|
| 32 |
+
pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, revision="fp16")
|
| 33 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 34 |
+
pipe = pipe.to("cuda")
|
| 35 |
+
|
| 36 |
+
prompt = "High quality photo of an astronaut riding a horse in space"
|
| 37 |
+
image = pipe(prompt, num_inference_steps=25).images[0]
|
| 38 |
+
image.save("astronaut.png")
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
# License
|
| 42 |
|
| 43 |
This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies:
|