SalesforceAIResearch/DiffusionDPO
Code for "Diffusion Model Alignment Using Direct Preference Optimization"
What it solves
這個專案提供了 Diffusion-DPO 的訓練代碼,這是一種將擴散模型(如 Stable Diffusion)與人類偏好對齊的方法。它允許開發者微調圖像生成模型,使其生成的圖像能更好地符合使用者的實際偏好,而不僅僅是依賴標準的訓練目標。
How it works
該系統實作了擴散模型的直接偏好優化(DPO)。它採用預訓練模型(例如 Stable Diffusion 1.5 或 SDXL)並使用偏好與非偏好圖像的數據集進行微調。它包含了用於 AI 反饋的工具,透過 PickScore、HPS、Aesthetics 和 CLIP 等評分模型來評估生成圖像的品質與對齊程度。
Who it’s for
想要使用 DPO 將圖像生成模型與人類偏好對齊的研究人員與機器學習工程師,或是尋求複製「Diffusion Model Alignment Using Direct Preference Optimization」學術論文結果的人。
Highlights
- Support for Multiple Models: Compatible with Stable Diffusion 1.5 and Stable Diffusion XL (SDXL).
- AI Feedback Integration: Built-in support for scoring models including PickScore, HPS, Aesthetics, and CLIP.
- Flexible Training: Includes scripts for both DPO and standard Supervised Fine-Tuning (SFT).
- Pretrained Checkpoints: Provides access to D->DPO-aligned versions of SD1.5 and SDXL.