🚀 Anything V3
Anything V3 是一款面向动漫爱好者的潜在扩散模型。该模型只需少量提示词,就能生成高质量、高细节的动漫风格图像。和其他动漫风格的 Stable Diffusion 模型一样,它也支持使用 danbooru 标签来生成图像。
🚀 快速开始
本仓库旨在方便进行 Dreambooth 训练,我已移除了所有在 Diffusers 中未使用的 .ckpt 文件,这将显著加快设置速度。
✨ 主要特性
- 高质量动漫图像生成:仅需少量提示词,就能生成高质量、高细节的动漫风格图像。
- 支持 danbooru 标签:和其他动漫风格的 Stable Diffusion 模型一样,支持使用 danbooru 标签来生成图像。
- 多种优化格式支持:可以将模型导出为 ONNX、MPS 等格式。
📦 安装指南
此模型的使用方法与其他 Stable Diffusion 模型相同。更多信息,请查看 Stable Diffusion。
💻 使用示例
基础用法
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")
高级用法
你可以根据自己的需求调整提示词,以生成不同风格的图像。例如:
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 = "1girl, white hair, golden eyes, beautiful eyes, detail, flower meadow, cumulonimbus clouds, lighting, detailed sky, garden"
image = pipe(prompt).images[0]
image.save("./anime_girl.png")
📚 详细文档
Gradio 支持
我们支持使用 Gradio Web UI 来运行 Anything-V3.0:
在 Spaces 中打开
示例图像
以下是使用该模型生成的一些图像示例:
动漫女孩:

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 许可证副本(请完整、仔细阅读许可证)。
请在此阅读完整许可证