Instructions to use PositivePassion/openfwi-diffusion-priors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use PositivePassion/openfwi-diffusion-priors with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("PositivePassion/openfwi-diffusion-priors", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("PositivePassion/openfwi-diffusion-priors", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]OpenFWI Diffusion Priors
Pretrained unconditional DDPM priors for six OpenFWI velocity-model families.
Each model contains a single-channel UNet2DModel and a DDPMScheduler in a
Diffusers-compatible directory layout.
Included models
| Directory | OpenFWI family |
|---|---|
FlatFault-A |
FlatFault A |
FlatFault-B |
FlatFault B |
CurveFault-A |
CurveFault A |
CurveFault-B |
CurveFault B |
CurveVel-A |
CurveVel A |
CurveVel-B |
CurveVel B |
The UNets operate on normalized, single-channel 72 x 72 inputs. The inversion
workflow crops the generated result to the 70 x 70 OpenFWI model domain.
Download
python3 -m pip install -U huggingface_hub
hf download PositivePassion/openfwi-diffusion-priors --local-dir models
To download only one family:
hf download PositivePassion/openfwi-diffusion-priors \
--include "CurveFault-A/*" \
--local-dir models
Loading
from diffusers import DDPMScheduler, UNet2DModel
model_dir = "models/CurveFault-A"
unet = UNet2DModel.from_pretrained(model_dir, subfolder="unet")
scheduler = DDPMScheduler.from_pretrained(model_dir, subfolder="scheduler")
See SHA256SUMS for weight-file checksums.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support