Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ of the heat equation, given a pair of previous states.
|
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
-
### How To Load
|
| 35 |
|
| 36 |
PDETransformer can be loaded via
|
| 37 |
|
|
@@ -63,6 +63,25 @@ with torch.no_grad():
|
|
| 63 |
u_t2_pred = pred_all[:, 1] # shape: (B, H, W)
|
| 64 |
print(u_t2_pred.shape)
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
```
|
| 67 |
|
| 68 |
## 📝 Model Description
|
|
|
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
+
### How To Load Model
|
| 35 |
|
| 36 |
PDETransformer can be loaded via
|
| 37 |
|
|
|
|
| 63 |
u_t2_pred = pred_all[:, 1] # shape: (B, H, W)
|
| 64 |
print(u_t2_pred.shape)
|
| 65 |
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### How To Download the Model
|
| 69 |
+
|
| 70 |
+
PDETransformer can be loaded via
|
| 71 |
+
|
| 72 |
+
```python
|
| 73 |
+
from huggingface_hub import hf_hub_download
|
| 74 |
+
import torch
|
| 75 |
+
|
| 76 |
+
ckpt_path = hf_hub_download(
|
| 77 |
+
repo_id="saipuppala/diffusion_transformer ",
|
| 78 |
+
filename="diffusion_finetuned.pth",
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
state_dict = torch.load(ckpt_path, map_location="cpu")
|
| 82 |
+
# then load into a PDETransformer instance as shown above
|
| 83 |
+
|
| 84 |
+
|
| 85 |
```
|
| 86 |
|
| 87 |
## 📝 Model Description
|