First commit
Browse files- README.md +46 -1
- pbr/config.json +113 -0
- pbr/pbr_adapter.safetensors +3 -0
- pipeline.json +14 -0
- shape/config.json +113 -0
- shape/shape_adapter.safetensors +3 -0
README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: microsoft/TRELLIS.2-4B
|
| 3 |
+
base_model_relation: adapter
|
| 4 |
+
tags:
|
| 5 |
+
- 3d
|
| 6 |
+
- super-resolution
|
| 7 |
+
- plsr
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# PLSR Models
|
| 11 |
+
|
| 12 |
+
PLSR progressively refines the geometry and PBR materials of coarse 3D objects
|
| 13 |
+
using reference images. This repository contains two models built on TRELLIS.2:
|
| 14 |
+
|
| 15 |
+
| Model | Purpose | Weights |
|
| 16 |
+
| --- | --- | --- |
|
| 17 |
+
| Shape | Geometry super-resolution | `shape/shape_adapter.safetensors` |
|
| 18 |
+
| PBR | Material super-resolution | `pbr/pbr_adapter.safetensors` |
|
| 19 |
+
|
| 20 |
+
Each weight file contains the trained LoRA and PLSR extension parameters.
|
| 21 |
+
The corresponding `shape/config.json` and `pbr/config.json` define the model
|
| 22 |
+
architecture and inference parameters. `pipeline.json` specifies the component
|
| 23 |
+
paths and their TRELLIS.2 base weights.
|
| 24 |
+
|
| 25 |
+
The PLSR pipeline loads the TRELLIS.2 base weights, then applies these adapters.
|
| 26 |
+
TRELLIS.2 and DINOv3 are loaded from their own repositories.
|
| 27 |
+
|
| 28 |
+
## Load from local directories
|
| 29 |
+
|
| 30 |
+
Install the PLSR inference code and its dependencies, then download this model
|
| 31 |
+
repository and the TRELLIS.2 and DINOv3 repositories. Use their local directories:
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from plsr import PLSRPipeline
|
| 35 |
+
|
| 36 |
+
pipeline = PLSRPipeline.from_pretrained(
|
| 37 |
+
"/path/to/PLSR_release",
|
| 38 |
+
trellis2_repo_id="/path/to/TRELLIS.2-4B",
|
| 39 |
+
dino_repo_id="/path/to/dinov3-vitl16-pretrain-lvd1689m",
|
| 40 |
+
)
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Each path points to the root of a downloaded Hugging Face repository.
|
| 44 |
+
The TRELLIS.2 and DINOv3 arguments also accept Hugging Face repo IDs:
|
| 45 |
+
`microsoft/TRELLIS.2-4B` and `facebook/dinov3-vitl16-pretrain-lvd1689m`.
|
| 46 |
+
|
| 47 |
+
For installation instructions and inference examples, see the
|
| 48 |
+
[PLSR code repository](https://github.com/LIU-Yuxin/PLSR).
|
pbr/config.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "PLSRFlowModel",
|
| 3 |
+
"args": {
|
| 4 |
+
"resolution": 32,
|
| 5 |
+
"in_channels": 64,
|
| 6 |
+
"out_channels": 32,
|
| 7 |
+
"model_channels": 1536,
|
| 8 |
+
"cond_channels": 1024,
|
| 9 |
+
"num_blocks": 30,
|
| 10 |
+
"num_heads": 12,
|
| 11 |
+
"mlp_ratio": 5.3334,
|
| 12 |
+
"pe_mode": "rope",
|
| 13 |
+
"share_mod": true,
|
| 14 |
+
"qk_rms_norm": true,
|
| 15 |
+
"qk_rms_norm_cross": true,
|
| 16 |
+
"dtype": "float16",
|
| 17 |
+
"lr_channels": 1024,
|
| 18 |
+
"lr_noise_level_mod": true,
|
| 19 |
+
"lr_conv_ch_factor": 0.5,
|
| 20 |
+
"lr_use_conv": true,
|
| 21 |
+
"lr_injection": true,
|
| 22 |
+
"gate_cross_attn": true,
|
| 23 |
+
"fuse_mode": "cross",
|
| 24 |
+
"local_attn_configs": {
|
| 25 |
+
"n_blocks_per_lr_cross": 4,
|
| 26 |
+
"local_attn_radius": 3,
|
| 27 |
+
"local_attn_knn": 16,
|
| 28 |
+
"local_attn_falloff_mode": "cosine"
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"peft_cfg": {
|
| 32 |
+
"target_modules": "all-linear",
|
| 33 |
+
"exclude_modules": [
|
| 34 |
+
"lr",
|
| 35 |
+
"local_attn_module",
|
| 36 |
+
"local_mha",
|
| 37 |
+
"cross_gate_mlp"
|
| 38 |
+
],
|
| 39 |
+
"r": 64,
|
| 40 |
+
"lora_alpha": 64
|
| 41 |
+
},
|
| 42 |
+
"normalization": {
|
| 43 |
+
"mean": [
|
| 44 |
+
3.501659,
|
| 45 |
+
2.212398,
|
| 46 |
+
2.226094,
|
| 47 |
+
0.251093,
|
| 48 |
+
-0.026248,
|
| 49 |
+
-0.687364,
|
| 50 |
+
0.439898,
|
| 51 |
+
-0.928075,
|
| 52 |
+
0.029398,
|
| 53 |
+
-0.339596,
|
| 54 |
+
-0.869527,
|
| 55 |
+
1.038479,
|
| 56 |
+
-0.972385,
|
| 57 |
+
0.126042,
|
| 58 |
+
-1.129303,
|
| 59 |
+
0.455149,
|
| 60 |
+
-1.209521,
|
| 61 |
+
2.069067,
|
| 62 |
+
0.544735,
|
| 63 |
+
2.569128,
|
| 64 |
+
-0.323407,
|
| 65 |
+
2.293,
|
| 66 |
+
-1.925608,
|
| 67 |
+
-1.217717,
|
| 68 |
+
1.213905,
|
| 69 |
+
0.971588,
|
| 70 |
+
-0.023631,
|
| 71 |
+
0.10675,
|
| 72 |
+
2.021786,
|
| 73 |
+
0.250524,
|
| 74 |
+
-0.662387,
|
| 75 |
+
-0.768862
|
| 76 |
+
],
|
| 77 |
+
"std": [
|
| 78 |
+
2.665652,
|
| 79 |
+
2.743913,
|
| 80 |
+
2.765121,
|
| 81 |
+
2.595319,
|
| 82 |
+
3.037293,
|
| 83 |
+
2.291316,
|
| 84 |
+
2.144656,
|
| 85 |
+
2.911822,
|
| 86 |
+
2.969419,
|
| 87 |
+
2.501689,
|
| 88 |
+
2.154811,
|
| 89 |
+
3.163343,
|
| 90 |
+
2.621215,
|
| 91 |
+
2.381943,
|
| 92 |
+
3.186697,
|
| 93 |
+
3.021588,
|
| 94 |
+
2.295916,
|
| 95 |
+
3.234985,
|
| 96 |
+
3.233086,
|
| 97 |
+
2.26014,
|
| 98 |
+
2.874801,
|
| 99 |
+
2.810596,
|
| 100 |
+
3.29272,
|
| 101 |
+
2.674999,
|
| 102 |
+
2.680878,
|
| 103 |
+
2.372054,
|
| 104 |
+
2.451546,
|
| 105 |
+
2.353556,
|
| 106 |
+
2.995195,
|
| 107 |
+
2.379849,
|
| 108 |
+
2.786195,
|
| 109 |
+
2.77519
|
| 110 |
+
]
|
| 111 |
+
},
|
| 112 |
+
"sigma_min": 1e-05
|
| 113 |
+
}
|
pbr/pbr_adapter.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31f66790cafae9c0890ef85dc55dfbdb16aaf3d2f4ca6657d9f97e65596d0ee3
|
| 3 |
+
size 1385218468
|
pipeline.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"models": {
|
| 3 |
+
"shape": {
|
| 4 |
+
"config": "shape/config.json",
|
| 5 |
+
"adapter": "shape/shape_adapter.safetensors",
|
| 6 |
+
"base": "ckpts/slat_flow_img2shape_dit_1_3B_1024_bf16.safetensors"
|
| 7 |
+
},
|
| 8 |
+
"pbr": {
|
| 9 |
+
"config": "pbr/config.json",
|
| 10 |
+
"adapter": "pbr/pbr_adapter.safetensors",
|
| 11 |
+
"base": "ckpts/slat_flow_imgshape2tex_dit_1_3B_1024_bf16.safetensors"
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
}
|
shape/config.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "PLSRFlowModel",
|
| 3 |
+
"args": {
|
| 4 |
+
"resolution": 32,
|
| 5 |
+
"in_channels": 32,
|
| 6 |
+
"out_channels": 32,
|
| 7 |
+
"model_channels": 1536,
|
| 8 |
+
"cond_channels": 1024,
|
| 9 |
+
"num_blocks": 30,
|
| 10 |
+
"num_heads": 12,
|
| 11 |
+
"mlp_ratio": 5.3334,
|
| 12 |
+
"pe_mode": "rope",
|
| 13 |
+
"share_mod": true,
|
| 14 |
+
"qk_rms_norm": true,
|
| 15 |
+
"qk_rms_norm_cross": true,
|
| 16 |
+
"dtype": "float16",
|
| 17 |
+
"lr_channels": 512,
|
| 18 |
+
"lr_noise_level_mod": true,
|
| 19 |
+
"lr_conv_ch_factor": 0.5,
|
| 20 |
+
"lr_use_conv": true,
|
| 21 |
+
"lr_injection": true,
|
| 22 |
+
"gate_cross_attn": true,
|
| 23 |
+
"fuse_mode": "cross",
|
| 24 |
+
"local_attn_configs": {
|
| 25 |
+
"n_blocks_per_lr_cross": 4,
|
| 26 |
+
"local_attn_radius": 3,
|
| 27 |
+
"local_attn_knn": 16,
|
| 28 |
+
"local_attn_falloff_mode": "cosine"
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"peft_cfg": {
|
| 32 |
+
"target_modules": "all-linear",
|
| 33 |
+
"exclude_modules": [
|
| 34 |
+
"lr",
|
| 35 |
+
"local_attn_module",
|
| 36 |
+
"local_mha",
|
| 37 |
+
"cross_gate_mlp"
|
| 38 |
+
],
|
| 39 |
+
"r": 64,
|
| 40 |
+
"lora_alpha": 64
|
| 41 |
+
},
|
| 42 |
+
"normalization": {
|
| 43 |
+
"mean": [
|
| 44 |
+
0.781296,
|
| 45 |
+
0.018091,
|
| 46 |
+
-0.495192,
|
| 47 |
+
-0.558457,
|
| 48 |
+
1.06053,
|
| 49 |
+
0.093252,
|
| 50 |
+
1.518149,
|
| 51 |
+
-0.933218,
|
| 52 |
+
-0.732996,
|
| 53 |
+
2.604095,
|
| 54 |
+
-0.118341,
|
| 55 |
+
-2.143904,
|
| 56 |
+
0.495076,
|
| 57 |
+
-2.179512,
|
| 58 |
+
-2.130751,
|
| 59 |
+
-0.996944,
|
| 60 |
+
0.261421,
|
| 61 |
+
-2.217463,
|
| 62 |
+
1.260067,
|
| 63 |
+
-0.150213,
|
| 64 |
+
3.790713,
|
| 65 |
+
1.481266,
|
| 66 |
+
-1.046058,
|
| 67 |
+
-1.523667,
|
| 68 |
+
-0.059621,
|
| 69 |
+
2.22078,
|
| 70 |
+
1.621212,
|
| 71 |
+
0.87723,
|
| 72 |
+
0.567247,
|
| 73 |
+
-3.175944,
|
| 74 |
+
-3.186688,
|
| 75 |
+
1.578665
|
| 76 |
+
],
|
| 77 |
+
"std": [
|
| 78 |
+
5.972266,
|
| 79 |
+
4.706852,
|
| 80 |
+
5.44501,
|
| 81 |
+
5.209927,
|
| 82 |
+
5.32022,
|
| 83 |
+
4.547237,
|
| 84 |
+
5.020802,
|
| 85 |
+
5.444004,
|
| 86 |
+
5.226681,
|
| 87 |
+
5.683095,
|
| 88 |
+
4.831436,
|
| 89 |
+
5.286469,
|
| 90 |
+
5.652043,
|
| 91 |
+
5.367606,
|
| 92 |
+
5.525084,
|
| 93 |
+
4.730578,
|
| 94 |
+
4.805265,
|
| 95 |
+
5.124013,
|
| 96 |
+
5.530808,
|
| 97 |
+
5.619001,
|
| 98 |
+
5.10393,
|
| 99 |
+
5.41767,
|
| 100 |
+
5.269677,
|
| 101 |
+
5.547194,
|
| 102 |
+
5.634698,
|
| 103 |
+
5.235274,
|
| 104 |
+
6.110351,
|
| 105 |
+
5.511298,
|
| 106 |
+
6.237273,
|
| 107 |
+
4.879207,
|
| 108 |
+
5.347008,
|
| 109 |
+
5.405691
|
| 110 |
+
]
|
| 111 |
+
},
|
| 112 |
+
"sigma_min": 1e-05
|
| 113 |
+
}
|
shape/shape_adapter.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:691cceec3ca76d0f4f9396c4c833c5218a99e774e667ee944ffd70b1f59c4622
|
| 3 |
+
size 1383637412
|