🚀 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 许可证。