Instructions to use chels512/data266-lab2-naruto-run1-lora-r8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use chels512/data266-lab2-naruto-run1-lora-r8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("chels512/data266-lab2-naruto-run1-lora-r8") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
chels512/data266-lab2-naruto-run1-lora-r8 - SD 1.5 LoRA (run1_lora_r8)
Base model: stable-diffusion-v1-5/stable-diffusion-v1-5 (512x512). Method: LoRA, rank 8, alpha 8, UNet attention (to_q,to_k,to_v,to_out.0).
Data: lambdalabs/naruto-blip-captions - 1099 training images after removing corrupted/duplicate images; 10% test split held out (seed 266).
Naruto characters are copyrighted: this adapter is for non-commercial research and teaching only.
Training: 1500 steps, batch 2 x grad-accum 2, LR 0.0001 (cosine, warmup 100), fp16 mixed precision, seed 266. Trainable parameters: 1,594,368. Peak GPU memory 3.68 GB, 0.666 GPU-hours on Tesla T4.
Results (from notebooks/p2_finetune.ipynb):
model base run1_lora_r8
KID_in_domain_mean 0.103 0.0359
KID_std 0.0098 0.0058
CLIP_score_all40 31.5 30.72
CLIP_score_in_domain 30.14 28.66
LPIPS_diversity 0.7187 0.721
nsfw_flagged 0 2
GPU_hours NaN 0.666
peak_mem_GB NaN 3.68
human_style_win_rate_vs_base NaN None
human_prompt_win_rate_vs_base NaN None
Limitations: captions are BLIP auto-captions (short, generic, sometimes wrong); style is narrow (anime faces dominate), so out-of-domain prompts drift toward Naruto-like faces; compositional prompts (counts, colour binding) are unreliable; KID is noisy with 20 images. Outputs pass through the SD safety checker; it is not a complete NSFW filter.
Usage:
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16).to("cuda")
pipe.load_lora_weights("chels512/data266-lab2-naruto-run1-lora-r8")
- Downloads last month
- 20
Model tree for chels512/data266-lab2-naruto-run1-lora-r8
Base model
stable-diffusion-v1-5/stable-diffusion-v1-5