Instructions to use mrdabin/poison with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use mrdabin/poison with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("mrdabin/poison", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
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:
|