🚀 Anything V3 - 更佳VAE
Anything V3 - 更佳VAE是一款潜在扩散模型,专为动漫爱好者打造。它能够仅通过少量提示词,生成高质量、高细节的动漫风格图像。和其他动漫风格的Stable Diffusion模型一样,它也支持使用Danbooru标签来生成图像。目前,该模型有三种格式:diffusers、ckpt和safetensors,使用它你再也不会得到灰色图像结果。
🚀 快速开始
Gradio
我们支持使用 Gradio 网页界面来运行Anything V3 - 更佳VAE:

🧨 Diffusers
该模型的使用方法与其他Stable Diffusion模型相同。更多信息,请查看 Stable Diffusion 文档。你还可以将模型导出为 ONNX、MPS 和/或 FLAX/JAX 格式。
✨ 主要特性
- 支持多种模型格式,避免生成灰色图像结果。
- 仅需少量提示词,就能生成高质量、高细节的动漫风格图像。
- 支持使用Danbooru标签进行图像生成。
- 可导出为多种格式,方便不同场景使用。
📦 安装指南
要运行该模型的推理流程,你需要安装以下依赖:
pip install diffusers transformers accelerate scipy safetensors
💻 使用示例
基础用法
运行推理流程(如果不更换调度器,将使用默认的DDIM调度器,在本示例中,我们将其更换为DPMSolverMultistepScheduler):
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
import torch
model_id = "Linaqruf/anything-v3-0-better-vae"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")
prompt = "masterpiece, best quality, illustration, beautiful detailed, finely detailed, dramatic light, intricate details, 1girl, brown hair, green eyes, colorful, autumn, cumulonimbus clouds, lighting, blue sky, falling leaves, garden"
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, artist name"
with autocast("cuda"):
image = pipe(prompt,
negative_prompt=negative_prompt,
width=512,
height=640,
guidance_scale=12,
num_inference_steps=50).images[0]
image.save("anime_girl.png")
高级用法
from diffusers import StableDiffusionPipeline
import torch
model_id = "Linaqruf/anything-v3.0"
branch_name= "diffusers"
pipe = StableDiffusionPipeline.from_pretrained(model_id, revision=branch_name, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "pikachu"
image = pipe(prompt).images[0]
image.save("./pikachu.png")
示例展示
以下是使用该模型生成的一些图像示例:
动漫女孩:

1girl, brown hair, green eyes, colorful, autumn, cumulonimbus clouds, lighting, blue sky, falling leaves, garden
Steps: 50, Sampler: DDIM, CFG scale: 12
动漫男孩:

1boy, medium hair, blonde hair, blue eyes, bishounen, colorful, autumn, cumulonimbus clouds, lighting, blue sky, falling leaves, garden
Steps: 50, Sampler: DDIM, CFG scale: 12
风景:

scenery, shibuya tokyo, post-apocalypse, ruins, rust, sky, skyscraper, abandoned, blue sky, broken window, building, cloud, crane machine, outdoors, overgrown, pillar, sunset
Steps: 50, Sampler: DDIM, CFG scale: 12
📄 许可证
该模型开放访问,所有人都可以使用,其使用条款由CreativeML OpenRAIL - M许可证进一步规定。CreativeML OpenRAIL许可证规定如下:
- 不得使用该模型故意生成或分享非法或有害的输出或内容。
- 作者对用户生成的输出不主张任何权利,用户可以自由使用这些输出,但需对其使用负责,且使用行为不得违反许可证中的规定。
- 可以重新分发模型权重,并将模型用于商业用途或作为服务使用。如果这样做,请务必包含与许可证相同的使用限制,并向所有用户分享CreativeML OpenRAIL - M许可证的副本(请完整、仔细地阅读许可证)。
请在此处阅读完整许可证
公告
关于该模型的(非官方)后续版本,请访问 andite/anything-v4.0。我知道这个仓库的存在,因为实际上是我(偶然)提出了将他微调后的模型(andite/yohan-diffusion)作为基础,并与许多神秘模型合并的想法,“嘿,我们就叫它‘Anything V4.0’吧”,因为其质量与Anything V3相当,但有所提升。
我还有件事想告诉大家。我计划将名为“Anything V3”的仓库中的一个设为私有或删除:
因为现在有两个版本了,我后来才意识到这个神秘又无厘头的模型已经在Huggingface热门榜上霸占了这么久,现在新仓库出来后也在榜上。每次看到这个模型在热门榜上,我都感到很内疚。
我倾向于删除或设为私有其中一个仓库,让我们慢慢迁移到 Linaqruf/anything-v3-better-vae,这个仓库的管理更好,并且模型中包含了更好的VAE。
请在 #133讨论 中分享你的想法,关于我是应该删除这个仓库、另一个仓库,还是两个都删除。
感谢大家,
Linaqruf