baghishov commited on
Commit
12a47b5
·
verified ·
1 Parent(s): bc0e08f

Add the ResFlow epoch-40 weights, config and model card.

Browse files
Files changed (3) hide show
  1. README.md +117 -0
  2. config.json +360 -0
  3. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: resflow
4
+ datasets:
5
+ - SciLM/SiliciclasticReservoirs
6
+ tags:
7
+ - geology
8
+ - reservoir
9
+ - subsurface
10
+ - 3d
11
+ - flow-matching
12
+ - diffusion-transformer
13
+ - generative
14
+ ---
15
+
16
+ # ResFlow
17
+
18
+ ResFlow generates 3D reservoir facies (sand and mud) with one flow-matching model for eight simulated
19
+ siliciclastic environments: deep-water lobes, a distributary delta, and six fluvial classes. It is conditioned on
20
+ geological parameters and wells, and it generates single 64×64×32 volumes or whole fields of any size in one pass.
21
+ These are the weights of the paper *SiliciclasticReservoirs: A Million-Reservoir Dataset and Flow-Matching
22
+ Foundation Model for 3D Siliciclastic Reservoir Generation* (NeurIPS 2026, Track on Evaluations and Datasets).
23
+
24
+ **Code:** [github.com/SciLM-ai/ResFlow](https://github.com/SciLM-ai/ResFlow) ·
25
+ **Dataset:** [SciLM/SiliciclasticReservoirs](https://huggingface.co/datasets/SciLM/SiliciclasticReservoirs) ·
26
+ **Benchmark:** [ResBench](https://github.com/SciLM-ai/ResBench) ·
27
+ **Simulator:** [ResMill](https://github.com/SciLM-ai/ResMill)
28
+
29
+ ## Quick start
30
+
31
+ ```bash
32
+ pip install git+https://github.com/SciLM-ai/ResFlow
33
+ ```
34
+
35
+ ```python
36
+ import resflow
37
+
38
+ model = resflow.load_pretrained() # this repository
39
+
40
+ vols = model.generate('meander', n=8) # (8, 64, 64, 32) uint8, 1 = sand
41
+ vols = model.generate('lobe', n=4, ntg=0.35, width_cells=30, azimuth=45)
42
+ ens = model.generate('meander', n=32, # every realisation honours the well exactly
43
+ wells=[resflow.Well(x=32, y=32, facies=column)])
44
+ field = model.generate_field('lobe', shape=(512, 512, 32), ntg=0.5)
45
+ ```
46
+
47
+ A walkthrough notebook is in the code repository at `examples/pretrained/quickstart.ipynb`. A GPU is recommended:
48
+ on an NVIDIA GH200 a 64×64×32 volume takes about 1.6 s in batches of 128 and a 512×512×32 field about 4 minutes.
49
+ A CPU works, but takes tens of minutes per volume.
50
+
51
+ ## Inputs
52
+
53
+ | Input | Meaning |
54
+ |---|---|
55
+ | environment | `lobe`, `pv_shoestring`, `cb_labyrinth`, `cb_jigsaw`, `sh_distal`, `sh_proximal`, `meander`, `delta` |
56
+ | `ntg` | sand fraction of the volume (0–1) |
57
+ | `width_cells`, `depth_cells` | characteristic body width and thickness, in cells |
58
+ | `azimuth` | flow direction in degrees, 0 = along +x (default 0) |
59
+ | `asp` | lobe aspect ratio (lobe) |
60
+ | `mCHsinu` | channel sinuosity (channels, delta) |
61
+ | `mFFCHprop` | fraction of abandoned channels plugged with mud (channels, delta) |
62
+ | `probAvulInside` | in-belt avulsion probability (channels, delta) |
63
+ | `trunk_length_fraction` | share of the trunk kept free of bifurcations (delta) |
64
+ | `wells` / `observed` | vertical `Well(x, y, facies)`, or an array of known cells: 1 sand, 0 mud, −1 unknown |
65
+
66
+ Parameters left out take the environment's typical value (the median over its training data), and
67
+ `model.parameters(env)` lists each one with its training range. In `generate_field` any parameter can also be an
68
+ (X, Y) map, so trends can vary across one reservoir. Volumes have axes (x, y, z) with z = 0 at the base; cells are
69
+ 100 m laterally for lobes and 10 m for channels and deltas, and 1 m vertically.
70
+
71
+ ## Model
72
+
73
+ A 32.6M-parameter 3D diffusion transformer (4×4×2 patches, 12 blocks, width 384, 6 heads, QK-norm, 3D rotary
74
+ positions with θ = 100, adaptive layer norm) trained with conditional flow matching. The 18-number condition vector
75
+ holds the environment one-hot, NTG, width, depth, the sine and cosine of the azimuth, and five environment-specific
76
+ parameters; wells enter as two extra input channels. Sampling uses Heun's method with 100 steps and
77
+ classifier-free guidance 3. Volumes use global attention as in training; fields switch to sliding-window attention
78
+ of ±12 tokens per axis, so any extent is generated whole, without tiling.
79
+
80
+ Training used 900,000 volumes of SiliciclasticReservoirs (all eight environments) for 40 epochs on 16 NVIDIA GH200
81
+ GPUs (global batch 512, AdamW, peak learning rate 5.77×10⁻⁴, cosine schedule, about 7.5 hours). These weights are
82
+ the final epoch-40 exponential moving average.
83
+
84
+ ## Evaluation
85
+
86
+ On ResBench, which scores each check against the simulator's own run-to-run variability (1 means
87
+ indistinguishable from the simulator, lower is better), ResFlow scores 2.56 overall: 2.33 on unconditional
88
+ volumes, 3.12 on well-conditioned volumes, and 2.24 on fields. Given the same inputs, it is closer to the simulator
89
+ than GANSim-3D, DiffSIM and a 3D latent diffusion model in every environment where they were compared, and it beats single-environment specialists with its own
90
+ architecture and recipe in six of eight environments. Details are in the paper.
91
+
92
+ ## Limitations
93
+
94
+ - Trained only on simulated reservoirs from the ResMill simulator, and not validated on real subsurface data.
95
+ Forecasting a specific real reservoir needs separate calibration.
96
+ - Covers the eight training environments only; parameter values outside the training ranges are not supported
97
+ (the API warns).
98
+ - Under a fixed input it underestimates the simulator's uncertainty in most channel environments, so its ensembles
99
+ understate uncertainty there.
100
+ - Distal sheets contain isolated sand specks; at field scale, connectivity in shoestring and delta fields deviates
101
+ most from the simulator.
102
+
103
+ ## Citation
104
+
105
+ ```bibtex
106
+ @inproceedings{baghishov2026siliciclastic,
107
+ title = {SiliciclasticReservoirs: A Million-Reservoir Dataset and Flow-Matching Foundation Model
108
+ for 3D Siliciclastic Reservoir Generation},
109
+ author = {Baghishov, Ilgar and Rustamzade, Elnara and Henkelman, Graeme and Foster, John T. and Pyrcz, Michael J.},
110
+ booktitle = {Advances in Neural Information Processing Systems (NeurIPS), Track on Evaluations and Datasets},
111
+ year = {2026}
112
+ }
113
+ ```
114
+
115
+ ## License
116
+
117
+ MIT.
config.json ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "resflow-dit3d",
3
+ "architecture": {
4
+ "in_channels": 3,
5
+ "out_channels": 1,
6
+ "volume_shape": [
7
+ 64,
8
+ 64,
9
+ 32
10
+ ],
11
+ "patch_size": [
12
+ 4,
13
+ 4,
14
+ 2
15
+ ],
16
+ "hidden": 384,
17
+ "depth": 12,
18
+ "num_heads": 6,
19
+ "num_cond": 18,
20
+ "num_time_embs": 1,
21
+ "expand_angle_idx": null,
22
+ "qk_norm": true,
23
+ "conv_io": false,
24
+ "pos_embed": "rope",
25
+ "rope_theta": 100.0,
26
+ "window": null,
27
+ "window_shift": false,
28
+ "token_conv": 0,
29
+ "token_conv_kernel": [
30
+ 3,
31
+ 3,
32
+ 3
33
+ ],
34
+ "attn_mode": "window",
35
+ "attn_radius": [
36
+ 8,
37
+ 8,
38
+ 8
39
+ ]
40
+ },
41
+ "layer_types": [
42
+ "lobe",
43
+ "channel:PV_SHOESTRING",
44
+ "channel:CB_LABYRINTH",
45
+ "channel:CB_JIGSAW",
46
+ "channel:SH_DISTAL",
47
+ "channel:SH_PROXIMAL",
48
+ "channel:MEANDER_OXBOW",
49
+ "delta"
50
+ ],
51
+ "cont_cols": [
52
+ "ntg",
53
+ "width_cells",
54
+ "depth_cells",
55
+ "asp",
56
+ "mCHsinu",
57
+ "mFFCHprop",
58
+ "probAvulInside",
59
+ "trunk_length_fraction"
60
+ ],
61
+ "n_universal": 3,
62
+ "cont_min": [
63
+ 0.05118560791015625,
64
+ 2.404618263244629,
65
+ 3.000000238418579,
66
+ 1.000009536743164,
67
+ 1.0500000715255737,
68
+ 0.0,
69
+ 0.0,
70
+ 0.10000130534172058
71
+ ],
72
+ "cont_max": [
73
+ 0.9156951904296875,
74
+ 79.82032775878906,
75
+ 19.993122100830078,
76
+ 2.499992847442627,
77
+ 1.8499996662139893,
78
+ 0.6999967098236084,
79
+ 0.7999995946884155,
80
+ 0.4999952018260956
81
+ ],
82
+ "env_defaults": {
83
+ "lobe": {
84
+ "ntg": 0.517,
85
+ "width_cells": 46.0001,
86
+ "depth_cells": 12.4999,
87
+ "asp": 1.75
88
+ },
89
+ "channel:PV_SHOESTRING": {
90
+ "ntg": 0.2077,
91
+ "width_cells": 7.5233,
92
+ "depth_cells": 6.9282,
93
+ "mCHsinu": 1.575,
94
+ "mFFCHprop": 0.15,
95
+ "probAvulInside": 0.06
96
+ },
97
+ "channel:CB_LABYRINTH": {
98
+ "ntg": 0.357,
99
+ "width_cells": 10.9679,
100
+ "depth_cells": 6.9282,
101
+ "mCHsinu": 1.275,
102
+ "mFFCHprop": 0.325,
103
+ "probAvulInside": 0.06
104
+ },
105
+ "channel:CB_JIGSAW": {
106
+ "ntg": 0.388,
107
+ "width_cells": 11.6044,
108
+ "depth_cells": 6.9282,
109
+ "mCHsinu": 1.25,
110
+ "mFFCHprop": 0.4,
111
+ "probAvulInside": 0.375
112
+ },
113
+ "channel:SH_DISTAL": {
114
+ "ntg": 0.6356,
115
+ "width_cells": 12.3673,
116
+ "depth_cells": 6.9282,
117
+ "mCHsinu": 1.275,
118
+ "mFFCHprop": 0.1,
119
+ "probAvulInside": 0.06
120
+ },
121
+ "channel:SH_PROXIMAL": {
122
+ "ntg": 0.5099,
123
+ "width_cells": 14.4069,
124
+ "depth_cells": 6.9282,
125
+ "mCHsinu": 1.225,
126
+ "mFFCHprop": 0.225,
127
+ "probAvulInside": 0.35
128
+ },
129
+ "channel:MEANDER_OXBOW": {
130
+ "ntg": 0.494,
131
+ "width_cells": 7.5244,
132
+ "depth_cells": 6.9282,
133
+ "mCHsinu": 1.625,
134
+ "mFFCHprop": 0.0,
135
+ "probAvulInside": 0.0
136
+ },
137
+ "delta": {
138
+ "ntg": 0.1934,
139
+ "width_cells": 10.1923,
140
+ "depth_cells": 6.9282,
141
+ "mCHsinu": 1.075,
142
+ "mFFCHprop": 0.2,
143
+ "probAvulInside": 0.65,
144
+ "trunk_length_fraction": 0.3
145
+ }
146
+ },
147
+ "env_ranges": {
148
+ "lobe": {
149
+ "ntg": [
150
+ 0.0448,
151
+ 0.9392
152
+ ],
153
+ "width_cells": [
154
+ 12.1034,
155
+ 79.9134
156
+ ],
157
+ "depth_cells": [
158
+ 5.0161,
159
+ 19.9931
160
+ ],
161
+ "asp": [
162
+ 1.0,
163
+ 2.5
164
+ ]
165
+ },
166
+ "channel:PV_SHOESTRING": {
167
+ "ntg": [
168
+ 0.0,
169
+ 0.6591
170
+ ],
171
+ "width_cells": [
172
+ 2.4042,
173
+ 22.3059
174
+ ],
175
+ "depth_cells": [
176
+ 3.0,
177
+ 15.9999
178
+ ],
179
+ "mCHsinu": [
180
+ 1.3,
181
+ 1.85
182
+ ],
183
+ "mFFCHprop": [
184
+ 0.0,
185
+ 0.3
186
+ ],
187
+ "probAvulInside": [
188
+ 0.02,
189
+ 0.1
190
+ ]
191
+ },
192
+ "channel:CB_LABYRINTH": {
193
+ "ntg": [
194
+ 0.0,
195
+ 0.9188
196
+ ],
197
+ "width_cells": [
198
+ 3.6057,
199
+ 31.8716
200
+ ],
201
+ "depth_cells": [
202
+ 3.0,
203
+ 15.9999
204
+ ],
205
+ "mCHsinu": [
206
+ 1.1,
207
+ 1.45
208
+ ],
209
+ "mFFCHprop": [
210
+ 0.1,
211
+ 0.55
212
+ ],
213
+ "probAvulInside": [
214
+ 0.02,
215
+ 0.1
216
+ ]
217
+ },
218
+ "channel:CB_JIGSAW": {
219
+ "ntg": [
220
+ 0.0,
221
+ 0.9547
222
+ ],
223
+ "width_cells": [
224
+ 3.6068,
225
+ 35.1057
226
+ ],
227
+ "depth_cells": [
228
+ 3.0,
229
+ 15.9999
230
+ ],
231
+ "mCHsinu": [
232
+ 1.1,
233
+ 1.4
234
+ ],
235
+ "mFFCHprop": [
236
+ 0.1,
237
+ 0.7
238
+ ],
239
+ "probAvulInside": [
240
+ 0.2,
241
+ 0.55
242
+ ]
243
+ },
244
+ "channel:SH_DISTAL": {
245
+ "ntg": [
246
+ 0.0004,
247
+ 0.9996
248
+ ],
249
+ "width_cells": [
250
+ 4.2059,
251
+ 35.0671
252
+ ],
253
+ "depth_cells": [
254
+ 3.0,
255
+ 15.9999
256
+ ],
257
+ "mCHsinu": [
258
+ 1.1,
259
+ 1.45
260
+ ],
261
+ "mFFCHprop": [
262
+ 0.0,
263
+ 0.2
264
+ ],
265
+ "probAvulInside": [
266
+ 0.02,
267
+ 0.1
268
+ ]
269
+ },
270
+ "channel:SH_PROXIMAL": {
271
+ "ntg": [
272
+ 0.0,
273
+ 0.9993
274
+ ],
275
+ "width_cells": [
276
+ 4.8072,
277
+ 41.4372
278
+ ],
279
+ "depth_cells": [
280
+ 3.0,
281
+ 15.9999
282
+ ],
283
+ "mCHsinu": [
284
+ 1.05,
285
+ 1.4
286
+ ],
287
+ "mFFCHprop": [
288
+ 0.05,
289
+ 0.4
290
+ ],
291
+ "probAvulInside": [
292
+ 0.2,
293
+ 0.5
294
+ ]
295
+ },
296
+ "channel:MEANDER_OXBOW": {
297
+ "ntg": [
298
+ 0.0001,
299
+ 0.9756
300
+ ],
301
+ "width_cells": [
302
+ 2.4096,
303
+ 22.3713
304
+ ],
305
+ "depth_cells": [
306
+ 3.0,
307
+ 15.9997
308
+ ],
309
+ "mCHsinu": [
310
+ 1.4,
311
+ 1.85
312
+ ],
313
+ "mFFCHprop": [
314
+ 0.0,
315
+ 0.0
316
+ ],
317
+ "probAvulInside": [
318
+ 0.0,
319
+ 0.0
320
+ ]
321
+ },
322
+ "delta": {
323
+ "ntg": [
324
+ 0.0025,
325
+ 0.8131
326
+ ],
327
+ "width_cells": [
328
+ 3.0148,
329
+ 31.9141
330
+ ],
331
+ "depth_cells": [
332
+ 3.0,
333
+ 15.9999
334
+ ],
335
+ "mCHsinu": [
336
+ 1.05,
337
+ 1.1
338
+ ],
339
+ "mFFCHprop": [
340
+ 0.0,
341
+ 0.4
342
+ ],
343
+ "probAvulInside": [
344
+ 0.5,
345
+ 0.8
346
+ ],
347
+ "trunk_length_fraction": [
348
+ 0.1,
349
+ 0.5
350
+ ]
351
+ }
352
+ },
353
+ "sampler": {
354
+ "solver": "heun",
355
+ "steps": 100,
356
+ "guidance": 3.0,
357
+ "field_radius": 12
358
+ },
359
+ "checkpoint": "inference_epoch040.pt"
360
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95b3d751111999439136950e8ddfcb23baa9e2c4b6356eeb14481f04600a5618
3
+ size 130361036