File size: 1,936 Bytes
848e168
 
 
 
 
 
 
 
 
 
 
0950966
7bee0e8
 
848e168
 
 
 
0950966
848e168
 
 
 
 
 
 
 
 
 
 
 
fac0fbc
 
848e168
fac0fbc
 
 
41fbe92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7bee0e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
license: creativeml-openrail-m
tags:
- pytorch
- diffusers
- stable-diffusion
- text-to-image
- diffusion-models-class
- dreambooth-hackathon
- animal
widget:
- text: a photo of huacaya alpaca on Golden Gate Bridge
datasets:
- li-yan/alpaca-picture-dataset
---

# DreamBooth model for the huacaya concept trained by li-yan on the li-yan/alpaca-picture-dataset dataset.

This is a Stable Diffusion model fine-tuned on the huacaya concept with DreamBooth. It can be used by modifying the `instance_prompt`: **a photo of huacaya alpaca on Golden Gate Bridge**

This model was created as part of the DreamBooth Hackathon 🔥. Visit the [organisation page](https://huggingface.co/dreambooth-hackathon) for instructions on how to take part!

## Description


This is a Stable Diffusion model fine-tuned on `alpaca` images for the animal theme.


## Usage

```python
%pip install -qqU diffusers accelerate
```

```python
import torch
from diffusers import StableDiffusionPipeline
```

```python
# Set device
device = (
    "mps"
    if torch.backends.mps.is_available()
    else "cuda"
    if torch.cuda.is_available()
    else "cpu"
)

# Load the pipeline
model_id = "li-yan/huacaya-alpaca"
pipe = StableDiffusionPipeline.from_pretrained(model_id).to(device)
```

```python
# set prompt
prompt = "a photo of huacaya alpaca on the great wall" #@param

# Set up a generator for reproducibility
generator = torch.Generator(device=device).manual_seed(73)

# Run the pipeline, showing some of the available arguments
pipe_output = pipe(
    prompt=prompt, # What to generate
    negative_prompt="Oversaturated, blurry, low quality", # What NOT to generate
    height=480, width=640,     # Specify the image size
    guidance_scale=12,          # How strongly to follow the prompt
    num_inference_steps=50,    # How many steps to take
    generator=generator        # Fixed random seed
)

# View the resulting image
pipe_output.images[0]
```