Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e515ab9
Add prototype of multimodal configuration
amorehead Sep 17, 2025
16dc80e
Share Transformer encoder across all modalities
amorehead Sep 18, 2025
c622a55
Add 2D multimodal flow matching example notebook, and remove unused i…
amorehead Sep 18, 2025
f71b2b1
Clean up multimodal.py
amorehead Sep 18, 2025
c313c43
Finish documenting new example
amorehead Sep 18, 2025
ac94c2a
Run linter for multimodal.py
amorehead Sep 19, 2025
be86f36
Add files via upload
amorehead Sep 23, 2025
dbcb9cf
Begin creating robust multimodal flow with integrated sampling support
amorehead Sep 23, 2025
e5d6c49
Add new example for multimodality
amorehead Sep 23, 2025
32d505e
Revise multimodal_solver.py according to discrete_solver.py
amorehead Sep 24, 2025
cf05187
Fix variable references
amorehead Sep 24, 2025
72f6745
Finish updating example for multimodal model
amorehead Sep 24, 2025
9a6b7f0
Merge pull request #1 from amorehead/mm-integrated
amorehead Sep 24, 2025
f5bcf0e
Update multimodal example image
amorehead Sep 24, 2025
70e0696
Update docs
amorehead Sep 24, 2025
8f04e24
Document Flow class
amorehead Sep 24, 2025
cc80d1f
Add unit test for MultimodalSolver
amorehead Sep 24, 2025
675f9e1
Add unit test for multimodal Flow class
amorehead Sep 24, 2025
05a2352
Add back ModelWrapper docs
amorehead Sep 24, 2025
714c3c8
Add support for custom loss weights
amorehead Sep 24, 2025
34540e0
Return unaggregated losses within loss_dict
amorehead Sep 24, 2025
095dc80
Update docstring
amorehead Sep 24, 2025
5531d42
Weight losses in loss_dict
amorehead Sep 24, 2025
8243fba
Add logits argument to training_loss()
amorehead Sep 25, 2025
bed9ec6
Clarify types
amorehead Sep 26, 2025
2e96a1b
Revert "Clarify types"
amorehead Sep 26, 2025
d63e655
Handle tuple x_init inputs for sample()
amorehead Sep 26, 2025
3ce9789
Make variable name more informative; fix unit test; make t reshaping …
amorehead Sep 27, 2025
b03325e
Add x_1_prediction flag to support x_1 parametrization for continuous…
amorehead Sep 28, 2025
3ef3cba
Use t_expanded for x_1 prediction
amorehead Sep 28, 2025
fa0dc39
Add import
amorehead Sep 28, 2025
2bf97e0
Resolve circular import
amorehead Oct 1, 2025
a7bbdb2
Merge branch 'facebookresearch:main' into mm
amorehead Oct 1, 2025
c5a5a93
Allow custom time_grids
amorehead Oct 1, 2025
f3238d2
Merge branch 'mm' of https://github.com/amorehead/flow_matching into mm
amorehead Oct 1, 2025
7f4e569
Add verbose flag
amorehead Oct 1, 2025
4a16e2b
Allow one to customize model forward function for multimodal solver
amorehead Oct 1, 2025
81ac9d2
Fix unit tests
amorehead Oct 1, 2025
6334c4c
Add optional jump_coefficient argument to MixturePathGeneralizedKL.fo…
amorehead Oct 8, 2025
628c2bc
Fix raises syntax
amorehead Oct 8, 2025
13ad9a7
Simplify syntax
amorehead Oct 8, 2025
7076137
Update 2d_discrete_flow_matching.ipynb
amorehead Oct 8, 2025
21d08aa
Update 2d_flow_matching.ipynb
amorehead Oct 8, 2025
ffb6ac2
Update 2d_riemannian_flow_matching_flat_torus.ipynb
amorehead Oct 8, 2025
6f6d117
Update 2d_riemannian_flow_matching_sphere.ipynb
amorehead Oct 8, 2025
4d15d8d
Update generalized_loss.py
amorehead Oct 8, 2025
4576550
Use expand_tensor_like utility function
amorehead Oct 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pip install -e .

