Text-to-Image
Diffusers
English
StableDiffusionPipeline
dreambooth
stable-diffusion
stable-diffusion-diffusers
Instructions to use lambda/dreambooth-avatar with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lambda/dreambooth-avatar with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lambda/dreambooth-avatar", 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
|
@@ -40,15 +40,6 @@ prompt = "Yoda, avatarart style person"
|
|
| 40 |
scale = 7.5
|
| 41 |
n_samples = 4
|
| 42 |
|
| 43 |
-
# Sometimes the nsfw checker is confused by the Naruto images, you can disable
|
| 44 |
-
# it at your own risk here
|
| 45 |
-
disable_safety = False
|
| 46 |
-
|
| 47 |
-
if disable_safety:
|
| 48 |
-
def null_safety(images, **kwargs):
|
| 49 |
-
return images, False
|
| 50 |
-
pipe.safety_checker = null_safety
|
| 51 |
-
|
| 52 |
with autocast("cuda"):
|
| 53 |
images = pipe(n_samples*[prompt], guidance_scale=scale).images
|
| 54 |
|
|
|
|
| 40 |
scale = 7.5
|
| 41 |
n_samples = 4
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
with autocast("cuda"):
|
| 44 |
images = pipe(n_samples*[prompt], guidance_scale=scale).images
|
| 45 |
|