Skip to content

CompVis/SCFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCFlow: Implicitly Learning Style and Content Disentanglement with Flow Models

Pingchuan Ma* · Xiaopei Yang* · Yusong Li

Ming Gui · Felix Krause · Johannes Schusterbauer · Björn Ommer

CompVis Group @ LMU Munich     Munich Center for Machine Learning (MCML)

* equal contribution

📄 ICCV 2025

Website Paper Paper

This repository contains the official implementation of the paper "SCFlow: Implicitly Learning Style and Content Disentanglement with Flow Models". We proposed a flow-matching framework that learns an invertible mapping between style-content mixtures and their separate representations, avoiding explicit disentanglement objectives. Together with the method, we have curated a 510k synthetic dataset consisting of 10k content instances and 51 distinct styles.

Cover

🛠️ Setup

Create the enviroment with conda:

conda create -n scflow python=3.10
conda activate scflow
pip install -r requirements.txt

The enviroment was tested on Ubuntu 22.04.5 LTS with CUDA 12.1. You can optionally install jupyter-notebook to run the notebook provided in notebooks

Download the model checkpoints:

mkdir ckpts
cd ckpts

# model checkpoint
wget -O scflow_last.ckpt https://huggingface.co/CompVis/SCFlow/resolve/main/scflow_last.ckpt?dowload=true

# unclip checkpoint for visualization
wget -O sd21-unclip-l.ckpt https://huggingface.co/CompVis/SCFlow/resolve/main/sd21-unclip-l.ckpt?dowload=true

🔥 Usage

Inference forward (merge content and style)

bash scripts/inference_forward.sh

Inference reverse (disentangle content and style from a given reference)

bash scripts/inference_reverse.sh

Training (coming soon)

bash ...

🗂️ Dataset

Coming soon

🎓 Citation

If you use this codebase or otherwise found our work valuable, please cite our paper:

@article{ma2025scflow,
  title={SCFlow: Implicitly Learning Style and Content Disentanglement with Flow Models},
  author={Ma, Pingchuan and Yang, Xiaopei and Li, Yusong and Gui, Ming and Krause, Felix and Schusterbauer, Johannes and Ommer, Bj{\"o}rn},
  journal={arXiv preprint arXiv:2508.03402},
  year={2025}
}

🔥 Updates and Backlogs

  • [06.08.2025] ArXiv paper avaiable.
  • [12.08.2025] Release Inference code and ckpt
  • Host the dataset and training code

About

[ICCV 2025] SCFlow: Implicitly Learning Style and Content Disentanglement with Flow Models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published