Instructions to use Dipl0/pepe-diffuser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Dipl0/pepe-diffuser with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Dipl0/pepe-diffuser", 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 Settings
- Draw Things
- DiffusionBee
Clean model card
Browse files
README.md
CHANGED
|
@@ -1,21 +1,45 @@
|
|
| 1 |
---
|
| 2 |
library_name: diffusers
|
| 3 |
pipeline_tag: text-to-image
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
-
-
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
-
# How to use
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
```python
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
library_name: diffusers
|
| 3 |
pipeline_tag: text-to-image
|
| 4 |
+
base_model: stabilityai/stable-diffusion-2
|
| 5 |
+
datasets:
|
| 6 |
+
- Dipl0/pepe_image_stable_diff
|
| 7 |
tags:
|
| 8 |
+
- stable-diffusion
|
| 9 |
+
- text-to-image
|
| 10 |
+
- pepe
|
| 11 |
---
|
|
|
|
| 12 |
|
| 13 |
+
# 🐸 Pepe Diffuser
|
| 14 |
+
|
| 15 |
+
Stable Diffusion 2 fine-tuné sur des images de Pepe the Frog.
|
| 16 |
+
|
| 17 |
+
**Démo :** [Pepe Diffuser Space](https://huggingface.co/spaces/Dipl0/pepe_generator)
|
| 18 |
+
|
| 19 |
+
## Utilisation
|
| 20 |
|
| 21 |
```python
|
| 22 |
+
import torch
|
| 23 |
+
from diffusers import DPMSolverMultistepScheduler, StableDiffusionPipeline
|
| 24 |
+
|
| 25 |
+
pipe = StableDiffusionPipeline.from_pretrained("Dipl0/pepe-diffuser", torch_dtype=torch.float16)
|
| 26 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
| 27 |
+
pipe.scheduler.config, algorithm_type="dpmsolver++", use_karras_sigmas=True
|
| 28 |
+
)
|
| 29 |
+
pipe.to("cuda")
|
| 30 |
+
|
| 31 |
+
image = pipe("pepe the frog surfing on the moon", num_inference_steps=22, guidance_scale=7).images[0]
|
| 32 |
+
image.save("pepe.png")
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Commencer le prompt par `pepe the frog` donne les meilleurs résultats.
|
| 36 |
+
|
| 37 |
+
## Entraînement
|
| 38 |
+
|
| 39 |
+
- **Modèle de base :** [`stabilityai/stable-diffusion-2`](https://huggingface.co/stabilityai/stable-diffusion-2)
|
| 40 |
+
- **Données :** [`Dipl0/pepe_image_stable_diff`](https://huggingface.co/datasets/Dipl0/pepe_image_stable_diff)
|
| 41 |
+
- **Script :** `train_text_to_image` de diffusers (février 2023)
|
| 42 |
+
|
| 43 |
+
## Limites
|
| 44 |
+
|
| 45 |
+
Projet perso et expérimental. Les images d'entraînement viennent de mèmes internet : le modèle peut reproduire leur humour et leurs clichés.
|