项目简介
Playground v2是由Playground团队开发的,基于扩散的文本到图像的生成模型,擅长将文本提示转换为视觉上吸引人的图像。值得注意的是,根据涉及超过2,600个提示和大量用户的用户研究,Playground v2生成的图像比Stable Diffusion XL生成的图像受欢迎度高2.5倍。
该模型是一种潜在扩散模型,使用两个固定的、预先训练好的文本编码器。它模仿了Stable Diffusion XL的架构,提供社区许可证以便更广泛地使用。用户可以通过Hugging Face Diffusers来操作此模型,需要安装diffusers(版本0.24.0或更高)及其他依赖项。建议使用3.0的引导比例以获得最佳效果
模型型号
- 1024*1024分辨率
- 512*512分辨率
- 256*256分辨率
Playground v2可以在Automatic1111/ComfyUI上使用
使用
Playground v2和SDXL的架构和模型参数是相同的,都是采用两个text encoder:OpenCLIP-ViT/G和CLIP-ViT/L。可以直接用diffusers库来使用:
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"playgroundai/playground-v2-1024px-aesthetic",
torch_dtype=torch.float16,
use_safetensors=True,
add_watermarker=False,
variant="fp16"
)
pipe.to("cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt=prompt, guidance_scale=3.0).images[0]
MJHQ-30K基准
Playground引入了MJHQ-30K基准,用于自动评估模型的美学质量。这个基准使用了来自Midjourney的高质量数据集,涵盖了10个类别,每个类别包含3,000个样本,以评估美学分数和CLIP分数。Playground v2在人物和时尚类别的表现超过了SDXL-1-0-refiner,与用户研究中显示的用户偏好一致
项目链接
https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic