How to use from the
Use from the
Diffusers library
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-r4")

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 4)

Course project (DATA 266, Lab 2, Part 2). Comparison run; the selected final run is naruto-sd15-lora-r32.

Model

  • Base model: stable-diffusion-v1-5/stable-diffusion-v1-5, 512x512.
  • Adapter: LoRA on the UNet attention layers only, rank 4, alpha 4, 797,184 trainable parameters (0.093% of the UNet).
  • Load with pipe.load_lora_weights("Arpansin/naruto-sd15-lora-r4").

Data and training

lambdalabs/naruto-blip-captions, 1,065 training images (seed-266 90/10 split). 1,500 steps, effective batch 16, learning rate 1e-4, seed 266. Peak GPU memory 2.65 GiB; 0.446 GPU-hours.

Results (20 prompts x 2 seeds)

KID 0.036 (base 0.106, r=32 0.015); CLIP score 31.73; LPIPS diversity 0.704; 2 of 40 images flagged by the safety checker; mean / max nearest-training-image similarity 0.74 / 0.90. KID uses only 20 generated images, so it is noisy.

Limitations

Same as the rank-32 run: weaker prompt adherence than the base model, small single-source dataset, some memorization signal (lower than r=32).

License and intended use

Research and non-commercial use only. Training data depicts copyrighted characters; the dataset card does not state a license. The base model's CreativeML OpenRAIL-M restrictions also apply.

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Arpansin/naruto-sd15-lora-r4

Adapter
(816)
this model