Anime Detailer Xl Lora
模型概述
該模型是一個概念滑塊適配器,允許用戶通過調整參數控制生成動漫圖像的細節程度,從高度細節化到更抽象表現均可實現。
模型特點
細節可調節
通過概念滑塊控制生成圖像的細節水平,範圍從-2(較少細節)到2(更多細節)
動漫風格優化
專門針對動漫風格圖像進行優化,能生成高質量的動漫人物和場景
安全張量支持
使用safetensors格式,確保模型加載和使用的安全性
模型能力
動漫風格圖像生成
細節程度可調的圖像生成
高質量人物肖像生成
使用案例
數字藝術創作
動漫角色設計
生成各種細節程度的動漫角色概念圖
可獲得從簡略到精細的不同風格角色設計
動漫場景創作
生成具有不同細節水平的動漫風格場景
可根據需要調整場景的細節豐富程度
🚀 Anime Detailer XL LoRA
Anime Detailer XL LoRA是一款先進的LoRA適配器,可與Animagine XL 2.0配合使用。它專注於概念調製,能讓用戶調整生成的動漫風格圖像的細節程度,通過操作概念滑塊,用戶可以創建從高度細節到更抽象表現的圖像。
🚀 快速開始
安裝依賴
確保安裝最新的 diffusers
庫以及其他必要的包:
pip install diffusers --upgrade
pip install transformers accelerate safetensors
運行示例代碼
以下Python腳本展示瞭如何將LoRA與Animagine XL 2.0結合使用。默認調度器為 EulerAncestralDiscreteScheduler
,為清晰起見,也可顯式定義。
import torch
from diffusers import (
StableDiffusionXLPipeline,
EulerAncestralDiscreteScheduler,
AutoencoderKL
)
# Initialize LoRA model and weights
lora_model_id = "Linaqruf/anime-detailer-xl-lora"
lora_filename = "anime-detailer-xl.safetensors"
lora_scale_slider = 2 # -2 for less detailed result
# Load VAE component
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.float16
)
# Configure the pipeline
pipe = StableDiffusionXLPipeline.from_pretrained(
"Linaqruf/animagine-xl-2.0",
vae=vae,
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.to('cuda')
# Load and fuse LoRA weights
pipe.load_lora_weights(lora_model_id, weight_name=lora_filename)
pipe.fuse_lora(lora_scale=lora_scale_slider)
# Define prompts and generate image
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,
num_inference_steps=50
).images[0]
# Unfuse LoRA before saving the image
pipe.unfuse_lora()
image.save("anime_girl.png")
✨ 主要特性
Anime Detailer XL LoRA是一款前沿的LoRA適配器,專為與Animagine XL 2.0協同工作而設計。該獨特模型專注於概念調製,使用戶能夠調整生成的動漫風格圖像的細節程度。通過操作概念滑塊,用戶可以創建從高度詳細到更抽象表現的圖像。
📦 安裝指南
確保安裝最新的 diffusers
庫以及其他必要的包:
pip install diffusers --upgrade
pip install transformers accelerate safetensors
💻 使用示例
基礎用法
import torch
from diffusers import (
StableDiffusionXLPipeline,
EulerAncestralDiscreteScheduler,
AutoencoderKL
)
# Initialize LoRA model and weights
lora_model_id = "Linaqruf/anime-detailer-xl-lora"
lora_filename = "anime-detailer-xl.safetensors"
lora_scale_slider = 2 # -2 for less detailed result
# Load VAE component
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.float16
)
# Configure the pipeline
pipe = StableDiffusionXLPipeline.from_pretrained(
"Linaqruf/animagine-xl-2.0",
vae=vae,
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.to('cuda')
# Load and fuse LoRA weights
pipe.load_lora_weights(lora_model_id, weight_name=lora_filename)
pipe.fuse_lora(lora_scale=lora_scale_slider)
# Define prompts and generate image
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,
num_inference_steps=50
).images[0]
# Unfuse LoRA before saving the image
pipe.unfuse_lora()
image.save("anime_girl.png")
📚 詳細文檔
模型詳情
屬性 | 詳情 |
---|---|
開發者 | Linaqruf |
模型類型 | Stable Diffusion XL的LoRA適配器 |
模型描述 | 此適配器是一個概念滑塊,允許用戶控制動漫主題圖像的細節程度。滑塊設置越接近2,結果越詳細;越接近 -2,結果越不詳細。它是藝術家和創作者在動漫圖像中尋求各種藝術表達的多功能工具。 |
許可證 | CreativeML Open RAIL++-M License |
微調基礎模型 | Animagine XL 2.0 |
🔧 技術細節
Anime Detailer XL LoRA作為一個LoRA適配器,與Animagine XL 2.0結合使用,通過概念調製來控制生成的動漫圖像的細節程度。它利用了 diffusers
庫中的 StableDiffusionXLPipeline
進行圖像生成,同時使用 EulerAncestralDiscreteScheduler
作為調度器。在代碼實現中,首先加載VAE組件,然後配置管道,接著加載並融合LoRA權重,最後根據定義的提示生成圖像。在保存圖像之前,需要解除LoRA的融合。
📄 許可證
本項目採用 CreativeML Open RAIL++-M License 許可證。
致謝
我們的項目受益於以下重要工作:
- Erasing Concepts from Diffusion Models 作者:Rohit Gandikota等人
- LECO 作者:p1atdev
- AI Toolkit 作者:Ostris
Stable Diffusion V1 5
Openrail
穩定擴散是一種潛在的文本到圖像擴散模型,能夠根據任何文本輸入生成逼真的圖像。
圖像生成
S
stable-diffusion-v1-5
3.7M
518
Stable Diffusion Inpainting
Openrail
基於穩定擴散的文本到圖像生成模型,具備圖像修復能力
圖像生成
S
stable-diffusion-v1-5
3.3M
56
Stable Diffusion Xl Base 1.0
SDXL 1.0是基於擴散的文本生成圖像模型,採用專家集成的潛在擴散流程,支持高分辨率圖像生成
圖像生成
S
stabilityai
2.4M
6,545
Stable Diffusion V1 4
Openrail
穩定擴散是一種潛在文本到圖像擴散模型,能夠根據任意文本輸入生成逼真圖像。
圖像生成
S
CompVis
1.7M
6,778
Stable Diffusion Xl Refiner 1.0
SD-XL 1.0優化器模型是Stability AI開發的圖像生成模型,專為提升SDXL基礎模型生成的圖像質量而設計,特別擅長最終去噪步驟處理。
圖像生成
S
stabilityai
1.1M
1,882
Stable Diffusion 2 1
基於擴散的文本生成圖像模型,支持通過文本提示生成和修改圖像
圖像生成
S
stabilityai
948.75k
3,966
Stable Diffusion Xl 1.0 Inpainting 0.1
基於Stable Diffusion XL的潛在文本到圖像擴散模型,具備通過遮罩進行圖像修復的功能
圖像生成
S
diffusers
673.14k
334
Stable Diffusion 2 Base
基於擴散的文生圖模型,可根據文本提示生成高質量圖像
圖像生成
S
stabilityai
613.60k
349
Playground V2.5 1024px Aesthetic
其他
開源文生圖模型,能生成1024x1024分辨率及多種縱橫比的美學圖像,在美學質量上處於開源領域領先地位。
圖像生成
P
playgroundai
554.94k
723
Sd Turbo
SD-Turbo是一款高速文本生成圖像模型,僅需單次網絡推理即可根據文本提示生成逼真圖像。該模型作為研究原型發佈,旨在探索小型蒸餾文本生成圖像模型。
圖像生成
S
stabilityai
502.82k
380
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98