🚀 Dreamlike Photoreal 2.0
Dreamlike Photoreal 2.0 是一款基于 Stable Diffusion 1.5 的超写实模型,由 dreamlike.art 打造。该模型可将文本描述转化为逼真的图像,为图像生成领域带来了更真实的视觉体验。
🚀 快速开始
如果你想在网站、应用程序等场景使用 Dreamlike 系列模型,请先查看页面底部的许可证信息!
✨ 主要特性
- 超写实风格:能够生成高度逼真的图像,添加 “photo” 到提示词中,可让生成的图像更具真实照片质感。
- 多比例适配:非正方形的宽高比在某些提示词下效果更佳。若想生成肖像照片,可尝试垂直宽高比;若想生成风景照片,可尝试水平宽高比。
- 高分辨率支持:该模型在 768x768px 图像上训练,使用 768x768px、640x896px、896x640px 等尺寸效果良好,在 768x1024px 或 1024x768px 等高分辨率下也表现出色。
💻 使用示例
基础用法
from diffusers import StableDiffusionPipeline
import torch
model_id = "dreamlike-art/dreamlike-photoreal-2.0"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "photo, a church in the middle of a field of crops, bright cinematic lighting, gopro, fisheye lens"
image = pipe(prompt).images[0]
image.save("./result.jpg")
高级用法
from diffusers import StableDiffusionPipeline
import torch
model_id = "dreamlike-art/dreamlike-photoreal-2.0"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "photo, a beautiful landscape"
negative_prompt = "nude, naked"
image = pipe(prompt, negative_prompt=negative_prompt).images[0]
image.save("./safe_result.jpg")
📚 详细文档
示例展示

dreamlike.art 平台
你可以在 dreamlike.art 上免费使用此模型!

模型下载
🧨 Diffusers 使用说明
此模型的使用方法与其他 Stable Diffusion 模型相同。更多信息请查看 Stable Diffusion Pipeline。

📄 许可证
此模型遵循 修改版 的 CreativeML OpenRAIL - M 许可证。
- 禁止行为:不得在网站、应用程序等平台上托管、微调该模型或其衍生模型,或进行推理操作。如有需求,请发送邮件至 contact@dreamlike.art。
- 允许行为:可在商业和非商业网站、应用程序等平台上托管模型卡片和文件(无需实际推理或微调),但需注明完整的模型名称(Dreamlike Photoreal 2.0),包含许可证信息以及模型卡片链接(https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0)。
- 商业使用:在不超过 10 人的团队中,可将模型生成的输出(图像)用于商业目的。
- 合法合规:不得使用该模型故意生成或分享非法或有害的输出内容。
- 输出权益:作者对用户生成的输出不主张任何权利,用户可自由使用,但需对其使用负责,且使用行为不得违反许可证规定。
- 权重再分发:可重新分发模型权重,但需包含与许可证相同的使用限制,并向所有用户分享 修改版 的 CreativeML OpenRAIL - M 许可证副本。请仔细阅读完整许可证:https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0/blob/main/LICENSE.md
⚠️ 重要提示
该模型可能会生成包含成人内容的图像。若要避免生成 NSFW 内容,请在负提示词中添加 “nude, naked”。
💡 使用建议
可根据需求调整提示词和负提示词,以获得更符合预期的图像。同时,合理选择图像的宽高比,能提升生成图像的效果。