🚀 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/ ]。