├── .devcontainer └── devcontainer.json ├── .github └── workflows │ └── publish-to-pypi.yml ├── .gitignore ├── LICENSE ├── README.md ├── assets ├── editing_cat.png ├── flow_in_out.png ├── logo.png ├── logo_header.png ├── logo_new2.png └── rf_toy_illustration.png ├── examples ├── editing_flux_dev.ipynb ├── gauss_analytic_2d_toys.ipynb ├── inference_flux_dev.ipynb ├── interpolation_conversion.ipynb ├── natural_euler_sampler.ipynb ├── samplers_2d_toys.ipynb └── train_2d_toys.ipynb ├── pyproject.toml ├── rectified_flow ├── __init__.py ├── datasets │ ├── coupling_dataset.py │ ├── coupling_dataset_toy.py │ └── toy_gmm.py ├── flow_components │ ├── __init__.py │ ├── interpolation_convertor.py │ ├── interpolation_solver.py │ ├── loss_function.py │ ├── train_time_sampler.py │ └── train_time_weight.py ├── metrics │ ├── __init__.py │ └── clip_score.py ├── models │ ├── __init__.py │ ├── dit.py │ ├── enhanced_mlp.py │ ├── flux_dev.py │ ├── gauss_analytic.py │ ├── kernel_method.py │ ├── lightningdit.py │ ├── lightningdit_utils.py │ ├── toy_mlp.py │ ├── unet.py │ ├── utils.py │ └── vae.py ├── pipelines │ ├── sample_ldit_imagenet256.py │ ├── train_dit_cifar.py │ ├── train_ldit_imagenet256.py │ └── train_unet_cifar.py ├── rectified_flow.py ├── samplers │ ├── __init__.py │ ├── base_sampler.py │ ├── curved_euler_sampler.py │ ├── euler_sampler.py │ ├── noise_refresh_sampler.py │ ├── overshooting_sampler.py │ ├── sde_sampler.py │ └── stochastic_curved_euler_sampler.py └── utils.py ├── requirements.txt ├── scripts ├── evaluate.py ├── train_dit_cifar.sh └── train_unet_cifar.sh └── setup.py /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/.devcontainer/devcontainer.json -------------------------------------------------------------------------------- /.github/workflows/publish-to-pypi.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/.github/workflows/publish-to-pypi.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/README.md -------------------------------------------------------------------------------- /assets/editing_cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/editing_cat.png -------------------------------------------------------------------------------- /assets/flow_in_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/flow_in_out.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/logo.png -------------------------------------------------------------------------------- /assets/logo_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/logo_header.png -------------------------------------------------------------------------------- /assets/logo_new2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/logo_new2.png -------------------------------------------------------------------------------- /assets/rf_toy_illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/assets/rf_toy_illustration.png -------------------------------------------------------------------------------- /examples/editing_flux_dev.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/editing_flux_dev.ipynb -------------------------------------------------------------------------------- /examples/gauss_analytic_2d_toys.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/gauss_analytic_2d_toys.ipynb -------------------------------------------------------------------------------- /examples/inference_flux_dev.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/inference_flux_dev.ipynb -------------------------------------------------------------------------------- /examples/interpolation_conversion.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/interpolation_conversion.ipynb -------------------------------------------------------------------------------- /examples/natural_euler_sampler.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/natural_euler_sampler.ipynb -------------------------------------------------------------------------------- /examples/samplers_2d_toys.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/samplers_2d_toys.ipynb -------------------------------------------------------------------------------- /examples/train_2d_toys.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/examples/train_2d_toys.ipynb -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/pyproject.toml -------------------------------------------------------------------------------- /rectified_flow/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/__init__.py -------------------------------------------------------------------------------- /rectified_flow/datasets/coupling_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/datasets/coupling_dataset.py -------------------------------------------------------------------------------- /rectified_flow/datasets/coupling_dataset_toy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/datasets/coupling_dataset_toy.py -------------------------------------------------------------------------------- /rectified_flow/datasets/toy_gmm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/datasets/toy_gmm.py -------------------------------------------------------------------------------- /rectified_flow/flow_components/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rectified_flow/flow_components/interpolation_convertor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/flow_components/interpolation_convertor.py -------------------------------------------------------------------------------- /rectified_flow/flow_components/interpolation_solver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/flow_components/interpolation_solver.py -------------------------------------------------------------------------------- /rectified_flow/flow_components/loss_function.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/flow_components/loss_function.py -------------------------------------------------------------------------------- /rectified_flow/flow_components/train_time_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/flow_components/train_time_sampler.py -------------------------------------------------------------------------------- /rectified_flow/flow_components/train_time_weight.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/flow_components/train_time_weight.py -------------------------------------------------------------------------------- /rectified_flow/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rectified_flow/metrics/clip_score.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/metrics/clip_score.py -------------------------------------------------------------------------------- /rectified_flow/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rectified_flow/models/dit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/dit.py -------------------------------------------------------------------------------- /rectified_flow/models/enhanced_mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/enhanced_mlp.py -------------------------------------------------------------------------------- /rectified_flow/models/flux_dev.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/flux_dev.py -------------------------------------------------------------------------------- /rectified_flow/models/gauss_analytic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/gauss_analytic.py -------------------------------------------------------------------------------- /rectified_flow/models/kernel_method.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/kernel_method.py -------------------------------------------------------------------------------- /rectified_flow/models/lightningdit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/lightningdit.py -------------------------------------------------------------------------------- /rectified_flow/models/lightningdit_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/lightningdit_utils.py -------------------------------------------------------------------------------- /rectified_flow/models/toy_mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/toy_mlp.py -------------------------------------------------------------------------------- /rectified_flow/models/unet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/unet.py -------------------------------------------------------------------------------- /rectified_flow/models/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/utils.py -------------------------------------------------------------------------------- /rectified_flow/models/vae.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/models/vae.py -------------------------------------------------------------------------------- /rectified_flow/pipelines/sample_ldit_imagenet256.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/pipelines/sample_ldit_imagenet256.py -------------------------------------------------------------------------------- /rectified_flow/pipelines/train_dit_cifar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/pipelines/train_dit_cifar.py -------------------------------------------------------------------------------- /rectified_flow/pipelines/train_ldit_imagenet256.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/pipelines/train_ldit_imagenet256.py -------------------------------------------------------------------------------- /rectified_flow/pipelines/train_unet_cifar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/pipelines/train_unet_cifar.py -------------------------------------------------------------------------------- /rectified_flow/rectified_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/rectified_flow.py -------------------------------------------------------------------------------- /rectified_flow/samplers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/__init__.py -------------------------------------------------------------------------------- /rectified_flow/samplers/base_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/base_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/curved_euler_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/curved_euler_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/euler_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/euler_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/noise_refresh_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/noise_refresh_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/overshooting_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/overshooting_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/sde_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/sde_sampler.py -------------------------------------------------------------------------------- /rectified_flow/samplers/stochastic_curved_euler_sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/samplers/stochastic_curved_euler_sampler.py -------------------------------------------------------------------------------- /rectified_flow/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/rectified_flow/utils.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/scripts/evaluate.py -------------------------------------------------------------------------------- /scripts/train_dit_cifar.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/scripts/train_dit_cifar.sh -------------------------------------------------------------------------------- /scripts/train_unet_cifar.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/scripts/train_unet_cifar.sh -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lqiang67/rectified-flow/HEAD/setup.py --------------------------------------------------------------------------------