Skip to main content

Implementation of Rectified Flows in JAX and Equinox.

Project description

Rectified Flow Matching

Cutting-edge and feature-rich implementation of Rectified Flows from Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flows in jax and equinox.

Features

  • Deterministic and stochastic sampling of the associated ODE and SDE respectively,
  • Mixed precision optimisation,
  • Array-typed to-the-teeth for dependable execution with jaxtyping and beartype.

To implement:

  • Guidance by score of conditioning
  • Mixed precision
  • EMA
  • AdaLayerNorm
  • Stochastic sampling
  • ODE Sampling
  • Likelihoods
  • DiT
  • Hyperparameter/model saving

Usage

pip install rectified_flows
uv run --all-extras python examples/cifar10.py

Your image description

Citations

@misc{liu2022flowstraightfastlearning,
      title={Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow}, 
      author={Xingchao Liu and Chengyue Gong and Qiang Liu},
      year={2022},
      eprint={2209.03003},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2209.03003}, 
}
@misc{lipman2023flowmatchinggenerativemodeling,
    title={Flow Matching for Generative Modeling}, 
    author={Yaron Lipman and Ricky T. Q. Chen and Heli Ben-Hamu and Maximilian Nickel and Matt Le},
    year={2023},
    eprint={2210.02747},
    archivePrefix={arXiv},
    primaryClass={cs.LG},
    url={https://arxiv.org/abs/2210.02747}, 
}
@misc{singh2024stochasticsamplingdeterministicflow,
      title={Stochastic Sampling from Deterministic Flow Models}, 
      author={Saurabh Singh and Ian Fischer},
      year={2024},
      eprint={2410.02217},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2410.02217}, 
}
@misc{yang2024consistencyflowmatchingdefining,
      title={Consistency Flow Matching: Defining Straight Flows with Velocity Consistency}, 
      author={Ling Yang and Zixiang Zhang and Zhilong Zhang and Xingchao Liu and Minkai Xu and Wentao Zhang and Chenlin Meng and Stefano Ermon and Bin Cui},
      year={2024},
      eprint={2407.02398},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2407.02398}, 
}
@misc{peebles2023scalablediffusionmodelstransformers,
      title={Scalable Diffusion Models with Transformers}, 
      author={William Peebles and Saining Xie},
      year={2023},
      eprint={2212.09748},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2212.09748}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rectified_flows-0.0.16.tar.gz (9.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rectified_flows-0.0.16-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file rectified_flows-0.0.16.tar.gz.

File metadata

  • Download URL: rectified_flows-0.0.16.tar.gz
  • Upload date:
  • Size: 9.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.19

File hashes

Hashes for rectified_flows-0.0.16.tar.gz
Algorithm Hash digest
SHA256 8d1735bac9f3fe310cc7a37c998246ff0c881a54b9d7c30b9ff73cc57f20fa05
MD5 9013395f9a55443328bf69393ad2ab22
BLAKE2b-256 5cf7bc82fb4dc512bee42d5fa7b50de191b3bb1cee330869a4c53b809d9eaadc

See more details on using hashes here.

File details

Details for the file rectified_flows-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for rectified_flows-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 8ff0812b1cc0db2cfc10712011cd02652eef5e4462102e4f37835872e5891fca
MD5 677dd93dba8532e63b258d7d3bf703f2
BLAKE2b-256 132f310572fdafcb942092c3be8893ebdfc604ef34f259fa886d6b32b3088888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page