Image-to-Image
Transformers
PyTorch
swinv2
physics
pde
neural-operator
cfd
fluid-dynamics
poseidon
scOT
Instructions to use empirischtech/poseidon-b-joint-cyl-kh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use empirischtech/poseidon-b-joint-cyl-kh with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-to-image", model="empirischtech/poseidon-b-joint-cyl-kh")# Load model directly from transformers import AutoImageProcessor, ScOT processor = AutoImageProcessor.from_pretrained("empirischtech/poseidon-b-joint-cyl-kh") model = ScOT.from_pretrained("empirischtech/poseidon-b-joint-cyl-kh", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +1 -1
- config.json +61 -0
- norm_stats_used.json +98 -0
- pytorch_model.bin +3 -0
README.md
CHANGED
|
@@ -132,7 +132,7 @@ import numpy as np
|
|
| 132 |
import torch
|
| 133 |
from scOT.model import ScOT # from the Poseidon / scOT codebase
|
| 134 |
|
| 135 |
-
model = ScOT.from_pretrained("
|
| 136 |
|
| 137 |
# Cylinder channel statistics used at training time (from norm_stats_used.json).
|
| 138 |
# Channels are (rho, u, v, p). For the cylinder regime rho encodes the body: 1=fluid, 0=solid.
|
|
|
|
| 132 |
import torch
|
| 133 |
from scOT.model import ScOT # from the Poseidon / scOT codebase
|
| 134 |
|
| 135 |
+
model = ScOT.from_pretrained("rwmasood/poseidon-b-joint-cyl-kh").eval().cuda()
|
| 136 |
|
| 137 |
# Cylinder channel statistics used at training time (from norm_stats_used.json).
|
| 138 |
# Channels are (rho, u, v, p). For the cylinder regime rho encodes the body: 1=fluid, 0=solid.
|
config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "./Poseidon-B",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"ScOT"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"channel_slice_list_normalized_loss": [
|
| 8 |
+
0,
|
| 9 |
+
1,
|
| 10 |
+
3,
|
| 11 |
+
4
|
| 12 |
+
],
|
| 13 |
+
"depths": [
|
| 14 |
+
8,
|
| 15 |
+
8,
|
| 16 |
+
8,
|
| 17 |
+
8
|
| 18 |
+
],
|
| 19 |
+
"drop_path_rate": 0.0,
|
| 20 |
+
"embed_dim": 96,
|
| 21 |
+
"encoder_stride": 32,
|
| 22 |
+
"hidden_act": "gelu",
|
| 23 |
+
"hidden_dropout_prob": 0.0,
|
| 24 |
+
"hidden_size": 768,
|
| 25 |
+
"image_size": 128,
|
| 26 |
+
"initializer_range": 0.02,
|
| 27 |
+
"layer_norm_eps": 1e-05,
|
| 28 |
+
"learn_residual": false,
|
| 29 |
+
"mlp_ratio": 4.0,
|
| 30 |
+
"model_type": "swinv2",
|
| 31 |
+
"num_channels": 4,
|
| 32 |
+
"num_heads": [
|
| 33 |
+
3,
|
| 34 |
+
6,
|
| 35 |
+
12,
|
| 36 |
+
24
|
| 37 |
+
],
|
| 38 |
+
"num_layers": 4,
|
| 39 |
+
"num_out_channels": 4,
|
| 40 |
+
"p": 1,
|
| 41 |
+
"patch_size": 4,
|
| 42 |
+
"pretrained_window_sizes": [
|
| 43 |
+
0,
|
| 44 |
+
0,
|
| 45 |
+
0,
|
| 46 |
+
0
|
| 47 |
+
],
|
| 48 |
+
"qkv_bias": true,
|
| 49 |
+
"residual_model": "convnext",
|
| 50 |
+
"skip_connections": [
|
| 51 |
+
2,
|
| 52 |
+
2,
|
| 53 |
+
2,
|
| 54 |
+
0
|
| 55 |
+
],
|
| 56 |
+
"torch_dtype": "float32",
|
| 57 |
+
"transformers_version": "4.29.2",
|
| 58 |
+
"use_absolute_embeddings": false,
|
| 59 |
+
"use_conditioning": true,
|
| 60 |
+
"window_size": 16
|
| 61 |
+
}
|
norm_stats_used.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cyl": {
|
| 3 |
+
"mean": [
|
| 4 |
+
0.992431640625,
|
| 5 |
+
0.9874249696731567,
|
| 6 |
+
-6.629727431572974e-05,
|
| 7 |
+
0.9546216726303101
|
| 8 |
+
],
|
| 9 |
+
"std": [
|
| 10 |
+
0.08666647970676422,
|
| 11 |
+
0.1872677057981491,
|
| 12 |
+
0.15668894350528717,
|
| 13 |
+
0.11970974504947662
|
| 14 |
+
],
|
| 15 |
+
"channels": [
|
| 16 |
+
"rho",
|
| 17 |
+
"u",
|
| 18 |
+
"v",
|
| 19 |
+
"p"
|
| 20 |
+
],
|
| 21 |
+
"skip_norm_idx": [],
|
| 22 |
+
"n_traj": 150,
|
| 23 |
+
"n_frames": 21,
|
| 24 |
+
"orig_frames": 41
|
| 25 |
+
},
|
| 26 |
+
"khc": {
|
| 27 |
+
"mean": [
|
| 28 |
+
1.4987393617630005,
|
| 29 |
+
0.15815676748752594,
|
| 30 |
+
-0.00015812707715667784,
|
| 31 |
+
11.184250831604004
|
| 32 |
+
],
|
| 33 |
+
"std": [
|
| 34 |
+
0.32741427421569824,
|
| 35 |
+
0.6542320847511292,
|
| 36 |
+
0.4637199640274048,
|
| 37 |
+
3.0745689868927
|
| 38 |
+
],
|
| 39 |
+
"channels": [
|
| 40 |
+
"rho",
|
| 41 |
+
"u",
|
| 42 |
+
"v",
|
| 43 |
+
"p"
|
| 44 |
+
],
|
| 45 |
+
"skip_norm_idx": [],
|
| 46 |
+
"n_traj": 50,
|
| 47 |
+
"n_frames": 21,
|
| 48 |
+
"orig_frames": 101
|
| 49 |
+
},
|
| 50 |
+
"ce": {
|
| 51 |
+
"mean": [
|
| 52 |
+
0.9999996423721313,
|
| 53 |
+
-0.0008015281637199223,
|
| 54 |
+
0.00048404993140138686,
|
| 55 |
+
2.5128931999206543
|
| 56 |
+
],
|
| 57 |
+
"std": [
|
| 58 |
+
0.11943192034959793,
|
| 59 |
+
0.5920301675796509,
|
| 60 |
+
0.5820828676223755,
|
| 61 |
+
0.41735371947288513
|
| 62 |
+
],
|
| 63 |
+
"channels": [
|
| 64 |
+
"c0",
|
| 65 |
+
"c1",
|
| 66 |
+
"c2",
|
| 67 |
+
"c3"
|
| 68 |
+
],
|
| 69 |
+
"skip_norm_idx": [],
|
| 70 |
+
"n_traj": 40,
|
| 71 |
+
"n_frames": 21,
|
| 72 |
+
"orig_frames": 21
|
| 73 |
+
},
|
| 74 |
+
"rp": {
|
| 75 |
+
"mean": [
|
| 76 |
+
1.245023488998413,
|
| 77 |
+
0.01646868698298931,
|
| 78 |
+
-0.021590501070022583,
|
| 79 |
+
0.21582767367362976
|
| 80 |
+
],
|
| 81 |
+
"std": [
|
| 82 |
+
0.5487759709358215,
|
| 83 |
+
0.26278048753738403,
|
| 84 |
+
0.25374552607536316,
|
| 85 |
+
0.12050643563270569
|
| 86 |
+
],
|
| 87 |
+
"channels": [
|
| 88 |
+
"c0",
|
| 89 |
+
"c1",
|
| 90 |
+
"c2",
|
| 91 |
+
"c3"
|
| 92 |
+
],
|
| 93 |
+
"skip_norm_idx": [],
|
| 94 |
+
"n_traj": 40,
|
| 95 |
+
"n_frames": 21,
|
| 96 |
+
"orig_frames": 21
|
| 97 |
+
}
|
| 98 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cae4afa2985ccb19a3e0519af70ec700f387205d70b959f537561df6807133c5
|
| 3 |
+
size 631472919
|