Skip to content

naderAsadi/simFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simFlow

This repository contains minimal implementations of several flow-map / average-velocity–type methods. Inspired by Simo Ryu's minRF repository, it uses a LLAMA-DIT architecture, with the training logic factored into a single utility script, train_utils.py, so adding new papers mostly boils down to writing the loss and sampling logic. Everything is still intentionally minimal and hopefully easy to hack on.

Quick Start

From the project root (simFlow/), you can create and sync the environment with:

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create/activate the environment and install dependencies
uv sync

Each method is exposed as a Python module and configured via Hydra. The general pattern to run a method is:

uv run python -m src.<file_name> --config-name=<dataset>

Where:

  • <file_name>: One of rectified_flow, shortcut, mean_flow, alpha_flow.
  • <dataset>: One of the configs under src/configs/, e.g. mnist or cifar10.

If you want to enable WandB logging, set your API key and override WandB configs:

export WANDB_API_KEY=...
uv run python -m src.<file_name> --config-name=<dataset> wandb=true wandb_name=<exp_name>

Sample Outputs

1. Rectified Flow (src/rectified_flow.py)

Rectified Flow Sample (MNIST) Rectified Flow Sample (CIFAR10)

2. Shortcut Model (src/shortcut.py)

Rectified Flow Sample (MNIST) Rectified Flow Sample (CIFAR10)

3. MeanFlow (src/mean_flow.py)

Rectified Flow Sample (MNIST) Rectified Flow Sample (CIFAR10)

4. AlphaFlow (alpha_flow.py)

Rectified Flow Sample (MNIST) Rectified Flow Sample (CIFAR10)

About

Minimal implementations of several flow-map / average-velocity–type methods.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages