Downloads · 30 days
1.2K
9% of all-time downloads
Linaqruf/pastel-anime-xl-lora
pastel-anime-xl-lora is a text-to-image model from Linaqruf. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as openrail++.
<style .title-container { display: flex; flex-direction: column; / Allow vertical stacking of title and subtitle / justify-content: center; align-items: center; height: 100vh; background-color: f5f5f5; }
Downloads · 30 days
1.2K
9% of all-time downloads
All-time downloads
14.5K
Public
Repo size
601 MB
Likes
27
Public
Click a slice to open those files.
.safetensors394 MB · 98%
From the Hugging Face model README
Pastel Anime LoRA for SDXL is a high-resolution, Low-Rank Adaptation model for Stable Diffusion XL. The model has been fine-tuned using a learning rate of 1e-5 over 1300 global steps with a batch size of 24 on a curated dataset of superior-quality anime-style images. This model is derived from Animagine XL.
Like other anime-style Stable Diffusion models, it also supports Danbooru tags to generate images.
e.g. face focus, cute, masterpiece, best quality, 1girl, green hair, sweater, looking at viewer, upper body, beanie, outdoors, night, turtleneck
<hr>Make sure to upgrade diffusers to >= 0.18.2:
pip install diffusers --upgrade
In addition make sure to install transformers, safetensors, accelerate as well as the invisible watermark:
pip install invisible_watermark transformers accelerate safetensors
Running the pipeline (if you don't swap the scheduler it will run with the default EulerDiscreteScheduler in this example we are swapping it to EulerAncestralDiscreteScheduler:
import torch
from torch import autocast
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
base_model = "Linaqruf/animagine-xl"
lora_model_id = "Linaqruf/pastel-anime-xl-lora"
lora_filename = "pastel-anime-xl.safetensors"
pipe = StableDiffusionXLPipeline.from_pretrained(
model,
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.to('cuda')
pipe.load_lora_weights(lora_model_id, weight_name=lora_filename)
prompt = "face focus, cute, masterpiece, best quality, 1girl, green hair, sweater, looking at viewer, upper body, beanie, outdoors, night, turtleneck"
negative_prompt = "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
image = pipe(
prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
guidance_scale=12,
target_size=(1024,1024),
original_size=(4096,4096),
num_inference_steps=50
).images[0]
image.save("anime_girl.png")
<hr>
This model inherit Stable Diffusion XL 1.0 limitation