🚀 Mobius:重新定義去偏擴散模型的技術前沿
Mobius 是一款擴散模型,它突破了領域無關去偏和表徵重新對齊的界限。通過採用全新的建設性解構框架,Mobius 在眾多風格和領域中實現了無與倫比的泛化能力,無需從頭進行昂貴的預訓練。
🚀 快速開始
運行環境要求
- CFG 取值範圍在 3.5 到 7 之間:
- 3.5 適用於極致寫實和皮膚細節處理。
- 7 適用於藝術、動漫、超現實主義等風格。
- 需要 CLIP 跳過值為 -3。
- 採樣器:DPM++ 3M SDE。
- 調度器:Karras。
- 步數:50。
- 分辨率:1024x1024。
同時,建議在提示詞中使用以下關鍵詞來提升效果:最佳質量、高清、'~~美學~~'。
使用 🧨 diffusers 庫運行示例
import torch
from diffusers import (
StableDiffusionXLPipeline,
KDPM2AncestralDiscreteScheduler,
AutoencoderKL
)
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.float16
)
pipe = StableDiffusionXLPipeline.from_pretrained(
"Corcelio/mobius",
vae=vae,
torch_dtype=torch.float16
)
pipe.scheduler = KDPM2AncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.to('cuda')
prompt = "mystery"
negative_prompt = ""
image = pipe(
prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
guidance_scale=7,
num_inference_steps=50,
clip_skip=3
).images[0]
image.save("generated_image.png")
✨ 主要特性
領域無關去偏:開創性方法
領域無關去偏是由 Corcel 首創的一種新技術。這種創新方法旨在消除擴散模型中固有的偏差,同時不限制其在不同領域的泛化能力。傳統的去偏方法通常專注於特定領域或風格,導致模型難以適應新的或未見過的場景。相比之下,領域無關去偏確保模型在保持通用性和適應性的同時保持無偏性。
領域無關去偏的關鍵在於建設性解構框架。該框架允許對偏差和表徵進行細粒度的重新處理,而無需從頭進行預訓練。這一開創性方法的技術細節將在即將發表的研究論文《Constructive Deconstruction: Domain-Agnostic Debiasing of Diffusion Models》中進行討論,該論文將在 Corcel.io 網站和科學出版物上發佈。
通過應用領域無關去偏,Mobius 在圖像生成的公平性和公正性方面樹立了新的標準,同時保持了其在廣泛風格和領域的卓越適應能力。
超越當前技術水平
Mobius 在幾個關鍵方面超越了現有的先進擴散模型:
- 無偏生成:Mobius 生成的圖像幾乎沒有其他擴散模型中常見的固有偏差,為所有領域的公平性和公正性樹立了新的標杆。
- 卓越的泛化能力:憑藉其無與倫比的適應廣泛風格和領域的能力,Mobius 始終能提供高質量的結果,超越了以往模型的侷限性。
- 高效的微調:Mobius 基礎模型是創建針對特定任務或領域的專業模型的優質基礎,與其他先進模型相比,所需的微調工作量和計算資源顯著減少。
💻 使用示例
基礎用法
以下是使用 🧨 diffusers 庫調用 Mobius 模型生成圖像的基礎示例:
import torch
from diffusers import (
StableDiffusionXLPipeline,
KDPM2AncestralDiscreteScheduler,
AutoencoderKL
)
vae = AutoencoderKL.from_pretrained(
"madebyollin/sdxl-vae-fp16-fix",
torch_dtype=torch.float16
)
pipe = StableDiffusionXLPipeline.from_pretrained(
"Corcelio/mobius",
vae=vae,
torch_dtype=torch.float16
)
pipe.scheduler = KDPM2AncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe.to('cuda')
prompt = "mystery"
negative_prompt = ""
image = pipe(
prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
guidance_scale=7,
num_inference_steps=50,
clip_skip=3
).images[0]
image.save("generated_image.png")
📄 許可證
本項目採用 Apache-2.0 許可證。
📚 詳細文檔
示例提示詞與輸出
提示詞 |
輸出圖片鏈接 |
movie scene screencap, cinematic footage. thanos smelling a little yellow rose. extreme wide angle |
圖片 |
god |
圖片 |
A tiny robot taking a break under a tree in the garden |
圖片 |
mystery |
圖片 |
a cat wearing sunglasses in the summer |
圖片 |
robot holding a sign that says ’a storm is coming’ |
圖片 |
The Exegenesis of the soul, captured within a boundless well of starlight, pulsating and vibrating wisps, chiaroscuro, humming transformer |
圖片 |
anime boy, protagonist, best quality |
圖片 |
natural photography of a man, glasses, cinematic, |
圖片 |
if I could turn back time |
圖片 |
("Mobius" text logo) powerful aura, swirling power, cinematic |
圖片 |
the backrooms |
圖片 |
📝 致謝
本項目由 Corcel 開發 [ https://corcel.io/ ]。