🚀 Luna Diffusion模型
Luna Diffusion是一個基於Stable Diffusion 1.5微調的文本到圖像生成模型,能夠生成空靈、富有繪畫感的圖像,在多種圖像生成場景中表現出色。
🚀 快速開始
此模型的使用方式與其他Stable Diffusion模型相同。更多信息,請查看 Stable Diffusion Pipeline。
from diffusers import StableDiffusionPipeline
import torch
model_id = "proximasanfinetuning/luna-diffusion"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "painting of a beautiful woman with red hair, 8k, high quality"
image = pipe(prompt, height=768, width=768).images[0]
image.save("./result.jpg")
✨ 主要特性
- 繪畫風格:該模型在幾百張大多帶有手動標註的高分辨率圖像上基於SD 1.5進行微調,能生成空靈、富有繪畫感的圖像。
- 靈活提示詞:無需特定觸發詞或標記,但在提示詞中添加 "painting" 可增強繪畫效果;使用 "illustration" 可生成更具矢量藝術感的圖像。
- 分辨率適配:在768x768 px、512x768 px或768x512 px分辨率下效果最佳,因為模型是在768x768分辨率上微調的,512x512分辨率可能會使圖像過度處理。
- 採樣器適配:DPM++ 2M採樣器通常能生成清晰的圖像,Euler_a採樣器則可生成更柔和的圖像。
- 膚色支持:模型經過微調,能很好地處理不同膚色的指定。
📦 安裝指南
你可以通過以下方式獲取模型:
- Diffusers庫:使用上述快速開始中的代碼示例,通過
diffusers
庫加載模型。
- CKPT格式:從 CKPT 下載。
- Safetensors格式:從 Safetensors 下載。
💻 使用示例
基礎用法
from diffusers import StableDiffusionPipeline
import torch
model_id = "proximasanfinetuning/luna-diffusion"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "painting of a beautiful woman with red hair, 8k, high quality"
image = pipe(prompt, height=768, width=768).images[0]
image.save("./result.jpg")
高級用法
from diffusers import StableDiffusionPipeline
import torch
model_id = "proximasanfinetuning/luna-diffusion"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
from diffusers import EulerAncestralDiscreteScheduler
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
prompt = "illustration of a fantasy world, 8k, high quality"
negative_prompt = "nude, naked"
image = pipe(prompt, negative_prompt=negative_prompt, height=768, width=768).images[0]
image.save("./advanced_result.jpg")
📚 詳細文檔
模型使用建議
- 若不希望生成包含胸部的圖像,建議在負提示詞中添加 "nude, naked"。
- 查看 博客文章 以獲取更多示例、對比和設置提示。
用戶作品展示
支持作者
如果你喜歡該模型,可以請作者喝咖啡或成為月度支持者:

📄 許可證
該模型遵循修改後的CreativeML OpenRAIL - M許可證。
- 商業使用限制:在盈利、將盈利或計劃盈利或接受捐贈的平臺上使用和託管Luna Diffusion模型及其衍生產品需要事先授權。如需申請許可,請發送電子郵件至proximasan@protonmail.com。
- 模型卡和文件託管:可以在商業和非商業網站、應用等上託管模型卡和文件,只要正確註明模型全名並提供模型卡鏈接 (https://huggingface.co/proximasanfinetuning/luna-diffusion),且不進行實際推理或微調。
- 非商業託管:Luna Diffusion模型及其衍生產品可以託管在非商業網站、應用等上,只要不接受收入或捐贈。必須正確註明模型全名幷包含模型卡鏈接 (https://huggingface.co/proximasanfinetuning/luna-diffusion)。
- 商業輸出使用:模型或其衍生產品的輸出可用於商業目的,只要使用限於10人或更少的團隊。
- 合法合規:不得使用模型故意生成或分享非法或有害的輸出或內容。
- 輸出所有權:作者對生成的輸出不主張任何權利,你可以自由使用它們,並對其使用負責,使用不得違反許可證中的規定。
- 權重再分發:可以重新分發權重,但必須包含與許可證中相同的使用限制,並向所有用戶分享修改後的CreativeML OpenRAIL - M許可證副本(請完整仔細閱讀許可證)。完整許可證請見:https://huggingface.co/proximasanfinetuning/luna-diffusion/blob/main/luna_diffusion_license.txt 。
模型信息
屬性 |
詳情 |
模型類型 |
基於Stable Diffusion 1.5微調的文本到圖像生成模型 |
訓練數據 |
幾百張大多帶有手動標註的高分辨率圖像 |
⚠️ 重要提示
使用模型時請遵守許可證規定,不得用於非法或有害目的。
💡 使用建議
建議在提示詞中合理使用 "painting"、"illustration" 等關鍵詞,以獲得理想的圖像風格;根據需求選擇合適的採樣器和分辨率。