Make SAII-CLDM the default pipeline
Browse files- README.md +6 -6
- model_index.json +2 -2
- pipeline.py +2 -2
- pipeline_lddpm.py +3 -0
README.md
CHANGED
|
@@ -26,7 +26,7 @@ Paper: [arXiv:2506.13529](https://arxiv.org/html/2506.13529v1)
|
|
| 26 |
|
| 27 |
## Load From Hugging Face
|
| 28 |
|
| 29 |
-
SAII-
|
| 30 |
|
| 31 |
```python
|
| 32 |
import torch
|
|
@@ -40,20 +40,20 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 40 |
).to("cuda")
|
| 41 |
```
|
| 42 |
|
| 43 |
-
SAII-
|
| 44 |
|
| 45 |
```python
|
| 46 |
pipe = DiffusionPipeline.from_pretrained(
|
| 47 |
"mally-2000/saii-cldm-synthetic",
|
| 48 |
-
custom_pipeline="
|
| 49 |
torch_dtype=torch.float32,
|
| 50 |
trust_remote_code=True,
|
| 51 |
).to("cuda")
|
| 52 |
```
|
| 53 |
|
| 54 |
The inference algorithms are implemented in `codes/pipeline.py`. The root
|
| 55 |
-
`pipeline.py` and `
|
| 56 |
-
Diffusers remote loading.
|
| 57 |
|
| 58 |
## Run The Bundled Demo
|
| 59 |
|
|
@@ -62,8 +62,8 @@ git clone https://huggingface.co/mally-2000/saii-cldm-synthetic
|
|
| 62 |
cd saii-cldm-synthetic
|
| 63 |
pip install -r requirements.txt
|
| 64 |
|
| 65 |
-
python infer.py # SAII-LDDPM
|
| 66 |
python infer.py CLDM # SAII-CLDM
|
|
|
|
| 67 |
```
|
| 68 |
|
| 69 |
`infer.py` uses the bundled Overthrust sample and writes outputs under
|
|
|
|
| 26 |
|
| 27 |
## Load From Hugging Face
|
| 28 |
|
| 29 |
+
Default pipeline: SAII-CLDM.
|
| 30 |
|
| 31 |
```python
|
| 32 |
import torch
|
|
|
|
| 40 |
).to("cuda")
|
| 41 |
```
|
| 42 |
|
| 43 |
+
SAII-LDDPM is also provided as a baseline:
|
| 44 |
|
| 45 |
```python
|
| 46 |
pipe = DiffusionPipeline.from_pretrained(
|
| 47 |
"mally-2000/saii-cldm-synthetic",
|
| 48 |
+
custom_pipeline="pipeline_lddpm",
|
| 49 |
torch_dtype=torch.float32,
|
| 50 |
trust_remote_code=True,
|
| 51 |
).to("cuda")
|
| 52 |
```
|
| 53 |
|
| 54 |
The inference algorithms are implemented in `codes/pipeline.py`. The root
|
| 55 |
+
`pipeline.py`, `pipeline_cldm.py`, and `pipeline_lddpm.py` files are thin entry
|
| 56 |
+
points used by Diffusers remote loading.
|
| 57 |
|
| 58 |
## Run The Bundled Demo
|
| 59 |
|
|
|
|
| 62 |
cd saii-cldm-synthetic
|
| 63 |
pip install -r requirements.txt
|
| 64 |
|
|
|
|
| 65 |
python infer.py CLDM # SAII-CLDM
|
| 66 |
+
python infer.py # SAII-LDDPM baseline
|
| 67 |
```
|
| 68 |
|
| 69 |
`infer.py` uses the bundled Overthrust sample and writes outputs under
|
model_index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.30.3",
|
| 4 |
"condition_encoder": [
|
| 5 |
"seismic_wavelet_encoder",
|
|
@@ -17,4 +17,4 @@
|
|
| 17 |
"diffusers",
|
| 18 |
"VQModel"
|
| 19 |
]
|
| 20 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "SeismicImpInvCLDMPipeline",
|
| 3 |
"_diffusers_version": "0.30.3",
|
| 4 |
"condition_encoder": [
|
| 5 |
"seismic_wavelet_encoder",
|
|
|
|
| 17 |
"diffusers",
|
| 18 |
"VQModel"
|
| 19 |
]
|
| 20 |
+
}
|
pipeline.py
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
from .codes.pipeline import
|
| 2 |
|
| 3 |
-
__all__ = ["
|
|
|
|
| 1 |
+
from .codes.pipeline import SeismicImpInvCLDMPipeline
|
| 2 |
|
| 3 |
+
__all__ = ["SeismicImpInvCLDMPipeline"]
|
pipeline_lddpm.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .codes.pipeline import SeismicImpInvLDDPMPipeline
|
| 2 |
+
|
| 3 |
+
__all__ = ["SeismicImpInvLDDPMPipeline"]
|