Instructions to use Arpansin/naruto-sd15-lora-r32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Arpansin/naruto-sd15-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("Arpansin/naruto-sd15-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
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("Arpansin/naruto-sd15-lora-r32")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Naruto-style LoRA for Stable Diffusion 1.5 (rank 32, final run)
Course project (DATA 266, Lab 2, Part 2). This is the run selected as final; the rank-4 run is in naruto-sd15-lora-r4.
Model
- Base model:
stable-diffusion-v1-5/stable-diffusion-v1-5, 512x512. - Adapter: LoRA on the UNet attention layers only (no text-encoder LoRA), rank 32, alpha 32, 6,377,472 trainable parameters (0.737% of the UNet).
- Load with
pipe.load_lora_weights("Arpansin/naruto-sd15-lora-r32").
Data
lambdalabs/naruto-blip-captions: 1,221 images with BLIP captions. After cleaning and a 90/10 split (seed 266), 1,065 images were used for training; the test images were never used in training.
Training
Same budget as the rank-4 run: 1,500 steps, effective batch 16 (micro-batch 4 x accumulation 4), learning rate 1e-4, weight decay 0.01, gradient clipping 1.0, gradient checkpointing, seed 266. Peak GPU memory 2.74 GiB; 0.449 GPU-hours.
Results (20 prompts x 2 seeds per model; 30 steps, guidance 7.5, DPM-Solver)
| base SD 1.5 | LoRA r=4 | LoRA r=32 (this) | |
|---|---|---|---|
| KID vs test images (lower is better) | 0.106 | 0.036 | 0.015 |
| CLIP score | 33.35 | 31.73 | 30.54 |
| LPIPS diversity | 0.727 | 0.704 | 0.691 |
| Safety-checker flags (of 40) | 0 | 2 | 6 |
| Mean / max nearest-training-image similarity | 0.63 / 0.76 | 0.74 / 0.90 | 0.81 / 0.94 |
KID uses only 20 generated images against 119 test images, so it is noisy.
Limitations
- Closer to the dataset style, but weaker prompt adherence and less diversity than the base model, especially on out-of-domain and compositional prompts.
- Highest memorization signal of the three models (max similarity 0.94 to a training image) and the most safety-checker flags; outputs should be filtered.
- Trained on one small anime dataset; reflects its biases (a few characters over-represented, BLIP caption style).
License and intended use
Research and non-commercial use only. The training data depicts copyrighted characters (Naruto), and the dataset card of lambdalabs/naruto-blip-captions does not state a license. The base model is under the CreativeML OpenRAIL-M license, whose use restrictions also apply. Do not use this adapter to imitate real people or to produce deceptive or unsafe content.
- Downloads last month
- 32
Model tree for Arpansin/naruto-sd15-lora-r32
Base model
stable-diffusion-v1-5/stable-diffusion-v1-5