Views
No views yet
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 |
1from diffusers import StableDiffusionPipeline
2import torch
3
4pipe = StableDiffusionPipeline.from_pretrained(
5 "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16
6)
7pipe.unet.load_attn_procs("juliensimon/stable-diffusion-v1-5-pokemon-lora")
8pipe.to("cuda")
9
10image = pipe("a pokemon with blue fire wings").images[0]