EngEmmanuel commited on
Commit
f4cfb8d
·
0 Parent(s):

Initial commit

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - video-generation
5
+ - flow-matching
6
+ - echocardiography
7
+ - medical-imaging
8
+ pipeline_tag: other
9
+ ---
10
+
11
+ # EchoLVFM — Weights
12
+
13
+ One-step latent video flow matching for echocardiogram synthesis.
14
+
15
+ - Paper: [arXiv:2603.13967](https://arxiv.org/abs/2603.13967)
16
+ - Code: https://github.com/EngEmmanuel/EchoLVFM
17
+
18
+ This repo holds **weights only**. The training + inference code lives in the
19
+ `EchoLVFM` code repository. You need both to run the model.
20
+
21
+ ## Contents
22
+
23
+ Three independent checkpoints, each in its own subfolder:
24
+
25
+ | Subfolder | Flow | Inference | Notes |
26
+ |-----------|------|-----------|-------|
27
+ | `echolvfm_h1/` | RMMFlow | one-step | Adaptive-weighting exponent `h=1` in the training loss |
28
+ | `echolvfm_h2/` | RMMFlow | one-step | Adaptive-weighting exponent `h=2` in the training loss |
29
+ | `linear/` | LinearFlow | multi-step ODE | Baseline for comparison |
30
+
31
+ `h` is a **loss hyperparameter** (the exponent of the adaptive-weighting
32
+ term), not a step count. Both RMMFlow variants are one-step generators —
33
+ that's the defining property of RMMFlow.
34
+
35
+ Each subfolder contains:
36
+ - `model.safetensors` — the flow-level state dict (~293 MB).
37
+ - `config.yaml` — minimal config to rebuild the UNet3D + flow wrapper.
38
+
39
+ Subfolders load **independently**: a single call only downloads the
40
+ requested variant's files (~293 MB), not the whole repo.
41
+
42
+ ## Loading
43
+
44
+ ```python
45
+ from utils.hub import load_model_from_hub
46
+
47
+ flow = load_model_from_hub(
48
+ "EngEmmanuel/EchoLVFM-Weights",
49
+ subfolder="echolvfm_h2",
50
+ device="cuda",
51
+ )
52
+ ```
53
+
54
+ You also need the paired VAE (`HReynaud/EchoFlow`, subfolder `vae`); see
55
+ `vae/util.py::load_vae_and_processor` in the code repo.
56
+
57
+ ## Training data
58
+
59
+ The underlying models were trained on VAE-encoded latents of the public
60
+ [CAMUS](https://www.creatis.insa-lyon.fr/Challenge/camus/) dataset. Please
61
+ respect the CAMUS dataset's license and citation requirements when using
62
+ these weights.
63
+
64
+ ## Citation
65
+
66
+ If you use EchoLVFM, please cite the paper:
67
+
68
+ ```bibtex
69
+ @article{echolvfm2026,
70
+ title = {EchoLVFM: One-Step Video Generation via Latent Flow Matching for Echocardiogram Synthesis},
71
+ author = {Oladokun, Emmanuel and others},
72
+ journal = {arXiv preprint arXiv:2603.13967},
73
+ year = {2026}
74
+ }
75
+ ```
echolvfm_h1/config.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ type: unet
3
+ kwargs:
4
+ down_block_types:
5
+ - CrossAttnDownBlockSpatioTemporal
6
+ - CrossAttnDownBlockSpatioTemporal
7
+ - CrossAttnDownBlockSpatioTemporal
8
+ - CrossAttnDownBlockSpatioTemporal
9
+ up_block_types:
10
+ - UpBlockSpatioTemporal
11
+ - UpBlockSpatioTemporal
12
+ - UpBlockSpatioTemporal
13
+ - CrossAttnUpBlockSpatioTemporal
14
+ block_out_channels:
15
+ - 128
16
+ - 128
17
+ - 256
18
+ - 256
19
+ num_attention_heads:
20
+ - 4
21
+ - 4
22
+ - 8
23
+ - 8
24
+ cross_attention_dim: 1
25
+ layers_per_block: 2
26
+ transformer_layers_per_block:
27
+ - 1
28
+ - 1
29
+ - 2
30
+ - 2
31
+ init:
32
+ sample_size: 28
33
+ in_channels: 9
34
+ out_channels: 4
35
+ num_frames: 32
36
+ flow:
37
+ type: mean
38
+ kwargs:
39
+ add_recon_loss: true
40
+ recon_loss_weight: 1.0
41
+ prob_default_flow_obj: 0.75
42
+ adaptive_loss_weight_p: 1
43
+ use_jvp_flash_attn: true
44
+ sample_kwargs:
45
+ steps: 1
echolvfm_h1/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:712a4ef12b0572aadfc4223d034a918289fb6bc4f64b7d7be9a930d8372ef3b8
3
+ size 307285088
echolvfm_h2/config.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ type: unet
3
+ kwargs:
4
+ down_block_types:
5
+ - CrossAttnDownBlockSpatioTemporal
6
+ - CrossAttnDownBlockSpatioTemporal
7
+ - CrossAttnDownBlockSpatioTemporal
8
+ - CrossAttnDownBlockSpatioTemporal
9
+ up_block_types:
10
+ - UpBlockSpatioTemporal
11
+ - UpBlockSpatioTemporal
12
+ - UpBlockSpatioTemporal
13
+ - CrossAttnUpBlockSpatioTemporal
14
+ block_out_channels:
15
+ - 128
16
+ - 128
17
+ - 256
18
+ - 256
19
+ num_attention_heads:
20
+ - 4
21
+ - 4
22
+ - 8
23
+ - 8
24
+ cross_attention_dim: 1
25
+ layers_per_block: 2
26
+ transformer_layers_per_block:
27
+ - 1
28
+ - 1
29
+ - 2
30
+ - 2
31
+ init:
32
+ sample_size: 28
33
+ in_channels: 9
34
+ out_channels: 4
35
+ num_frames: 32
36
+ flow:
37
+ type: mean
38
+ kwargs:
39
+ add_recon_loss: true
40
+ recon_loss_weight: 1.0
41
+ prob_default_flow_obj: 0.75
42
+ adaptive_loss_weight_p: 0.5
43
+ use_jvp_flash_attn: true
44
+ sample_kwargs:
45
+ steps: 1
echolvfm_h2/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ae294d97075765376afcf4b283f00c84de556ed715a2df9ddf62a895de01d38
3
+ size 307285088
linear/config.yaml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ type: unet
3
+ kwargs:
4
+ down_block_types:
5
+ - CrossAttnDownBlockSpatioTemporal
6
+ - CrossAttnDownBlockSpatioTemporal
7
+ - CrossAttnDownBlockSpatioTemporal
8
+ - CrossAttnDownBlockSpatioTemporal
9
+ up_block_types:
10
+ - UpBlockSpatioTemporal
11
+ - UpBlockSpatioTemporal
12
+ - UpBlockSpatioTemporal
13
+ - CrossAttnUpBlockSpatioTemporal
14
+ block_out_channels:
15
+ - 128
16
+ - 128
17
+ - 256
18
+ - 256
19
+ num_attention_heads:
20
+ - 4
21
+ - 4
22
+ - 8
23
+ - 8
24
+ cross_attention_dim: 1
25
+ layers_per_block: 2
26
+ transformer_layers_per_block:
27
+ - 1
28
+ - 1
29
+ - 2
30
+ - 2
31
+ init:
32
+ sample_size: 28
33
+ in_channels: 9
34
+ out_channels: 4
35
+ num_frames: 32
36
+ flow:
37
+ type: linear
38
+ kwargs:
39
+ clip_values: null
40
+ clip_flow_values: null
41
+ sample_kwargs:
42
+ steps: 24
linear/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b84157df655090eddc491dd5dbf3b432ff207d7ae2f6c220ae0b13cc5a048344
3
+ size 307285088