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 for instructions on how to take part!
1import torch
2from diffusers import StableDiffusionPipeline
1# Set device
2device = (
3 "mps"
4 if torch.backends.mps.is_available()
5 else "cuda"
6 if torch.cuda.is_available()
7 else "cpu"
8)
9
10# Load the pipeline
11model_id = "li-yan/huacaya-alpaca"
12pipe = StableDiffusionPipeline.from_pretrained(model_id).to(device)
1# set prompt
2prompt = "a photo of huacaya alpaca on the great wall" #@param
3
4# Set up a generator for reproducibility
5generator = torch.Generator(device=device).manual_seed(73)
6
7# Run the pipeline, showing some of the available arguments
8pipe_output = pipe(
9 prompt=prompt, # What to generate
10 negative_prompt="Oversaturated, blurry, low quality", # What NOT to generate
11 height=480, width=640, # Specify the image size
12 guidance_scale=12, # How strongly to follow the prompt
13 num_inference_steps=50, # How many steps to take
14 generator=generator # Fixed random seed
15)
16
17# View the resulting image
18pipe_output.images[0]