Instructions to use p1atdev/plat-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use p1atdev/plat-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("p1atdev/plat-diffusion", 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
add negative prompt to diffusers
Browse files
README.md
CHANGED
|
@@ -39,7 +39,8 @@ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float
|
|
| 39 |
pipe = pipe.to("cuda")
|
| 40 |
|
| 41 |
prompt = "masterpiece, best quality, 1girl, orange feather, blue crystals, blurry foreground"
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
image.save("girl.png")
|
| 45 |
```
|
|
|
|
| 39 |
pipe = pipe.to("cuda")
|
| 40 |
|
| 41 |
prompt = "masterpiece, best quality, 1girl, orange feather, blue crystals, blurry foreground"
|
| 42 |
+
negative_prompt = "nsfw, worst quality, low quality, deleted, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry"
|
| 43 |
+
image = pipe(prompt, negative_prompt=negative_prompt).images[0]
|
| 44 |
|
| 45 |
image.save("girl.png")
|
| 46 |
```
|