lambda/pokemon-blip-captions
Viewer β’ Updated β’ 833 β’ 1.66k β’ 307
How to use juliensimon/stable-diffusion-v1-5-pokemon-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("juliensimon/stable-diffusion-v1-5-pokemon-lora")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]LoRA adaptation weights for Stable Diffusion v1.5, fine-tuned on the Pokemon BLIP Captions dataset (833 samples) to generate Pokemon-style images from text prompts.
Video walkthrough: Fine-tune Stable Diffusion with LoRA for as low as $1
| Detail | Value |
|---|---|
| Method | 4-bit QLoRA following the official LoRA blog post |
| Hardware | Amazon EC2 g4dn.xlarge (1x NVIDIA T4 GPU) |
| Environment | AWS Deep Learning AMI for PyTorch |
| Training time | ~6 hours |
| Cost | ~$3 on-demand / ~$1 with EC2 Spot Instances |
from diffusers import StableDiffusionPipeline
import torch
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16
)
pipe.unet.load_attn_procs("juliensimon/stable-diffusion-v1-5-pokemon-lora")
pipe.to("cuda")
image = pipe("a pokemon with blue fire wings").images[0]
Base model
runwayml/stable-diffusion-v1-5