🚀 DashAnimeXL V1
DashAnimeXL V1 是一款基於擴散模型的文本到圖像生成模型。該模型由 Dashtoon 研究團隊在 SDXL 基礎上微調而來,能夠根據文本提示生成高質量的動漫圖像。
🚀 快速開始
DashAnimeXL V1 是一款基於擴散模型的文本到圖像生成模型。若要使用該模型,需先安裝所需庫:
pip install diffusers --upgrade
pip install transformers accelerate safetensors
以下是使用 DashAnimeXL V1 生成圖像的示例代碼:
import torch
from diffusers import (
StableDiffusionXLPipeline,
EulerAncestralDiscreteScheduler,
AutoencoderKL
)
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.bfloat16
)
pipe = StableDiffusionXLPipeline.from_pretrained(
"dashtoon/DashAnimeXL-V1",
vae=vae,
torch_dtype=torch.bfloat16,
use_safetensors=True,
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
if torch.cuda.is_available():
pipe.to('cuda')
prompt = "anime illustration, An ink painting with a superhot, pop art style, featuring vibrant splashes and gradient patterns merging with random signals and noise. A zoomed-in panda wearing glasses, appearing to look directly at the viewer. The piece is bathed in warm, volumetric lighting against a clear dusk sky background. The reflection in the panda's sunglasses reveals nuclear clouds, adding an element of surrealism."
negative_prompt = "nsfw, low quality, worst quality, very displeasing, 3d, watermark, signature, ugly, poorly drawn"
image = pipe(
prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
guidance_scale=7,
num_inference_steps=20
).images[0]
✨ 主要特性
- 高質量動漫圖像生成:DashAnimeXL V1 能夠根據文本提示生成高質量的動漫圖像。
- 增強的手部解剖結構:該模型在生成圖像時,對手部解剖結構的表現更加準確。
- 更好的概念理解和提示解釋:能夠更好地理解文本提示中的概念,並生成符合要求的圖像。
📦 安裝指南
若要使用 DashAnimeXL V1,需安裝以下庫:
pip install diffusers --upgrade
pip install transformers accelerate safetensors
💻 使用示例
基礎用法
import torch
from diffusers import (
StableDiffusionXLPipeline,
EulerAncestralDiscreteScheduler,
AutoencoderKL
)
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.bfloat16
)
pipe = StableDiffusionXLPipeline.from_pretrained(
"dashtoon/DashAnimeXL-V1",
vae=vae,
torch_dtype=torch.bfloat16,
use_safetensors=True,
)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
if torch.cuda.is_available():
pipe.to('cuda')
prompt = "anime illustration, An ink painting with a superhot, pop art style, featuring vibrant splashes and gradient patterns merging with random signals and noise. A zoomed-in panda wearing glasses, appearing to look directly at the viewer. The piece is bathed in warm, volumetric lighting against a clear dusk sky background. The reflection in the panda's sunglasses reveals nuclear clouds, adding an element of surrealism."
negative_prompt = "nsfw, low quality, worst quality, very displeasing, 3d, watermark, signature, ugly, poorly drawn"
image = pipe(
prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
guidance_scale=7,
num_inference_steps=20
).images[0]
📚 詳細文檔
模型描述
更多詳細信息請參考我們的 博客。
📄 許可證
本模型使用 CreativeML Open RAIL++-M License 許可證。