CoolFace
Modelpublic

Xixixixihahahaha/RealAlign-SD-1.5

sourceHugging Facecreativeml-openrail-mupdated 4mo agoView on Hugging Face
1likes95downloads
Model Card

RealAlign โ€” SD-1.5 LoRA Checkpoints

LoRA weights for Stable Diffusion v1.5, aligned with RealAlign from the paper "When Preference Labels Fall Short: Aligning Diffusion Models from Real Data" (ICML 2026).

ResourceLink
๐Ÿ“„ PaperarXiv:2605.19839
๐ŸŒ Project pagecwyxx.github.io/RealAlign
๐Ÿš€ Codegithub.com/Cwyxx/RealAlign
๐Ÿค— DatasetRealAlign-Dataset

Summary

RealAlign aligns text-to-image diffusion models using real data as the preference signal: instead of human-annotated preference pairs, it treats a high-quality reference image as the preferred ("win") sample and a perturbed/inpainted version as the non-preferred ("lose") sample. These LoRA adapters are the result of fine-tuning SD-1.5 with RealAlign's two-stage procedure:

  1. 1.Stage 1 โ€” Diffusion-DRO (inverse RL / distributionally-robust objective), LoRA + LoRA-init.
  2. 2.Stage 2 โ€” Diffusion-DPO with LoRA-init, warm-started from the Stage 1 LoRA.

Checkpoints

Each file is a separate LoRA, trained on preference pairs from a different curation source:

FileTraining source
HPDv3.safetensorsHPDv3 (real-photo references)
Civitai-top.safetensorsCivitai top SFW images
Pick-a-pic-v2.safetensorsPick-a-Pic v2 (top subset)
  • โ€”Format: diffusers-style UNet LoRA (unet.*.lora_A/lora_B.weight), fp32.
  • โ€”LoRA rank: 4, applied to the UNet self- and cross-attention projections (to_q, to_k, to_v, to_out).
Note: The Pick-a-Pic v2 LoRA is included here, but the corresponding image dataset is not released on the Hub because the source data may contain NSFW content (see the dataset card).

Usage

python
import torch
from diffusers import StableDiffusionPipeline

pipe = StableDiffusionPipeline.from_pretrained(
    "stable-diffusion-v1-5/stable-diffusion-v1-5",
    torch_dtype=torch.float16,
).to("cuda")

# Pick the LoRA trained on the source you want
pipe.load_lora_weights(
    "Xixixixihahahaha/RealAlign-SD-1.5",
    weight_name="HPDv3.safetensors",
)

image = pipe("a photo of an astronaut riding a horse on the moon").images[0]
image.save("out.png")

Citation

bibtex
@article{chen2026preference,
  title={When Preference Labels Fall Short: Aligning Diffusion Models from Real Data},
  author={Chen, Weiyan and Deng, Weijian and Xiao, Yao and Tu, Weijie and Dong, ZiYi and Radwan, Ibrahim and Lin, Liang and Wei, Pengxu},
  journal={arXiv preprint arXiv:2605.19839},
  year={2026}
}