#### I want to train a Flow Matching model, where can I find the training code?

We provide [training examples](examples). Under this folder, you can find synthetic data for [continuous](examples/2d_flow_matching.ipynb), [discrete](examples/2d_discrete_flow_matching.ipynb), and [Riemannian](examples/2d_riemannian_flow_matching_flat_torus.ipynb) Flow Matching. We also provide full training [examples](examples/image) (continuous and discrete) on CIFAR10 and face-blurred ImageNet, and a scalable discrete Flow Matching example for [text modeling](examples/text).
We provide [training examples](examples). Under this folder, you can find synthetic data for [continuous](examples/2d_flow_matching.ipynb), [discrete](examples/2d_discrete_flow_matching.ipynb), [multimodal](examples/2d_multimodal_flow_matching.ipynb), and [Riemannian](examples/2d_riemannian_flow_matching_flat_torus.ipynb) Flow Matching. We also provide full training [examples](examples/image) (continuous and discrete) on CIFAR10 and face-blurred ImageNet, and a scalable discrete Flow Matching example for [text modeling](examples/text).

#### Do you release pre-trained models?

Expand Down
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
links:
mkdir -p source/notebooks && ln -sfn $(ROOT_DIR)/../examples/standalone_flow_matching.ipynb source/notebooks/standalone_flow_matching.ipynb
mkdir -p source/notebooks && ln -sfn $(ROOT_DIR)/../examples/2d_discrete_flow_matching.ipynb source/notebooks/2d_discrete_flow_matching.ipynb
mkdir -p source/notebooks && ln -sfn $(ROOT_DIR)/../examples/2d_multimodal_flow_matching.ipynb source/notebooks/2d_multimodal_flow_matching.ipynb
mkdir -p source/notebooks && ln -sfn $(ROOT_DIR)/../examples/2d_riemannian_flow_matching_flat_torus.ipynb source/notebooks/2d_riemannian_flow_matching_flat_torus.ipynb
mkdir -p source/notebooks && ln -sfn $(ROOT_DIR)/../examples/2d_riemannian_flow_matching_sphere.ipynb source/notebooks/2d_riemannian_flow_matching_sphere.ipynb
ln -sfn $(ROOT_DIR)/../assets/teaser.png source/_images/teaser.png
Expand Down
Binary file added docs/source/_images/multimodal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/dummy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

notebooks/standalone_flow_matching
notebooks/2d_discrete_flow_matching
notebooks/2d_multimodal_flow_matching
notebooks/2d_riemannian_flow_matching_flat_torus
notebooks/2d_riemannian_flow_matching_sphere
1 change: 1 addition & 0 deletions docs/source/flow_matching.solver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Solvers
Solver
ODESolver
MixtureDiscreteEulerSolver
MultimodalSolver
RiemannianODESolver

18 changes: 18 additions & 0 deletions docs/source/flow_matching.utils.multimodal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
``flow_matching.utils.multimodal``
=============================

.. currentmodule:: flow_matching.utils.multimodal


Flow
--------------------------------

Generic multimodal flow class

.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst

Flow

1 change: 1 addition & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ API Reference
flow_matching.solver
flow_matching.utils.model_wrapper
flow_matching.utils.manifolds
flow_matching.utils.multimodal
6 changes: 6 additions & 0 deletions docs/source/notebooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ Notebooks
:image: _static/riemannian_torus.png
:link: notebooks/2d_riemannian_flow_matching_flat_torus.html

.. customcarditem::
:header: Multimodal Flow Matching
:card_description: Train and sample from a 2D Multimodal Flow Matching model.
:image: _static/multimodal.png
:link: notebooks/2d_multimodal_flow_matching.html

.. customcardend::
Loading