Configuration Parsing Warning:In adapter_config.json: "peft.base_model_name_or_path" must be a string
Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string
anime-character-lora_v1.5
This repository provides a LoRA adapter fine-tuned from
runwayml/stable-diffusion-v1-5 using PyTorch LoRA (PEFT).
This repository contains LoRA adapter weights only.
The base model must be loaded separately.
Training Objective
This adapter is trained to improve anime character generation quality
across 5 artistic styles (impressionist, soft-focus, oil painting, sketch, pastel).
The model learns style-specific features from Danbooru anime images,
applied to the UNet attention layers (to_k, to_v, to_q, to_out.0).
Example Output
Training Configuration
- Base model:
runwayml/stable-diffusion-v1-5 - Method: LoRA (PEFT)
- Target modules:
to_k,to_v,to_q,to_out.0(Attention Linear layers only) - LoRA rank: 8
- LoRA alpha: 32.0
- Learning rate: 1e-4
- Batch size: 2
- Epochs: 10
- Final loss: 0.146112
- GPU: Colab T4 (16 GB VRAM)
Dataset
Danbooru anime images collected and classified into 5 styles:
| Style | Images |
|---|---|
| impressionist_style | ~60 |
| soft_focus_landscape | ~60 |
| oil_painting_aesthetic | ~60 |
| sketch_aesthetic | ~60 |
| pastel_softness | ~60 |
Total: ~300 images
Usage
import torch
from diffusers import StableDiffusionPipeline
from peft import PeftModel
base = "runwayml/stable-diffusion-v1-5"
adapter = "Shion1124/anime-character-lora_v1.5"
pipe = StableDiffusionPipeline.from_pretrained(base, torch_dtype=torch.float16)
pipe.unet = PeftModel.from_pretrained(pipe.unet, adapter, adapter_name="anime_lora")
pipe = pipe.to("cuda")
image = pipe(
prompt="1girl, anime character, watercolor style, masterpiece, high quality",
negative_prompt="low quality, blurry, distorted, nsfw",
num_inference_steps=20,
guidance_scale=7.5,
height=512,
width=512,
generator=torch.Generator(device="cuda").manual_seed(42)
).images[0]
image.save("output.png")
Recommended Prompts
Anime character:
1girl, anime character, detailed beautiful face, long hair,
watercolor painting style, soft colors, bokeh background,
masterpiece, best quality, high quality, intricate details
Negative prompt:
low quality, worst quality, blurry, distorted, watermark,
error, nsfw, extra limbs, missing limbs, ugly, bad anatomy
| Parameter | Value |
|---|---|
num_inference_steps |
20 |
guidance_scale |
7.5 |
height / width |
512 × 512 |
Sources & Terms (IMPORTANT)
Training data: Danbooru (https://danbooru.donmai.us/)
Dataset License: CC0 (Public Domain). Images sourced from Danbooru under CC0 terms.
Compliance: Users must comply with the base model's original license terms (OpenRAIL-M).
License
| Component | License |
|---|---|
| Stable Diffusion v1.5 | OpenRAIL-M |
| LoRA adapter (this repo) | Apache 2.0 |
| Training data (Danbooru) | CC0 |
References
- Ho et al. (2020) - Denoising Diffusion Probabilistic Models - arXiv:2006.11239
- Rombach et al. (2022) - High-Resolution Image Synthesis with Latent Diffusion Models - arXiv:2112.10752
- Hu et al. (2021) - LoRA: Low-Rank Adaptation of Large Language Models - arXiv:2106.09685
- Downloads last month
- 1
Model tree for Shion1124/anime-character-lora_v1.5
Base model
runwayml/stable-diffusion-v1-5