huacaya-alpaca / README.md
li-yan's picture
Update README.md
0950966 verified
---
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]
```