← Open Source
black-forest-labs

Self-Flow

[ICML'26] Code and website for Self-Flow: Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis.

ModelsVision modelsPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
778
Stars
27
Forks
+4
This week
1
Contributors
Created 2026-02-26 · Updated 2026-10-14 · #13917 today
Top developers

black-forest-labs/Self-Flow is ranked 13,917 with 778 stars.

Same-category comparison

black-forest-labs/Self-Flow is ranked 13,917 among these 8 peers; bryanswkim/Chain-of-Zoom is ranked 13,919.

Same-category comparison
NameRankMetrics
facebookresearch/contriever13,897
Language:
Python
Stars:
780
Forks:
69
Description:
Contriever: Unsupervised Dense Information Retrieval with Contrastive Learning.
jerryji1993/DNABERT13,898
Language:
Python
Stars:
780
Forks:
180
Description:
DNABERT: pre-trained Bidirectional Encoder Representations from Transformers model for DNA-language in genome.
Boese0601/MagicDance13,910
Language:
Python
Stars:
778
Forks:
64
Description:
[ICML 2024] MagicPose(also known as MagicDance): Realistic Human Poses and Facial Expressions Retargeting with Identity-aware Diffusion.
YuvalNirkin/fsgan13,914
Language:
Jupyter Notebook
Stars:
778
Forks:
147
Description:
FSGAN - Official PyTorch Implementation.
bryanswkim/Chain-of-Zoom13,919
Language:
Python
Stars:
778
Forks:
76
Description:
[NeurIPS'25 Spotlight] Official repository for "Chain-of-Zoom: Extreme Super-Resolution via Scale Autoregression and Preference Alignment".
bytedance/ibot13,920
Language:
Jupyter Notebook
Stars:
778
Forks:
93
Description:
iBOT :robot:: Image BERT Pre-Training with Online Tokenizer (ICLR 2022).
youngwanLEE/centermask213,928
Language:
Python
Stars:
778
Forks:
154
Description:
[CVPR 2020] CenterMask : Real-time Anchor-Free Instance Segmentation.
hubertsiuzdak/snac13,935
Language:
Python
Stars:
777
Forks:
46
Description:
Multi-Scale Neural Audio Codec (SNAC) compresses audio into discrete codes at a low bitrate.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModels
SubcategoryVision models
KeywordsBenchmarks, Image production, Model architecture
Stars778
Forks27
Contributors1
Created date2026-02-26
Updated date2026-10-14
Stars in 1 day0
Stars in 7 days4
Rank13,917
Previous rank6,434
Rank change-7,483
7-day stars rank6,363
Previous 7-day stars rank6,363
7-day stars rank change0
Total stars rank13,650
Previous total stars rank13,625
Total stars rank change-25
README summary

Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis (Self-Flow) [ICML'26] Hila Chefer* · Patrick Esser* Dominik Lorenz · Dustin Podell · Vikash Raja · Vinh Tong · Antonio Torralba · Robin Rombach Black Forest Labs This folder contains inference code for generating images with our Self-Flow trained diffusion model on ImageNet 256×256. Overview **Self-Flow** (Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis) is a training framework that combines the flow matching objective with a self-supervised feature reconstruction objective

. Load a Self-Flow checkpoints (pretrained on ImageNet 256x256) 2. Generate 50,000 images for FID evaluation The generated samples can be evaluated using the ADM evaluation suite. 0 = no guidance, as used in paper) | Evaluation The generated file can be used with the ADM evaluation suite to compute FID, IS, Precision, and Recall. Download Reference Statistics Run Evaluation Model Architecture The Self-Flow model is based on SiT-XL/2 with the following specifications A key architectural modification is

**per-token timestep conditioning**, which allows each token to have a different noise level during training. Project Structure Training Details The model was trained using the following configuration: **Model**: SiT-XL/2 with per-token timestep conditioning **Training**: Self-Flow with per-token masking (25% mask ratio) **Optimizer**: AdamW with gradient clipping (max_norm=1) **Mixed precision**: BFloat16 **Self-distillation**: Teacher at layer 20 (EMA), student at layer 8 Acknowledgments This code builds upon: REPA - Representation Alignment for Generation SiT

- Scalable Interpolant Transformers BibTeX If you use this work, please cite:

Frequently asked questions

How many stars and forks are recorded?

black-forest-labs/Self-Flow has 778 stars and 27 forks.

What is the repository rank?

black-forest-labs/Self-Flow is ranked 13,917.

What language and category are recorded?

black-forest-labs/Self-Flow has 778 stars, uses Python and belongs to Models.

Which repository is closest in rank?

black-forest-labs/Self-Flow is compared with bryanswkim/Chain-of-Zoom, ranked 13,919 with 778 stars.

README

Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis (Self-Flow) [ICML'26]

Hila Chefer* · Patrick Esser*
Dominik Lorenz · Dustin Podell · Vikash Raja · Vinh Tong · Antonio Torralba · Robin Rombach

Black Forest Labs

This folder contains inference code for generating images with our Self-Flow trained diffusion model on ImageNet 256×256.

Overview

Self-Flow (Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis) is a training framework that combines the flow matching objective with a self-supervised feature reconstruction objective.

This inference code allows you to:

  1. Load a Self-Flow checkpoints (pretrained on ImageNet 256x256)
  2. Generate 50,000 images for FID evaluation

The generated samples can be evaluated using the ADM evaluation suite.

Requirements

pip install -r requirements.txt

Quick Start

Download Checkpoint

python -c "
from huggingface_hub import hf_hub_download
hf_hub_download(
    repo_id='Hila/Self-Flow',
    filename='selfflow_imagenet256.pt',
    local_dir='./checkpoints'
)
print('Downloaded!')
"

Generate 50k samples (multi-GPU recommended)

torchrun --nnodes=1 --nproc_per_node=8 sample.py \
    --ckpt checkpoints/selfflow_imagenet256.pt \
    --output-dir ./samples \
    --num-fid-samples 50000

Single GPU

python sample.py \
    --ckpt checkpoints/selfflow_imagenet256.pt \
    --output-dir ./samples \
    --num-fid-samples 50000 \
    --batch-size 64

Command Line Arguments

Argument Default Description
--ckpt required Path to model checkpoint
--output-dir ./samples Output directory for generated samples
--num-fid-samples 50000 Number of samples to generate
--batch-size 64 Batch size per GPU
--num-steps 250 Number of diffusion sampling steps
--mode SDE Sampling mode: SDE or ODE
--seed 31 Random seed for reproducibility
--cfg-scale 1.0 Classifier-free guidance scale (1.0 = no guidance, as used in paper)

Evaluation

The generated .npz file can be used with the ADM evaluation suite to compute FID, IS, Precision, and Recall.

Download Reference Statistics

wget https://openaipublic.blob.core.windows.net/diffusion/jul-2021/ref_batches/imagenet/256/VIRTUAL_imagenet256_labeled.npz

Run Evaluation

python evaluator.py \
    VIRTUAL_imagenet256_labeled.npz \
    ./samples/samples_50000.npz ./samples

Model Architecture

The Self-Flow model is based on SiT-XL/2 with the following specifications

A key architectural modification is per-token timestep conditioning, which allows each token to have a different noise level during training.

Project Structure

Self-Flow/
├── sample.py           # Main sampling script
├── checkpoints/        # Place model checkpoints here
├── requirements.txt    # Python dependencies
├── README.md           # This file
└── src/                # Model and sampling implementations
    ├── model.py        # SelfFlowPerTokenDiT model
    ├── sampling.py     # Diffusion sampling utilities
    └── utils.py        # Position encoding utilities

Training Details

The model was trained using the following configuration:

  • Model: SiT-XL/2 with per-token timestep conditioning
  • Training: Self-Flow with per-token masking (25% mask ratio)
  • Optimizer: AdamW with gradient clipping (max_norm=1)
  • Mixed precision: BFloat16
  • Self-distillation: Teacher at layer 20 (EMA), student at layer 8

Acknowledgments

This code builds upon:

  • REPA - Representation Alignment for Generation
  • SiT - Scalable Interpolant Transformers

BibTeX

If you use this work, please cite:

@article{CheferEsser2026selfflow,
      title={Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis}, 
      author={Hila Chefer and Patrick Esser and Dominik Lorenz and Dustin Podell and Vikash Raja and Vinh Tong and Antonio Torralba and Robin Rombach},
      journal = {arXiv preprint arXiv:2603.06507},
      year={2026},
}
Nearby in the ranking
Similar items