DreamBooth model of Kratos from God of War
This is a Stable Diffusion model fine-tuned on the person concept with DreamBooth. It can be used by adding the string krts person to any prompt.
Check out the exampls below ☟ to see a few practical examples on how to use it.
If you are curious to learn more about the training script, then I suggest you to visit the
report📝 I created with Weights & Biases 🐝.
This model was created as part of the DreamBooth Hackathon 🔥. Visit the
organisation page for instructions on how to take part!
Description
This is a Stable Diffusion model fine-tuned on
matteopilotto/kratos dataset containing 10 images of
Kratos 🪓 from
God of War for the wildcard theme using
CompVis/stable-diffusion-v1-4 pre-trained model.
Example Output
Prompt: "An illustration of krts person punk playing electric guitar, tristan eaton, victo ngai, artgerm, rhads, ross draws"
Negative prompt: "low contrast, blurry, low resolution, warped"
Resolution: 512 x 512
Guidance Scale: 7
Inference steps: 50
Seeds: [556850, 459286, 768745, 594109]
Prompt: "a drawing of krts person wearing a Spider-man costume in the style of Marvel comics"
Negative prompt: "low contrast, blurry, low resolution, warped"
Resolution: 512 x 512
Guidance Scale: 7
Inference steps: 50
Seeds: [553766, 537908, 147395, 343240]
Prompt: "an illustration of krts person sitting in a movie theater eating popcorn watching a movie, unreal engine, cozy indoor lighting, artstation, detailed, digital painting, cinematic, character design by mark ryden and pixar and hayao miyazaki, unreal 5, daz, hyperrealistic, octane render"
Negative prompt: "low contrast, blurry, low resolution, warped"
Resolution: 512 x 512
Guidance Scale: 7
Inference steps: 50
Seeds: [737986, 488711, 799063, 121111]
Usage
1import torch
2from diffusers import StableDiffusionPipeline
3
4# set device-agnostic code
5device = (
6 'mps' if torch.backends.mps.is_available()
7 else 'cuda' if torch.cuda.is_available()
8 else 'cpu'
9)
10
11# load pre-trained model
12pretrained_ckpt = 'matteopilotto/kratos-sd-v1-4-dreambooth'
13pipeline = StableDiffusionPipeline.from_pretrained(pretrained_ckpt).to(device)
14
15# stable diffusion hyperparameters
16unique_token = 'krts'
17class_type = 'person'
18prompt = f'An illustration of {unique_token} {class_type} punk playing electric guitar, tristan eaton, victo ngai, artgerm, rhads, ross draws'
19negative_prompt = 'low contrast, blurry, low resolution, warped'
20guidance_scale = 7
21h = 512
22w = 512
23inference_steps = 50
24seed = 594109
25
26# set generator for reproducibility
27generator = torch.Generator(device=device).manual_seed(seed)
28
29# generate image
30image = pipeline(
31 prompt,
32 negative_prompt=negative_prompt,
33 guidance_scale=guidance_scale,
34 height=h,
35 width=w,
36 num_inference_steps=inference_steps,
37 generator=generator
38).images[0]