images / run.py
patrickvonplaten's picture
up
6e958c4
raw
history blame
700 Bytes
#!/usr/bin/env python3
from diffusers import StableDiffusionPipeline
import torch
model_ids = ["nitrosocke/Arcane-Diffusion", "nitrosocke/spider-verse-diffusion", "nitrosocke/mo-di-diffusion", "nitrosocke/archer-diffusion", "nitrosocke/elden-ring-diffusion"]
prompts = ["arcane style", "spiderverse style", "modern disney style", "archer style", "elden ring style"]
for model_id, prompt in zip(model_ids, prompts):
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = f"a magical princess with golden hair, {prompt}"
image = pipe(prompt).images[0]
image.save(f"./magical_princess_{model_id.split('/')[-1]}.png")