├── .gitattributes ├── .gitignore ├── CITATION.cff ├── LICENSE ├── README.md ├── bsi ├── __init__.py ├── bfn.py ├── bsi.py ├── data │ ├── __init__.py │ ├── cifar10.py │ ├── h5image.py │ ├── imagenet.py │ └── sampler.py ├── lightning │ ├── callbacks.py │ ├── plugins.py │ └── strategies.py ├── lr_scheduler.py ├── models │ ├── __init__.py │ ├── dit.py │ ├── mlp.py │ ├── pos_emb.py │ ├── utils.py │ └── vdm_unet.py ├── nn │ ├── __init__.py │ ├── attention.py │ ├── fourier_features.py │ ├── mlp.py │ ├── residual_block.py │ ├── sequential.py │ └── simplified_unet.py ├── tasks │ ├── bfn.py │ ├── bsi.py │ ├── ema_pytorch.py │ ├── metrics │ │ ├── __init__.py │ │ └── fid.py │ ├── plot_utils.py │ └── vdm.py ├── utils │ ├── __init__.py │ ├── exceptions.py │ ├── hydra.py │ ├── logging.py │ ├── path.py │ └── seed.py └── vdm.py ├── config ├── data │ ├── cifar10.yaml │ ├── imagenet.yaml │ ├── imagenet32.yaml │ └── imagenet64.yaml ├── experiment │ ├── cifar10-vdm.yaml │ ├── imagenet32.yaml │ └── imagenet64.yaml ├── hydra │ ├── default.yaml │ └── launcher │ │ └── slurm.yaml ├── mode │ ├── debug.yaml │ ├── interactive.yaml │ └── normal.yaml ├── task │ ├── bfn.yaml │ ├── bfn │ │ └── config.yaml │ ├── bsi.yaml │ ├── bsi │ │ └── config.yaml │ ├── ema │ │ └── ema.yaml │ ├── lr_scheduler │ │ ├── cosine.yaml │ │ └── warmup.yaml │ ├── model │ │ ├── bsi │ │ │ ├── dit.yaml │ │ │ ├── mlp.yaml │ │ │ └── unet.yaml │ │ ├── fourier_features │ │ │ └── fourier.yaml │ │ └── pos_emb │ │ │ └── nyquist.yaml │ ├── optimizer │ │ ├── adam.yaml │ │ └── adamw.yaml │ ├── vdm.yaml │ └── vdm │ │ └── config.yaml └── train.yaml ├── figures ├── algorithm-loss.webp ├── algorithm-sampling.webp ├── animation.webp └── method.webp ├── getting-started.ipynb ├── pixi.lock ├── pyproject.toml ├── scripts ├── compute_fid_stats.py ├── eval_elbo.py ├── eval_fid.py ├── eval_overrides.py ├── generate_sample_history.py ├── generate_samples.py ├── render_samples.py └── sample_h_alpha.py ├── tests ├── conftest.py ├── models │ └── components │ │ └── test_fourier_features.py └── test_bsi.py └── train.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/.gitignore -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/CITATION.cff -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/README.md -------------------------------------------------------------------------------- /bsi/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bsi/bfn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/bfn.py -------------------------------------------------------------------------------- /bsi/bsi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/bsi.py -------------------------------------------------------------------------------- /bsi/data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bsi/data/cifar10.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/data/cifar10.py -------------------------------------------------------------------------------- /bsi/data/h5image.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/data/h5image.py -------------------------------------------------------------------------------- /bsi/data/imagenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/data/imagenet.py -------------------------------------------------------------------------------- /bsi/data/sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/data/sampler.py -------------------------------------------------------------------------------- /bsi/lightning/callbacks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/lightning/callbacks.py -------------------------------------------------------------------------------- /bsi/lightning/plugins.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/lightning/plugins.py -------------------------------------------------------------------------------- /bsi/lightning/strategies.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/lightning/strategies.py -------------------------------------------------------------------------------- /bsi/lr_scheduler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/lr_scheduler.py -------------------------------------------------------------------------------- /bsi/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bsi/models/dit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/models/dit.py -------------------------------------------------------------------------------- /bsi/models/mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/models/mlp.py -------------------------------------------------------------------------------- /bsi/models/pos_emb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/models/pos_emb.py -------------------------------------------------------------------------------- /bsi/models/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/models/utils.py -------------------------------------------------------------------------------- /bsi/models/vdm_unet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/models/vdm_unet.py -------------------------------------------------------------------------------- /bsi/nn/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/__init__.py -------------------------------------------------------------------------------- /bsi/nn/attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/attention.py -------------------------------------------------------------------------------- /bsi/nn/fourier_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/fourier_features.py -------------------------------------------------------------------------------- /bsi/nn/mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/mlp.py -------------------------------------------------------------------------------- /bsi/nn/residual_block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/residual_block.py -------------------------------------------------------------------------------- /bsi/nn/sequential.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/sequential.py -------------------------------------------------------------------------------- /bsi/nn/simplified_unet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/nn/simplified_unet.py -------------------------------------------------------------------------------- /bsi/tasks/bfn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/bfn.py -------------------------------------------------------------------------------- /bsi/tasks/bsi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/bsi.py -------------------------------------------------------------------------------- /bsi/tasks/ema_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/ema_pytorch.py -------------------------------------------------------------------------------- /bsi/tasks/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bsi/tasks/metrics/fid.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/metrics/fid.py -------------------------------------------------------------------------------- /bsi/tasks/plot_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/plot_utils.py -------------------------------------------------------------------------------- /bsi/tasks/vdm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/tasks/vdm.py -------------------------------------------------------------------------------- /bsi/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/__init__.py -------------------------------------------------------------------------------- /bsi/utils/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/exceptions.py -------------------------------------------------------------------------------- /bsi/utils/hydra.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/hydra.py -------------------------------------------------------------------------------- /bsi/utils/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/logging.py -------------------------------------------------------------------------------- /bsi/utils/path.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/path.py -------------------------------------------------------------------------------- /bsi/utils/seed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/utils/seed.py -------------------------------------------------------------------------------- /bsi/vdm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/bsi/vdm.py -------------------------------------------------------------------------------- /config/data/cifar10.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/data/cifar10.yaml -------------------------------------------------------------------------------- /config/data/imagenet.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/data/imagenet.yaml -------------------------------------------------------------------------------- /config/data/imagenet32.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - imagenet 3 | 4 | n: 32 5 | mem_gb: 48 6 | -------------------------------------------------------------------------------- /config/data/imagenet64.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/data/imagenet64.yaml -------------------------------------------------------------------------------- /config/experiment/cifar10-vdm.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/experiment/cifar10-vdm.yaml -------------------------------------------------------------------------------- /config/experiment/imagenet32.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/experiment/imagenet32.yaml -------------------------------------------------------------------------------- /config/experiment/imagenet64.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/experiment/imagenet64.yaml -------------------------------------------------------------------------------- /config/hydra/default.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/hydra/default.yaml -------------------------------------------------------------------------------- /config/hydra/launcher/slurm.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/hydra/launcher/slurm.yaml -------------------------------------------------------------------------------- /config/mode/debug.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/mode/debug.yaml -------------------------------------------------------------------------------- /config/mode/interactive.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | data: 4 | preload: no 5 | -------------------------------------------------------------------------------- /config/mode/normal.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | debug: no 4 | -------------------------------------------------------------------------------- /config/task/bfn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/bfn.yaml -------------------------------------------------------------------------------- /config/task/bfn/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/bfn/config.yaml -------------------------------------------------------------------------------- /config/task/bsi.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/bsi.yaml -------------------------------------------------------------------------------- /config/task/bsi/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/bsi/config.yaml -------------------------------------------------------------------------------- /config/task/ema/ema.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/ema/ema.yaml -------------------------------------------------------------------------------- /config/task/lr_scheduler/cosine.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/lr_scheduler/cosine.yaml -------------------------------------------------------------------------------- /config/task/lr_scheduler/warmup.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/lr_scheduler/warmup.yaml -------------------------------------------------------------------------------- /config/task/model/bsi/dit.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/model/bsi/dit.yaml -------------------------------------------------------------------------------- /config/task/model/bsi/mlp.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/model/bsi/mlp.yaml -------------------------------------------------------------------------------- /config/task/model/bsi/unet.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/model/bsi/unet.yaml -------------------------------------------------------------------------------- /config/task/model/fourier_features/fourier.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/model/fourier_features/fourier.yaml -------------------------------------------------------------------------------- /config/task/model/pos_emb/nyquist.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/model/pos_emb/nyquist.yaml -------------------------------------------------------------------------------- /config/task/optimizer/adam.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/optimizer/adam.yaml -------------------------------------------------------------------------------- /config/task/optimizer/adamw.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/optimizer/adamw.yaml -------------------------------------------------------------------------------- /config/task/vdm.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/vdm.yaml -------------------------------------------------------------------------------- /config/task/vdm/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/task/vdm/config.yaml -------------------------------------------------------------------------------- /config/train.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/config/train.yaml -------------------------------------------------------------------------------- /figures/algorithm-loss.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/figures/algorithm-loss.webp -------------------------------------------------------------------------------- /figures/algorithm-sampling.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/figures/algorithm-sampling.webp -------------------------------------------------------------------------------- /figures/animation.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/figures/animation.webp -------------------------------------------------------------------------------- /figures/method.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/figures/method.webp -------------------------------------------------------------------------------- /getting-started.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/getting-started.ipynb -------------------------------------------------------------------------------- /pixi.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/pixi.lock -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/pyproject.toml -------------------------------------------------------------------------------- /scripts/compute_fid_stats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/compute_fid_stats.py -------------------------------------------------------------------------------- /scripts/eval_elbo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/eval_elbo.py -------------------------------------------------------------------------------- /scripts/eval_fid.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/eval_fid.py -------------------------------------------------------------------------------- /scripts/eval_overrides.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/eval_overrides.py -------------------------------------------------------------------------------- /scripts/generate_sample_history.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/generate_sample_history.py -------------------------------------------------------------------------------- /scripts/generate_samples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/generate_samples.py -------------------------------------------------------------------------------- /scripts/render_samples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/render_samples.py -------------------------------------------------------------------------------- /scripts/sample_h_alpha.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/scripts/sample_h_alpha.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/models/components/test_fourier_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/tests/models/components/test_fourier_features.py -------------------------------------------------------------------------------- /tests/test_bsi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/tests/test_bsi.py -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martenlienen/bsi/HEAD/train.py --------------------------------------------------------------------------------