Commit
·
495b168
1
Parent(s):
fb42619
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,4 +2,44 @@
|
|
| 2 |
license: creativeml-openrail-m
|
| 3 |
library_name: diffusers
|
| 4 |
pipeline_tag: text-to-image
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: creativeml-openrail-m
|
| 3 |
library_name: diffusers
|
| 4 |
pipeline_tag: text-to-image
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- 'dreambooth '
|
| 9 |
+
- 'diffusion '
|
| 10 |
+
- transformers
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
Dreambooth style: Avatar
|
| 14 |
+
Dreambooth finetuning of Stable Diffusion (v1.5.1) on Avatar art style by Lambda Labs.
|
| 15 |
+
|
| 16 |
+
About
|
| 17 |
+
This text-to-image stable diffusion model was trained with dreambooth.
|
| 18 |
+
Put in a text prompt and generate your own Avatar style image!
|
| 19 |
+
|
| 20 |
+
```
|
| 21 |
+
from diffusers import DiffusionPipeline, UniPCMultistepScheduler
|
| 22 |
+
import torch
|
| 23 |
+
from torch import autocast
|
| 24 |
+
pipeline = DiffusionPipeline.from_pretrained(
|
| 25 |
+
"Andyrasika/avatar_diffusion",
|
| 26 |
+
custom_pipeline="lpw_stable_diffusion",
|
| 27 |
+
|
| 28 |
+
torch_dtype=torch.float16
|
| 29 |
+
)
|
| 30 |
+
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 31 |
+
pipeline.to("cuda")
|
| 32 |
+
#https://huggingface.co/docs/diffusers/optimization/fp16
|
| 33 |
+
pipeline.enable_vae_tiling()
|
| 34 |
+
pipeline.enable_xformers_memory_efficient_attention()
|
| 35 |
+
|
| 36 |
+
prompt = "Yoda, avatarart style"
|
| 37 |
+
scale = 7.5
|
| 38 |
+
n_samples = 4
|
| 39 |
+
|
| 40 |
+
with autocast("cuda"):
|
| 41 |
+
images = pipeline(n_samples*[prompt], guidance_scale=scale).images
|
| 42 |
+
|
| 43 |
+
for idx, im in enumerate(images):
|
| 44 |
+
im.save(f"{idx:06}.png")
|
| 45 |
+
```
|