--- library_name: phase license: mit pipeline_tag: image-to-image tags: - magnetohydrodynamics - neural-operator - diffusion - physics-informed-machine-learning --- # PHASE Kelvin-Helmholtz MR Multi-regime PHASE model for the 2-D incompressible MHD Kelvin-Helmholtz instability on t=[0,5], with gated Re/Rm adapters and residual diffusion. - **Channels:** [ux, uy, Bx, By] - **Reynolds numbers:** Re=Rm in {80, 200, 400, 650, 1000, 1500, 2050, 2750, 3600, 4500} - **Conditioner:** `conditioner/model.safetensors` - **Diffusion model:** `diffusion/model.safetensors` - **Normalization:** `normalization/` ## POSEIDON dependency ```bash git clone https://github.com/camlab-ethz/poseidon.git external/poseidon git -C external/poseidon checkout b8fa28f59bd7f7673323f28d11a12c6f3a215c61 pip install --no-deps -e external/poseidon ``` ## Load ```python import torch from phase import PHASEPipeline model = PHASEPipeline.from_pretrained( "phaseMHD/PHASE-KH-MR", device="cuda" if torch.cuda.is_available() else "cpu", ) # Physical initial condition: [batch, channels, x, y] # The KH model was trained on 101 frames from t=0 to t=5. times = torch.linspace(0.0, 5.0, 101, device=model.device) prediction = model.predict(initial_fields, times, re=1000, seed=0) # prediction: [batch, channels, time, x, y] ``` Install the runtime from [PHASE](https://github.com/PHASE-MHD/PHASE): ```bash pip install "phase[hub,dino,scot] @ git+https://github.com/PHASE-MHD/PHASE.git" ``` The package contains model-only weights, exact inference configs, and training-derived normalization statistics. See `pipeline.yaml` and `provenance.json` for the artifact mapping.