🚀 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