add how to use diffusers section in model card
Browse files
README.md
CHANGED
|
@@ -6,6 +6,27 @@ This is the fine-tuned Stable Diffusion model trained on Paper Cut images.
|
|
| 6 |
|
| 7 |
Use **PaperCut** in your prompts.
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
### Sample images:
|
| 10 |

|
| 11 |

|
|
|
|
| 6 |
|
| 7 |
Use **PaperCut** in your prompts.
|
| 8 |
|
| 9 |
+
### 🧨 Diffusers
|
| 10 |
+
|
| 11 |
+
This model can be used just like any other Stable Diffusion model. For more information,
|
| 12 |
+
please have a look at the [Stable Diffusion](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion).
|
| 13 |
+
|
| 14 |
+
You can also export the model to [ONNX](https://huggingface.co/docs/diffusers/optimization/onnx), [MPS](https://huggingface.co/docs/diffusers/optimization/mps) and/or [FLAX/JAX]().
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
from diffusers import StableDiffusionPipeline
|
| 18 |
+
import torch
|
| 19 |
+
|
| 20 |
+
model_id = "Fictiverse/Stable_Diffusion_PaperCut_Model"
|
| 21 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 22 |
+
pipe = pipe.to("cuda")
|
| 23 |
+
|
| 24 |
+
prompt = "PaperCut R2-D2"
|
| 25 |
+
image = pipe(prompt).images[0]
|
| 26 |
+
|
| 27 |
+
image.save("./R2-D2.png")
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
### Sample images:
|
| 31 |

|
| 32 |

|