Instructions to use Bruece/FLUX.1-dev-CMO-HPSv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Bruece/FLUX.1-dev-CMO-HPSv2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Bruece/FLUX.1-dev-CMO-HPSv2") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
FLUX.1-dev-CMO-HPSv2
🤗 Hugging Face | 🌐 Project Page | 🐙 GitHub | 📄 arXiv
🌟 Official LoRA Adapter for Correlation-Weighted Multi-Reward Optimization for Compositional Generation, accepted to ECCV 2026
This repository contains the official LoRA adapter for black-forest-labs/FLUX.1-dev fine-tuned using CMO (Correlation-Weighted Multi-Reward Optimization), our ECCV 2026 work on improving compositional generation capabilities. This variant was trained with the CMO reward together with the HPSv2 reward for human preference alignment.
🚀 Usage
Below is the code to load and merge the LoRA adapter with the base FLUX.1-dev model.
import torch
from diffusers import FluxPipeline
from peft import PeftModel
model_id = "black-forest-labs/FLUX.1-dev"
lora_ckpt_path = "Bruece/FLUX.1-dev-CMO-HPSv2"
device = "cuda"
pipe = FluxPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
pipe.transformer = PeftModel.from_pretrained(pipe.transformer, lora_ckpt_path)
pipe.transformer = pipe.transformer.merge_and_unload()
pipe = pipe.to(device)
prompt = "a photo of a black kite and a green bear"
image = pipe(
prompt,
height=512,
width=512,
num_inference_steps=40,
guidance_scale=4.5
).images[0]
image.save("flux_cmo_hpsv2_lora.png")
🖼️ Qualitative Results
🛠️ Training Details
- Base Model: FLUX.1-dev
- Algorithm: Correlation-Weighted Multi-Reward Optimization (CMO)
- Additional Reward: HPSv2 human preference reward, trained jointly with the CMO reward
- Precision: bfloat16
📜 Citation
If you find this ECCV 2026 model useful for your research, please cite:
@article{wi2026correlation,
title={Correlation-Weighted Multi-Reward Optimization for Compositional Generation},
author={Wi, Jungmyung and Kim, Hyunsoo and Kim, Donghyun},
journal={arXiv preprint arXiv:2603.18528},
year={2026}
}
- Downloads last month
- 24
Model tree for Bruece/FLUX.1-dev-CMO-HPSv2
Base model
black-forest-labs/FLUX.1-dev