suryatmodulus acanadaSpl commited on
Commit
5793cdc
·
0 Parent(s):

Duplicate from speridlabs/idol

Browse files

Co-authored-by: alejandro <acanadaSpl@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/gallery/armchair.webp filter=lfs diff=lfs merge=lfs -text
37
+ assets/gallery/avocado.webp filter=lfs diff=lfs merge=lfs -text
38
+ assets/gallery/axolotl.webp filter=lfs diff=lfs merge=lfs -text
39
+ assets/gallery/lamp.webp filter=lfs diff=lfs merge=lfs -text
40
+ assets/reel.mp4 filter=lfs diff=lfs merge=lfs -text
41
+ assets/gallery/castle.webp filter=lfs diff=lfs merge=lfs -text
42
+ assets/gallery/grandma.webp filter=lfs diff=lfs merge=lfs -text
43
+ assets/gallery/grapes.webp filter=lfs diff=lfs merge=lfs -text
44
+ assets/gallery/lollipop.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: idol
4
+ pipeline_tag: image-to-3d
5
+ tags:
6
+ - gaussian-splatting
7
+ - 3d
8
+ - image-to-3d
9
+ ---
10
+
11
+ <h1 align="center">Idol</h1>
12
+
13
+ <p align="center"><b>A single image to a 3D Gaussian splat.</b><br>One picture of an object in, up to a million 3D Gaussians out, including the sides the picture never showed.</p>
14
+
15
+ <p align="center">
16
+ <a href="https://speridlabs.com/research/idol"><img alt="Project Page" src="https://img.shields.io/badge/%F0%9F%8C%90%20Project%20Page-1f6feb?style=for-the-badge"></a>
17
+ <a href="https://github.com/speridlabs/idol-sdk"><img alt="Code" src="https://img.shields.io/badge/Code-181717?style=for-the-badge&logo=github"></a>
18
+ <a href="https://huggingface.co/spaces/speridlabs/idol"><img alt="Demo" src="https://img.shields.io/badge/%F0%9F%A4%97%20Demo-ffcc4d?style=for-the-badge"></a>
19
+ </p>
20
+
21
+ Idol turns one picture of an object into a 3D Gaussian splat. Give it a render, a generated image or a photo: it removes the background, frames the object and generates up to 1,048,576
22
+ Gaussians, written as a standard 3DGS `.ply`. It runs on consumer GPUs, using 7.2 GB of VRAM and can run in under 2 seconds.
23
+
24
+ <div align="center">
25
+ <video src="https://huggingface.co/speridlabs/idol/resolve/main/assets/reel.mp4" width="720" autoplay loop muted playsinline controls></video>
26
+ </div>
27
+
28
+ ## Examples
29
+
30
+ Idol turns one picture of an object into a 3D Gaussian splat. Give it a render, a generated image or a photo: it removes the background, frames the object and generates up to 1,048,576 Gaussians, including the sides the picture never showed. It runs on consumer GPUs, using 7.2 GB of VRAM and can run in under 2 seconds.
31
+
32
+ <table>
33
+ <tr>
34
+ <td width="50%"><img src="assets/gallery/armchair.webp"></td>
35
+ <td width="50%"><img src="assets/gallery/avocado.webp"></td>
36
+ </tr>
37
+ <tr>
38
+ <td width="50%"><img src="assets/gallery/lamp.webp"></td>
39
+ <td width="50%"><img src="assets/gallery/axolotl.webp"></td>
40
+ </tr>
41
+ <tr>
42
+ <td width="50%"><img src="assets/gallery/grandma.webp"></td>
43
+ <td width="50%"><img src="assets/gallery/lollipop.webp"></td>
44
+ </tr>
45
+ <tr>
46
+ <td width="50%"><img src="assets/gallery/grapes.webp"></td>
47
+ <td width="50%"><img src="assets/gallery/castle.webp"></td>
48
+ </tr>
49
+ </table>
50
+
51
+ ## Get started
52
+
53
+ **1. Get access to the image encoders.** Idol reads its input through two gated models on Hugging Face. Accept their
54
+ terms with your Hugging Face account, then log in once with `hf auth login` (or set `HF_TOKEN`):
55
+
56
+ - [facebook/dinov3-vith16plus-pretrain-lvd1689m](https://huggingface.co/facebook/dinov3-vith16plus-pretrain-lvd1689m)
57
+ - [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev) (only its VAE is downloaded)
58
+
59
+ **2. Install the code**
60
+
61
+ ```bash
62
+ git clone https://github.com/speridlabs/idol-sdk.git
63
+ cd idol-sdk
64
+ pip install -e . # Python 3.10+, PyTorch 2.5+, an NVIDIA GPU with CUDA
65
+ ```
66
+
67
+ There is no separate download step: on the first run, Idol's weights (about 3 GB, from this repository) and the two
68
+ image encoders download automatically into the Hugging Face cache. If the encoders are not accessible yet, Idol stops
69
+ before downloading anything and says what is missing.
70
+
71
+ **3. Generate a 3D object**
72
+
73
+ ```bash
74
+ python -m idol.sample --image photo.jpg --mode real
75
+ python -m idol.sample --image renders/ --mode synthetic --out outputs
76
+ ```
77
+
78
+ For each image this writes `<name>.ply` (open it in any Gaussian splat viewer), `<name>_input.png` (the image the
79
+ model saw, after background removal and cropping) and `<name>_camera.json` (the predicted camera of the input).
80
+
81
+ Pick the mode for your input. It sets how much room the crop leaves around the object:
82
+
83
+ | `--mode` | for | crop |
84
+ |---|---|---|
85
+ | `synthetic` (default) | renders and generated images of a single object | object fills 1/1.2 of the frame |
86
+ | `real` | photographs | object fills 1/1.7 of the frame |
87
+
88
+ From Python:
89
+
90
+ ```python
91
+ from idol import IdolPipeline
92
+
93
+ pipeline = IdolPipeline.from_pretrained("speridlabs/idol")
94
+ output = pipeline("photo.jpg", mode="real", seed=42, num_gaussians=1_048_576)
95
+ output.gaussian.save_ply("photo.ply")
96
+ ```
97
+
98
+ ## Flags
99
+
100
+ | Flag | Default | What it does |
101
+ |---|---|---|
102
+ | `--seed` | 42 | Fix it to get the same object again. |
103
+ | `--steps` | 50 | Sampling steps. Fewer are faster but lose some detail. |
104
+ | `--cfg_strength` | 3.0 | Classifier-free guidance: how strictly the object follows the image. |
105
+ | `--rescale_t` | 3.0 | Time shift: higher spends more steps on the overall shape, lower on fine detail. |
106
+ | `--num_gaussians` | 262144 | 32,768 to 1,048,576, a multiple of 32. |
107
+ | `--dinov3_dtype` | bf16 | `fp32` runs the DINOv3 encoder in full precision (1.7 GB more memory). |
108
+ | `--weights` | `speridlabs/idol` | A Hugging Face repo or a local folder. |
109
+ | `--no_optimize` | optimized | Turn off the faster sampling. |
110
+
111
+ Faster sampling is on by default on GPU (~1.7x, same output quality): the denoiser is compiled with `torch.compile`,
112
+ the guided and unguided passes run as one batch, and attention uses cuDNN with TF32 matmuls while sampling. The first
113
+ image in a process is slower while it compiles.
114
+
115
+ ## More details about the model
116
+
117
+ | Component | Parameters | Precision on GPU | Weights in VRAM |
118
+ |---|---|---|---|
119
+ | DiT (denoiser) | 370.6M | FP16 transformer blocks; FP32 embeddings and norms | ~0.8–1.0 GB |
120
+ | Octree decoder | 50.8M | FP16 transformer blocks; FP32 embeddings and norms | ~0.1–0.2 GB |
121
+ | Gaussian decoder | 237.3M | FP16 transformer blocks; FP32 embeddings and norms | ~0.5–0.9 GB |
122
+ | BiRefNet (background removal) | 220.7M | FP16 | ~0.44 GB |
123
+ | DINOv3 ViT-H+/16 | 840.6M | bf16 | ~1.68 GB |
124
+ | FLUX.2 VAE | 84.1M | bf16 (FP32 checkpoint, cast on load) | ~0.17 GB |
125
+ | **Full request** | **~1.80B** | mostly FP16 / bf16, some FP32 | **~3.7–4.4 GB of weights, 7.2 GB peak** |
126
+
127
+ ## Benchmark
128
+
129
+ Idol, TripoSplat, TRELLIS and LGM, scored at the input view (PSNR, SSIM, LPIPS, IoU) and at seven new views
130
+ (DINOv2, CLIP, sharpness distance). Mean scores, 1 × H100 per model. Bold is the best in each column.
131
+
132
+ | Model | Setting | PSNR ↑ | SSIM ↑ | LPIPS ↓ | IoU ↑ | DINOv2 ↑ | CLIP ↑ | Sharpness distance ↓ | Request time ↓ |
133
+ |---|---|---|---|---|---|---|---|---|---|
134
+ | **Idol** | 50 steps, 262,144 Gaussians | 12.25 | **0.726** | **0.213** | **0.862** | **0.781** | **0.885** | **0.81** | 6.8 s |
135
+ | TripoSplat | 50 steps, 262,144 Gaussians | 11.76 | 0.712 | 0.225 | 0.860 | 0.743 | 0.868 | 1.03 | 9.9 s |
136
+ | TRELLIS | Paper setting, 50 + 50 steps | 11.89 | 0.716 | 0.235 | 0.845 | 0.754 | 0.868 | 0.97 | 7.1 s |
137
+ | LGM | Default, 65,536 Gaussians | **12.46**\* | 0.722 | 0.237 | 0.834 | 0.575 | 0.784 | 1.22 | **1.1 s** |
138
+
139
+ \* LGM has the highest PSNR despite visibly blurry results, because PSNR averages squared pixel error.
140
+
141
+ ## Across GPUs
142
+
143
+ One image to 262,144 Gaussians in 3.4 s. Request time at 50 steps: median over 8 images, with the same code and
144
+ settings on every GPU, one GPU per machine.
145
+
146
+ | GPU | VRAM | Request time |
147
+ |---|---|---|
148
+ | B300 | 269 GB | 3.4 s |
149
+ | B200 | 179 GB | 3.6 s |
150
+ | H200 | 140 GB | 6.6 s |
151
+ | H100 | 80 GB | 6.7 s |
152
+ | RTX 5090 | 32 GB | 14.1 s |
153
+ | A100 | 80 GB | 16.3 s |
154
+ | L40S | 45 GB | 16.6 s |
155
+ | RTX 4090 | 24 GB | 19.1 s |
156
+ | RTX 3080 | 10 GB | 46.2 s |
157
+ | L4 | 22 GB | 54.6 s |
158
+
159
+ **Made with ❤️ by [speridlabs.com](https://speridlabs.com)**
assets/gallery/armchair.webp ADDED

Git LFS Details

  • SHA256: 8c30a0cbed2931aebb7ba5fe9082ccc87a01ab7c24ddf48faceb650921b5b29f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.1 MB
assets/gallery/avocado.webp ADDED

Git LFS Details

  • SHA256: b7dd1f8863bbca337bd71635ca8f5499cade479aa71faec5a136f13798a9d0ee
  • Pointer size: 131 Bytes
  • Size of remote file: 758 kB
assets/gallery/axolotl.webp ADDED

Git LFS Details

  • SHA256: 907d771e241396b47d364f3dd9382dc30d1ed4bb569618f148dac40d67c07fea
  • Pointer size: 131 Bytes
  • Size of remote file: 886 kB
assets/gallery/castle.webp ADDED

Git LFS Details

  • SHA256: cfe489be3a09ff5000e238c609d191f065487fe8ef658e1a84b24689fe78b768
  • Pointer size: 132 Bytes
  • Size of remote file: 3.44 MB
assets/gallery/grandma.webp ADDED

Git LFS Details

  • SHA256: 9bcdc56b7456abd50ea64c88282cb818452f552c290bca6896d7c1fe8f5e2e25
  • Pointer size: 132 Bytes
  • Size of remote file: 2.7 MB
assets/gallery/grapes.webp ADDED

Git LFS Details

  • SHA256: b607b625f3c1f2a9a59dc01e3c8530dc134aad096d8cd5baf02d6d1ad4c5ebf6
  • Pointer size: 132 Bytes
  • Size of remote file: 2.52 MB
assets/gallery/lamp.webp ADDED

Git LFS Details

  • SHA256: 184bb44d9abd5590b6b804877e6c32278387d40339150d96eca8a55c782f36d0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.49 MB
assets/gallery/lollipop.webp ADDED

Git LFS Details

  • SHA256: 43c756f3fe6eb340381f9250f9aa720c6751085095dc7a7912dac79f9456299d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
assets/reel.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2d3c0f0c85fea617919e74bc8c3ed2212f93ca573d56196f8d458346a297bb5
3
+ size 34672663
birefnet.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44bbc97b041f879975d0d6d538b8e66a25eb04d1f49aab40697544cdd97eaa8e
3
+ size 444466856
config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "denoiser": {
3
+ "name": "LatentSeqMMFlowModel",
4
+ "args": {
5
+ "q_token_length": 8192,
6
+ "in_channels": 16,
7
+ "cam_channels": 5,
8
+ "model_channels": 1024,
9
+ "cond_channels": 1280,
10
+ "cond2_channels": 128,
11
+ "num_blocks": 24,
12
+ "num_refiner_blocks": 2,
13
+ "num_heads": 16,
14
+ "mlp_ratio": 4
15
+ }
16
+ },
17
+ "decoder": {
18
+ "name": "OctreeProbabilityFixedlenDecoder",
19
+ "args": {
20
+ "model_channels": 1024,
21
+ "cond_channels": 16,
22
+ "num_blocks": 4,
23
+ "num_heads": 16,
24
+ "mlp_ratio": 4
25
+ }
26
+ },
27
+ "decoder_gs": {
28
+ "name": "GaussianFixedlenDecoder",
29
+ "args": {
30
+ "in_channels": 3,
31
+ "model_channels": 1024,
32
+ "cond_channels": 16,
33
+ "num_blocks": 16,
34
+ "num_heads": 16,
35
+ "mlp_ratio": 4,
36
+ "representation_config": {
37
+ "num_gaussians": 32,
38
+ "lr": {
39
+ "_xyz": 1.0,
40
+ "_features_dc": 1.0,
41
+ "_opacity": 1.0,
42
+ "_scaling": 1.0,
43
+ "_rotation": 0.1
44
+ },
45
+ "perturbe_size": 1.5,
46
+ "3d_filter_kernel_size": 0.0009,
47
+ "scaling_bias": 0.004,
48
+ "opacity_bias": 0.1
49
+ }
50
+ }
51
+ },
52
+ "image_size": 1024,
53
+ "max_voxel_level": 8,
54
+ "image_encoders": {
55
+ "dinov3": "facebook/dinov3-vith16plus-pretrain-lvd1689m",
56
+ "flux2_vae": "black-forest-labs/FLUX.2-dev"
57
+ }
58
+ }
decoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9da4d7676bfcadb1c3fdfbff796e6257dadf82d26ec05be7717c79b2b13a1c4e
3
+ size 203171696
decoder_gs.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3087eb8ee5763206a53e4078acf2a1bf382dab5147d407ec13a2cf39c04cc544
3
+ size 949083036
denoiser.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ded2cacf671bf3978ebc62729087abdbd318ef4752e6805b4c9fc8ffa51fe716
3
+ size 1482258308