Instructions to use DishaRawat/data266-team30-p2-lora-r32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DishaRawat/data266-team30-p2-lora-r32 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("DishaRawat/data266-team30-p2-lora-r32") 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
Naruto-style LoRA for Stable Diffusion 1.5 (DATA 266 Lab 2, team 30) β final run lora-r32
Base model: stable-diffusion-v1-5/stable-diffusion-v1-5 (512Γ512). Data: lambdalabs/naruto-blip-captions, 1099 training images after removing
0 corrupted/duplicate images; 122 held-out test images (90/10 split, seed 266).
Training: LoRA rank 32 (alpha 32) on UNet attention projections ['to_k', 'to_q', 'to_v', 'to_out.0']; 6,377,472 trainable parameters; AdamW lr 0.0001 (cosine, 50 warm-up); 1000 steps, batch 2 Γ grad-accum 2; fp16 autocast; seed 266; 0.117 GPU-hours on NVIDIA GeForce RTX 4090, peak memory 4.05 GB.
Results (20 prompts Γ seeds 0/1, DPMSolver++ 30 steps, CFG 7.5):
| model | KID in-domain β | CLIP score β | LPIPS diversity β |
|---|---|---|---|
| base | 0.0936 Β± 0.0130 | 32.28 | 0.816 |
| lora-r4 | 0.0521 Β± 0.0100 | 31.55 | 0.799 |
| lora-r32 | 0.0331 Β± 0.0074 | 31.25 | 0.811 |
Human blinded comparison vs base: see report.
Usage
from diffusers import StableDiffusionPipeline
import torch
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16).to("cuda")
pipe.load_lora_weights("DishaRawat/data266-team30-p2-lora-r32", weight_name="pytorch_lora_weights.safetensors")
pipe("a man with spiky blond hair and an orange jacket").images[0]
Limitations: BLIP captions are generic (no character names), so specific characters cannot be requested; the adapter pulls out-of-domain and multi-character prompts toward single anime faces; training data is skewed toward male characters; KID is computed on only 20 generated images and is noisy.
License / intended use: the training images are copyrighted Naruto characters β non-commercial research and education only. CreativeML OpenRAIL-M use restrictions of the base model apply. Outputs were filtered with the SD safety checker.
- Downloads last month
- 76
Model tree for DishaRawat/data266-team30-p2-lora-r32
Base model
stable-diffusion-v1-5/stable-diffusion-v1-5