Text-to-Image
Diffusers
Safetensors
StableDiffusionXLPipeline
diffusers-training
stable-diffusion-xl
stable-diffusion-xl-diffusers
Instructions to use mapo-t2i/mapo-pick-style-pixel-art with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use mapo-t2i/mapo-pick-style-pixel-art with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("mapo-t2i/mapo-pick-style-pixel-art", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from mapo-t2i/mapo-pick-style-pixel-art: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/mapo-t2i/mapo-pick-style-pixel-art/resolve/main/README.md
- Command line
-
hf download hf://mapo-t2i/mapo-pick-style-pixel-art/README.md
-
curl -L -o README.md https://huggingface.co/mapo-t2i/mapo-pick-style-pixel-art/resolve/main/README.md
2.3 kB
metadata
license: openrail++
library_name: diffusers
tags:
- text-to-image
- text-to-image
- diffusers-training
- diffusers
- stable-diffusion-xl
- stable-diffusion-xl-diffusers
base_model: stabilityai/stable-diffusion-xl-base-1.0
Margin-aware Preference Optimization for Aligning Diffusion Models without Reference
We propose MaPO, a reference-free, sample-efficient, memory-friendly alignment technique for text-to-image diffusion models. For more details on the technique, please refer to our paper here.
Developed by
- Jiwoo Hong* (KAIST AI)
- Sayak Paul* (Hugging Face)
- Noah Lee (KAIST AI)
- Kashif Rasul (Hugging Face)
- James Thorne (KAIST AI)
- Jongheon Jeong (Korea University)
Dataset
This model was fine-tuned from Stable Diffusion XL on the pixel art split of Pick-Style.
Training Code
Refer to our code repository here.
Inference
from diffusers import DiffusionPipeline, AutoencoderKL, UNet2DConditionModel
import torch
sdxl_id = "stabilityai/stable-diffusion-xl-base-1.0"
vae_id = "madebyollin/sdxl-vae-fp16-fix"
unet_id = "mapo-t2i/mapo-pick-style-pixel-art"
vae = AutoencoderKL.from_pretrained(vae_id, torch_dtype=torch.float16)
unet = UNet2DConditionModel.from_pretrained(unet_id, subfolder='unet', torch_dtype=torch.float16)
pipeline = DiffusionPipeline.from_pretrained(sdxl_id, vae=vae, unet=unet, torch_dtype=torch.float16).to("cuda")
prompt = "portrait of gorgeous cyborg with golden hair, high resolution"
image = pipeline(prompt=prompt, num_inference_steps=30).images[0]
For qualitative results, please visit our project website.
Citation
@misc{hong2024marginaware,
title={Margin-aware Preference Optimization for Aligning Diffusion Models without Reference},
author={Jiwoo Hong and Sayak Paul and Noah Lee and Kashif Rasul and James Thorne and Jongheon Jeong},
year={2024},
eprint={2406.06424},
archivePrefix={arXiv},
primaryClass={cs.CV}
}