Spaces:
Running
on
Zero
Running
on
Zero
Add Permalink
Browse filesSwitch Trellis model location to jetx
Upload New LUTS
- LUT/Aqua.cube +0 -0
- LUT/CineTravel.cube +0 -0
- LUT/Creative_Blue.cube +0 -0
- LUT/plasma.cube +258 -0
- LUT/prism.cube +258 -0
- app.py +45 -3
- requirements.txt +4 -4
- utils/file_utils.py +20 -1
LUT/Aqua.cube
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LUT/CineTravel.cube
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LUT/Creative_Blue.cube
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LUT/plasma.cube
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
TITLE "Colormap plasma"
|
2 |
+
LUT_1D_SIZE 256
|
3 |
+
0.0503830 0.0298030 0.5279750
|
4 |
+
0.0635360 0.0284260 0.5331240
|
5 |
+
0.0753530 0.0272060 0.5380070
|
6 |
+
0.0862220 0.0261250 0.5426580
|
7 |
+
0.0963790 0.0251650 0.5471030
|
8 |
+
0.1059800 0.0243090 0.5513680
|
9 |
+
0.1151240 0.0235560 0.5554680
|
10 |
+
0.1239030 0.0228780 0.5594230
|
11 |
+
0.1323810 0.0222580 0.5632500
|
12 |
+
0.1406030 0.0216870 0.5669590
|
13 |
+
0.1486070 0.0211540 0.5705620
|
14 |
+
0.1564210 0.0206510 0.5740650
|
15 |
+
0.1640700 0.0201710 0.5774780
|
16 |
+
0.1715740 0.0197060 0.5808060
|
17 |
+
0.1789500 0.0192520 0.5840540
|
18 |
+
0.1862130 0.0188030 0.5872280
|
19 |
+
0.1933740 0.0183540 0.5903300
|
20 |
+
0.2004450 0.0179020 0.5933640
|
21 |
+
0.2074350 0.0174420 0.5963330
|
22 |
+
0.2143500 0.0169730 0.5992390
|
23 |
+
0.2211970 0.0164970 0.6020830
|
24 |
+
0.2279830 0.0160070 0.6048670
|
25 |
+
0.2347150 0.0155020 0.6075920
|
26 |
+
0.2413960 0.0149790 0.6102590
|
27 |
+
0.2480320 0.0144390 0.6128680
|
28 |
+
0.2546270 0.0138820 0.6154190
|
29 |
+
0.2611830 0.0133080 0.6179110
|
30 |
+
0.2677030 0.0127160 0.6203460
|
31 |
+
0.2741910 0.0121090 0.6227220
|
32 |
+
0.2806480 0.0114880 0.6250380
|
33 |
+
0.2870760 0.0108550 0.6272950
|
34 |
+
0.2934780 0.0102130 0.6294900
|
35 |
+
0.2998550 0.0095610 0.6316240
|
36 |
+
0.3062100 0.0089020 0.6336940
|
37 |
+
0.3125430 0.0082390 0.6357000
|
38 |
+
0.3188560 0.0075760 0.6376400
|
39 |
+
0.3251500 0.0069150 0.6395120
|
40 |
+
0.3314260 0.0062610 0.6413160
|
41 |
+
0.3376830 0.0056180 0.6430490
|
42 |
+
0.3439250 0.0049910 0.6447100
|
43 |
+
0.3501500 0.0043820 0.6462980
|
44 |
+
0.3563590 0.0037980 0.6478100
|
45 |
+
0.3625530 0.0032430 0.6492450
|
46 |
+
0.3687330 0.0027240 0.6506010
|
47 |
+
0.3748970 0.0022450 0.6518760
|
48 |
+
0.3810470 0.0018140 0.6530680
|
49 |
+
0.3871830 0.0014340 0.6541770
|
50 |
+
0.3933040 0.0011140 0.6551990
|
51 |
+
0.3994110 0.0008590 0.6561330
|
52 |
+
0.4055030 0.0006780 0.6569770
|
53 |
+
0.4115800 0.0005770 0.6577300
|
54 |
+
0.4176420 0.0005640 0.6583900
|
55 |
+
0.4236890 0.0006460 0.6589560
|
56 |
+
0.4297190 0.0008310 0.6594250
|
57 |
+
0.4357340 0.0011270 0.6597970
|
58 |
+
0.4417320 0.0015400 0.6600690
|
59 |
+
0.4477140 0.0020800 0.6602400
|
60 |
+
0.4536770 0.0027550 0.6603100
|
61 |
+
0.4596230 0.0035740 0.6602770
|
62 |
+
0.4655500 0.0045450 0.6601390
|
63 |
+
0.4714570 0.0056780 0.6598970
|
64 |
+
0.4773440 0.0069800 0.6595490
|
65 |
+
0.4832100 0.0084600 0.6590950
|
66 |
+
0.4890550 0.0101270 0.6585340
|
67 |
+
0.4948770 0.0119900 0.6578650
|
68 |
+
0.5006780 0.0140550 0.6570880
|
69 |
+
0.5064540 0.0163330 0.6562020
|
70 |
+
0.5122060 0.0188330 0.6552090
|
71 |
+
0.5179330 0.0215630 0.6541090
|
72 |
+
0.5236330 0.0245320 0.6529010
|
73 |
+
0.5293060 0.0277470 0.6515860
|
74 |
+
0.5349520 0.0312170 0.6501650
|
75 |
+
0.5405700 0.0349500 0.6486400
|
76 |
+
0.5461570 0.0389540 0.6470100
|
77 |
+
0.5517150 0.0431360 0.6452770
|
78 |
+
0.5572430 0.0473310 0.6434430
|
79 |
+
0.5627380 0.0515450 0.6415090
|
80 |
+
0.5682010 0.0557780 0.6394770
|
81 |
+
0.5736320 0.0600280 0.6373490
|
82 |
+
0.5790290 0.0642960 0.6351260
|
83 |
+
0.5843910 0.0685790 0.6328120
|
84 |
+
0.5897190 0.0728780 0.6304080
|
85 |
+
0.5950110 0.0771900 0.6279170
|
86 |
+
0.6002660 0.0815160 0.6253420
|
87 |
+
0.6054850 0.0858540 0.6226860
|
88 |
+
0.6106670 0.0902040 0.6199510
|
89 |
+
0.6158120 0.0945640 0.6171400
|
90 |
+
0.6209190 0.0989340 0.6142570
|
91 |
+
0.6259870 0.1033120 0.6113050
|
92 |
+
0.6310170 0.1076990 0.6082870
|
93 |
+
0.6360080 0.1120920 0.6052050
|
94 |
+
0.6409590 0.1164920 0.6020650
|
95 |
+
0.6458720 0.1208980 0.5988670
|
96 |
+
0.6507460 0.1253090 0.5956170
|
97 |
+
0.6555800 0.1297250 0.5923170
|
98 |
+
0.6603740 0.1341440 0.5889710
|
99 |
+
0.6651290 0.1385660 0.5855820
|
100 |
+
0.6698450 0.1429920 0.5821540
|
101 |
+
0.6745220 0.1474190 0.5786880
|
102 |
+
0.6791600 0.1518480 0.5751890
|
103 |
+
0.6837580 0.1562780 0.5716600
|
104 |
+
0.6883180 0.1607090 0.5681030
|
105 |
+
0.6928400 0.1651410 0.5645220
|
106 |
+
0.6973240 0.1695730 0.5609190
|
107 |
+
0.7017690 0.1740050 0.5572960
|
108 |
+
0.7061780 0.1784370 0.5536570
|
109 |
+
0.7105490 0.1828680 0.5500040
|
110 |
+
0.7148830 0.1872990 0.5463380
|
111 |
+
0.7191810 0.1917290 0.5426630
|
112 |
+
0.7234440 0.1961580 0.5389810
|
113 |
+
0.7276700 0.2005860 0.5352930
|
114 |
+
0.7318620 0.2050130 0.5316010
|
115 |
+
0.7360190 0.2094390 0.5279080
|
116 |
+
0.7401430 0.2138640 0.5242160
|
117 |
+
0.7442320 0.2182880 0.5205240
|
118 |
+
0.7482890 0.2227110 0.5168340
|
119 |
+
0.7523120 0.2271330 0.5131490
|
120 |
+
0.7563040 0.2315550 0.5094680
|
121 |
+
0.7602640 0.2359760 0.5057940
|
122 |
+
0.7641930 0.2403960 0.5021260
|
123 |
+
0.7680900 0.2448170 0.4984650
|
124 |
+
0.7719580 0.2492370 0.4948130
|
125 |
+
0.7757960 0.2536580 0.4911710
|
126 |
+
0.7796040 0.2580780 0.4875390
|
127 |
+
0.7833830 0.2625000 0.4839180
|
128 |
+
0.7871330 0.2669220 0.4803070
|
129 |
+
0.7908550 0.2713450 0.4767060
|
130 |
+
0.7945490 0.2757700 0.4731170
|
131 |
+
0.7982160 0.2801970 0.4695380
|
132 |
+
0.8018550 0.2846260 0.4659710
|
133 |
+
0.8054670 0.2890570 0.4624150
|
134 |
+
0.8090520 0.2934910 0.4588700
|
135 |
+
0.8126120 0.2979280 0.4553380
|
136 |
+
0.8161440 0.3023680 0.4518160
|
137 |
+
0.8196510 0.3068120 0.4483060
|
138 |
+
0.8231320 0.3112610 0.4448060
|
139 |
+
0.8265880 0.3157140 0.4413160
|
140 |
+
0.8300180 0.3201720 0.4378360
|
141 |
+
0.8334220 0.3246350 0.4343660
|
142 |
+
0.8368010 0.3291050 0.4309050
|
143 |
+
0.8401550 0.3335800 0.4274550
|
144 |
+
0.8434840 0.3380620 0.4240130
|
145 |
+
0.8467880 0.3425510 0.4205790
|
146 |
+
0.8500660 0.3470480 0.4171530
|
147 |
+
0.8533190 0.3515530 0.4137340
|
148 |
+
0.8565470 0.3560660 0.4103220
|
149 |
+
0.8597500 0.3605880 0.4069170
|
150 |
+
0.8629270 0.3651190 0.4035190
|
151 |
+
0.8660780 0.3696600 0.4001260
|
152 |
+
0.8692030 0.3742120 0.3967380
|
153 |
+
0.8723030 0.3787740 0.3933550
|
154 |
+
0.8753760 0.3833470 0.3899760
|
155 |
+
0.8784230 0.3879320 0.3866000
|
156 |
+
0.8814430 0.3925290 0.3832290
|
157 |
+
0.8844360 0.3971390 0.3798600
|
158 |
+
0.8874020 0.4017620 0.3764940
|
159 |
+
0.8903400 0.4063980 0.3731300
|
160 |
+
0.8932500 0.4110480 0.3697680
|
161 |
+
0.8961310 0.4157120 0.3664070
|
162 |
+
0.8989840 0.4203920 0.3630470
|
163 |
+
0.9018070 0.4250870 0.3596880
|
164 |
+
0.9046010 0.4297970 0.3563290
|
165 |
+
0.9073650 0.4345240 0.3529700
|
166 |
+
0.9100980 0.4392680 0.3496100
|
167 |
+
0.9128000 0.4440290 0.3462510
|
168 |
+
0.9154710 0.4488070 0.3428900
|
169 |
+
0.9181090 0.4536030 0.3395290
|
170 |
+
0.9207140 0.4584170 0.3361660
|
171 |
+
0.9232870 0.4632510 0.3328010
|
172 |
+
0.9258250 0.4681030 0.3294350
|
173 |
+
0.9283290 0.4729750 0.3260670
|
174 |
+
0.9307980 0.4778670 0.3226970
|
175 |
+
0.9332320 0.4827800 0.3193250
|
176 |
+
0.9356300 0.4877120 0.3159520
|
177 |
+
0.9379900 0.4926670 0.3125750
|
178 |
+
0.9403130 0.4976420 0.3091970
|
179 |
+
0.9425980 0.5026390 0.3058160
|
180 |
+
0.9448440 0.5076580 0.3024330
|
181 |
+
0.9470510 0.5126990 0.2990490
|
182 |
+
0.9492170 0.5177630 0.2956620
|
183 |
+
0.9513440 0.5228500 0.2922750
|
184 |
+
0.9534280 0.5279600 0.2888830
|
185 |
+
0.9554700 0.5330930 0.2854900
|
186 |
+
0.9574690 0.5382500 0.2820960
|
187 |
+
0.9594240 0.5434310 0.2787010
|
188 |
+
0.9613360 0.5486360 0.2753050
|
189 |
+
0.9632030 0.5538650 0.2719090
|
190 |
+
0.9650240 0.5591180 0.2685130
|
191 |
+
0.9667980 0.5643960 0.2651180
|
192 |
+
0.9685260 0.5697000 0.2617210
|
193 |
+
0.9702050 0.5750280 0.2583250
|
194 |
+
0.9718350 0.5803820 0.2549310
|
195 |
+
0.9734160 0.5857610 0.2515400
|
196 |
+
0.9749470 0.5911650 0.2481510
|
197 |
+
0.9764280 0.5965950 0.2447670
|
198 |
+
0.9778560 0.6020510 0.2413870
|
199 |
+
0.9792330 0.6075320 0.2380130
|
200 |
+
0.9805560 0.6130390 0.2346460
|
201 |
+
0.9818260 0.6185720 0.2312870
|
202 |
+
0.9830410 0.6241310 0.2279370
|
203 |
+
0.9841990 0.6297180 0.2245950
|
204 |
+
0.9853010 0.6353300 0.2212650
|
205 |
+
0.9863450 0.6409690 0.2179480
|
206 |
+
0.9873320 0.6466330 0.2146480
|
207 |
+
0.9882600 0.6523250 0.2113640
|
208 |
+
0.9891280 0.6580430 0.2081000
|
209 |
+
0.9899350 0.6637870 0.2048590
|
210 |
+
0.9906810 0.6695580 0.2016420
|
211 |
+
0.9913650 0.6753550 0.1984530
|
212 |
+
0.9919850 0.6811790 0.1952950
|
213 |
+
0.9925410 0.6870300 0.1921700
|
214 |
+
0.9930320 0.6929070 0.1890840
|
215 |
+
0.9934560 0.6988100 0.1860410
|
216 |
+
0.9938140 0.7047410 0.1830430
|
217 |
+
0.9941030 0.7106980 0.1800970
|
218 |
+
0.9943240 0.7166810 0.1772080
|
219 |
+
0.9944740 0.7226910 0.1743810
|
220 |
+
0.9945530 0.7287280 0.1716220
|
221 |
+
0.9945610 0.7347910 0.1689380
|
222 |
+
0.9944950 0.7408800 0.1663350
|
223 |
+
0.9943550 0.7469950 0.1638210
|
224 |
+
0.9941410 0.7531370 0.1614040
|
225 |
+
0.9938510 0.7593040 0.1590920
|
226 |
+
0.9934820 0.7654990 0.1568910
|
227 |
+
0.9930330 0.7717200 0.1548080
|
228 |
+
0.9925050 0.7779670 0.1528550
|
229 |
+
0.9918970 0.7842390 0.1510420
|
230 |
+
0.9912090 0.7905370 0.1493770
|
231 |
+
0.9904390 0.7968590 0.1478700
|
232 |
+
0.9895870 0.8032050 0.1465290
|
233 |
+
0.9886480 0.8095790 0.1453570
|
234 |
+
0.9876210 0.8159780 0.1443630
|
235 |
+
0.9865090 0.8224010 0.1435570
|
236 |
+
0.9853140 0.8288460 0.1429450
|
237 |
+
0.9840310 0.8353150 0.1425280
|
238 |
+
0.9826530 0.8418120 0.1423030
|
239 |
+
0.9811900 0.8483290 0.1422790
|
240 |
+
0.9796440 0.8548660 0.1424530
|
241 |
+
0.9779950 0.8614320 0.1428080
|
242 |
+
0.9762650 0.8680160 0.1433510
|
243 |
+
0.9744430 0.8746220 0.1440610
|
244 |
+
0.9725300 0.8812500 0.1449230
|
245 |
+
0.9705330 0.8878960 0.1459190
|
246 |
+
0.9684430 0.8945640 0.1470140
|
247 |
+
0.9662710 0.9012490 0.1481800
|
248 |
+
0.9640210 0.9079500 0.1493700
|
249 |
+
0.9616810 0.9146720 0.1505200
|
250 |
+
0.9592760 0.9214070 0.1515660
|
251 |
+
0.9568080 0.9281520 0.1524090
|
252 |
+
0.9542870 0.9349080 0.1529210
|
253 |
+
0.9517260 0.9416710 0.1529250
|
254 |
+
0.9491510 0.9484350 0.1521780
|
255 |
+
0.9466020 0.9551900 0.1503280
|
256 |
+
0.9441520 0.9619160 0.1468610
|
257 |
+
0.9418960 0.9685900 0.1409560
|
258 |
+
0.9400150 0.9751580 0.1313260
|
LUT/prism.cube
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
TITLE "Colormap prism"
|
2 |
+
LUT_1D_SIZE 256
|
3 |
+
1.0000000 0.0000000 0.0000000
|
4 |
+
1.0000000 0.0000000 0.0000000
|
5 |
+
1.0000000 0.1296454 0.0000000
|
6 |
+
1.0000000 0.3202983 0.0000000
|
7 |
+
1.0000000 0.5115908 0.0000000
|
8 |
+
1.0000000 0.6909103 0.0000000
|
9 |
+
1.0000000 0.8464335 0.0000000
|
10 |
+
1.0000000 0.9679059 0.0000000
|
11 |
+
0.8889842 1.0000000 0.0000000
|
12 |
+
0.6990986 1.0000000 0.0000000
|
13 |
+
0.5072944 1.0000000 0.0000000
|
14 |
+
0.3262181 0.9965688 0.0000000
|
15 |
+
0.1678088 0.8870494 0.0000000
|
16 |
+
0.0425111 0.7408013 0.2247246
|
17 |
+
0.0000000 0.5674673 0.4915249
|
18 |
+
0.0000000 0.3784761 0.7259170
|
19 |
+
0.0000000 0.1862886 0.9124462
|
20 |
+
0.0000000 0.0035767 1.0000000
|
21 |
+
0.1001458 0.0000000 1.0000000
|
22 |
+
0.2431037 0.0000000 1.0000000
|
23 |
+
0.4142086 0.0000000 0.9964608
|
24 |
+
0.6021789 0.0000000 0.8449673
|
25 |
+
0.7946210 0.0000000 0.6377615
|
26 |
+
0.9788463 0.0000000 0.3885054
|
27 |
+
1.0000000 0.0000000 0.1136334
|
28 |
+
1.0000000 0.0000000 0.0000000
|
29 |
+
1.0000000 0.0560557 0.0000000
|
30 |
+
1.0000000 0.2428793 0.0000000
|
31 |
+
1.0000000 0.4354472 0.0000000
|
32 |
+
1.0000000 0.6210625 0.0000000
|
33 |
+
1.0000000 0.7874869 0.0000000
|
34 |
+
1.0000000 0.9237471 0.0000000
|
35 |
+
0.9619139 1.0000000 0.0000000
|
36 |
+
0.7763620 1.0000000 0.0000000
|
37 |
+
0.5837971 1.0000000 0.0000000
|
38 |
+
0.3969160 1.0000000 0.0000000
|
39 |
+
0.2280405 0.9359470 0.0000000
|
40 |
+
0.0883053 0.8034250 0.1122854
|
41 |
+
0.0000000 0.6396881 0.3872372
|
42 |
+
0.0000000 0.4555321 0.6366568
|
43 |
+
0.0000000 0.2630992 0.8440989
|
44 |
+
0.0000000 0.0750774 0.9958860
|
45 |
+
0.0528227 0.0000000 1.0000000
|
46 |
+
0.1816855 0.0000000 1.0000000
|
47 |
+
0.3427450 0.0000000 1.0000000
|
48 |
+
0.5253819 0.0000000 0.9132024
|
49 |
+
0.7175540 0.0000000 0.7269346
|
50 |
+
0.9065906 0.0000000 0.4927369
|
51 |
+
1.0000000 0.0000000 0.2260510
|
52 |
+
1.0000000 0.0000000 0.0000000
|
53 |
+
1.0000000 0.0000000 0.0000000
|
54 |
+
1.0000000 0.1663926 0.0000000
|
55 |
+
1.0000000 0.3581753 0.0000000
|
56 |
+
1.0000000 0.5481003 0.0000000
|
57 |
+
1.0000000 0.7236451 0.0000000
|
58 |
+
1.0000000 0.8732351 0.0000000
|
59 |
+
1.0000000 0.9870073 0.0000000
|
60 |
+
0.8524872 1.0000000 0.0000000
|
61 |
+
0.6612222 1.0000000 0.0000000
|
62 |
+
0.4705360 1.0000000 0.0000000
|
63 |
+
0.2930013 0.9783610 0.0000000
|
64 |
+
0.1403237 0.8609830 0.0000000
|
65 |
+
0.0225699 0.7085951 0.2788060
|
66 |
+
0.0000000 0.5312448 0.5405844
|
67 |
+
0.0000000 0.3406256 0.7667197
|
68 |
+
0.0000000 0.1493058 0.9423019
|
69 |
+
0.0121034 0.0000000 1.0000000
|
70 |
+
0.1254924 0.0000000 1.0000000
|
71 |
+
0.2747832 0.0000000 1.0000000
|
72 |
+
0.4501322 0.0000000 0.9716662
|
73 |
+
0.6399781 0.0000000 0.8083295
|
74 |
+
0.8318034 0.0000000 0.5916961
|
75 |
+
1.0000000 0.0000000 0.3360498
|
76 |
+
1.0000000 0.0000000 0.0582462
|
77 |
+
1.0000000 0.0000000 0.0000000
|
78 |
+
1.0000000 0.0916564 0.0000000
|
79 |
+
1.0000000 0.2806019 0.0000000
|
80 |
+
1.0000000 0.4728044 0.0000000
|
81 |
+
1.0000000 0.6555912 0.0000000
|
82 |
+
1.0000000 0.8169104 0.0000000
|
83 |
+
1.0000000 0.9461255 0.0000000
|
84 |
+
0.9266598 1.0000000 0.0000000
|
85 |
+
0.7387412 1.0000000 0.0000000
|
86 |
+
0.5462902 1.0000000 0.0000000
|
87 |
+
0.3619960 1.0000000 0.0000000
|
88 |
+
0.1980097 0.9128595 0.0000000
|
89 |
+
0.0651438 0.7734512 0.1673915
|
90 |
+
0.0000000 0.6048043 0.4387275
|
91 |
+
0.0000000 0.4180383 0.6811364
|
92 |
+
0.0000000 0.2254677 0.8786350
|
93 |
+
0.0000000 0.0397893 1.0000000
|
94 |
+
0.0751256 0.0000000 1.0000000
|
95 |
+
0.2110502 0.0000000 1.0000000
|
96 |
+
0.3772352 0.0000000 1.0000000
|
97 |
+
0.5627235 0.0000000 0.8810750
|
98 |
+
0.7552849 0.0000000 0.6843241
|
99 |
+
0.9422232 0.0000000 0.4424528
|
100 |
+
1.0000000 0.0000000 0.1714086
|
101 |
+
1.0000000 0.0000000 0.0000000
|
102 |
+
1.0000000 0.0194706 0.0000000
|
103 |
+
1.0000000 0.2035571 0.0000000
|
104 |
+
1.0000000 0.3959804 0.0000000
|
105 |
+
1.0000000 0.5840534 0.0000000
|
106 |
+
1.0000000 0.7553756 0.0000000
|
107 |
+
1.0000000 0.8986510 0.0000000
|
108 |
+
0.9980861 1.0000000 0.0000000
|
109 |
+
0.8155247 1.0000000 0.0000000
|
110 |
+
0.6233682 1.0000000 0.0000000
|
111 |
+
0.4342864 1.0000000 0.0000000
|
112 |
+
0.2607461 0.9584992 0.0000000
|
113 |
+
0.1141897 0.8335622 0.0541859
|
114 |
+
0.0042803 0.6754233 0.3321763
|
115 |
+
0.0000000 0.4945091 0.5882648
|
116 |
+
0.0000000 0.3027481 0.8055665
|
117 |
+
0.0000000 0.1127839 0.9697538
|
118 |
+
0.0311241 0.0000000 1.0000000
|
119 |
+
0.1522280 0.0000000 1.0000000
|
120 |
+
0.3074708 0.0000000 1.0000000
|
121 |
+
0.4866167 0.0000000 0.9443930
|
122 |
+
0.6778538 0.0000000 0.7696297
|
123 |
+
0.8685731 0.0000000 0.5441214
|
124 |
+
1.0000000 0.0000000 0.2827369
|
125 |
+
1.0000000 0.0000000 0.0027104
|
126 |
+
1.0000000 0.0000000 0.0000000
|
127 |
+
1.0000000 0.1278652 0.0000000
|
128 |
+
1.0000000 0.3184505 0.0000000
|
129 |
+
1.0000000 0.5097973 0.0000000
|
130 |
+
1.0000000 0.6892893 0.0000000
|
131 |
+
1.0000000 0.8450918 0.0000000
|
132 |
+
1.0000000 0.9669321 0.0000000
|
133 |
+
0.8907510 1.0000000 0.0000000
|
134 |
+
0.7009451 1.0000000 0.0000000
|
135 |
+
0.5090989 1.0000000 0.0000000
|
136 |
+
0.3278616 0.9974139 0.0000000
|
137 |
+
0.1691829 0.8882851 0.0000000
|
138 |
+
0.0435252 0.7423462 0.2220707
|
139 |
+
0.0000000 0.5692195 0.4890987
|
140 |
+
0.0000000 0.3803201 0.7238784
|
141 |
+
0.0000000 0.1881028 0.9109297
|
142 |
+
0.0000000 0.0052414 1.0000000
|
143 |
+
0.0989461 0.0000000 1.0000000
|
144 |
+
0.2415855 0.0000000 1.0000000
|
145 |
+
0.4124722 0.0000000 0.9976057
|
146 |
+
0.6003387 0.0000000 0.8467001
|
147 |
+
0.7927983 0.0000000 0.6399679
|
148 |
+
0.9771613 0.0000000 0.3910399
|
149 |
+
1.0000000 0.0000000 0.1163290
|
150 |
+
1.0000000 0.0000000 0.0000000
|
151 |
+
1.0000000 0.0543362 0.0000000
|
152 |
+
1.0000000 0.2410441 0.0000000
|
153 |
+
1.0000000 0.4336173 0.0000000
|
154 |
+
1.0000000 0.6193585 0.0000000
|
155 |
+
1.0000000 0.7860211 0.0000000
|
156 |
+
1.0000000 0.9226163 0.0000000
|
157 |
+
0.9636153 1.0000000 0.0000000
|
158 |
+
0.7781910 1.0000000 0.0000000
|
159 |
+
0.5856331 1.0000000 0.0000000
|
160 |
+
0.3986380 1.0000000 0.0000000
|
161 |
+
0.2295349 0.9370342 0.0000000
|
162 |
+
0.0894736 0.8048569 0.1095888
|
163 |
+
0.0000000 0.6413702 0.3846992
|
164 |
+
0.0000000 0.4573536 0.6344446
|
165 |
+
0.0000000 0.2649400 0.8423584
|
166 |
+
0.0000000 0.0768161 0.9947320
|
167 |
+
0.0517745 0.0000000 1.0000000
|
168 |
+
0.1802844 0.0000000 1.0000000
|
169 |
+
0.3410832 0.0000000 1.0000000
|
170 |
+
0.5235690 0.0000000 0.9147107
|
171 |
+
0.7157095 0.0000000 0.7289666
|
172 |
+
0.9048363 0.0000000 0.4951587
|
173 |
+
1.0000000 0.0000000 0.2287029
|
174 |
+
1.0000000 0.0000000 0.0000000
|
175 |
+
1.0000000 0.0000000 0.0000000
|
176 |
+
1.0000000 0.1645896 0.0000000
|
177 |
+
1.0000000 0.3563285 0.0000000
|
178 |
+
1.0000000 0.5463315 0.0000000
|
179 |
+
1.0000000 0.7220709 0.0000000
|
180 |
+
1.0000000 0.8719593 0.0000000
|
181 |
+
1.0000000 0.9861140 0.0000000
|
182 |
+
0.8542791 1.0000000 0.0000000
|
183 |
+
0.6630701 1.0000000 0.0000000
|
184 |
+
0.4723180 1.0000000 0.0000000
|
185 |
+
0.2946000 0.9792879 0.0000000
|
186 |
+
0.1416336 0.8622866 0.0000000
|
187 |
+
0.0235047 0.7101893 0.2761833
|
188 |
+
0.0000000 0.5330245 0.5382222
|
189 |
+
0.0000000 0.3424734 0.7647738
|
190 |
+
0.0000000 0.1510999 0.9409007
|
191 |
+
0.0112181 0.0000000 1.0000000
|
192 |
+
0.1242232 0.0000000 1.0000000
|
193 |
+
0.2732138 0.0000000 1.0000000
|
194 |
+
0.4483661 0.0000000 0.9729337
|
195 |
+
0.6381317 0.0000000 0.8101653
|
196 |
+
0.8299985 0.0000000 0.5939792
|
197 |
+
1.0000000 0.0000000 0.3386296
|
198 |
+
1.0000000 0.0000000 0.0609526
|
199 |
+
1.0000000 0.0000000 0.0000000
|
200 |
+
1.0000000 0.0899050 0.0000000
|
201 |
+
1.0000000 0.2787581 0.0000000
|
202 |
+
1.0000000 0.4709898 0.0000000
|
203 |
+
1.0000000 0.6539254 0.0000000
|
204 |
+
1.0000000 0.8155033 0.0000000
|
205 |
+
1.0000000 0.9450698 0.0000000
|
206 |
+
0.9283955 1.0000000 0.0000000
|
207 |
+
0.7405812 1.0000000 0.0000000
|
208 |
+
0.5481133 1.0000000 0.0000000
|
209 |
+
0.3636819 1.0000000 0.0000000
|
210 |
+
0.1994473 0.9140207 0.0000000
|
211 |
+
0.0662383 0.7749402 0.1647122
|
212 |
+
0.0000000 0.6065229 0.4362407
|
213 |
+
0.0000000 0.4198733 0.6790060
|
214 |
+
0.0000000 0.2272979 0.8770016
|
215 |
+
0.0000000 0.0414942 1.0000000
|
216 |
+
0.0740020 0.0000000 1.0000000
|
217 |
+
0.2095900 0.0000000 1.0000000
|
218 |
+
0.3755347 0.0000000 1.0000000
|
219 |
+
0.5608948 0.0000000 0.8826951
|
220 |
+
0.7534487 0.0000000 0.6864441
|
221 |
+
0.9405004 0.0000000 0.4449329
|
222 |
+
1.0000000 0.0000000 0.1740854
|
223 |
+
1.0000000 0.0000000 0.0000000
|
224 |
+
1.0000000 0.0177894 0.0000000
|
225 |
+
1.0000000 0.2017359 0.0000000
|
226 |
+
1.0000000 0.3941394 0.0000000
|
227 |
+
1.0000000 0.5823139 0.0000000
|
228 |
+
1.0000000 0.7538523 0.0000000
|
229 |
+
1.0000000 0.8974443 0.0000000
|
230 |
+
0.9997469 1.0000000 0.0000000
|
231 |
+
0.8173371 1.0000000 0.0000000
|
232 |
+
0.6252128 1.0000000 0.0000000
|
233 |
+
0.4360414 1.0000000 0.0000000
|
234 |
+
0.2622960 0.9595057 0.0000000
|
235 |
+
0.1154322 0.8349302 0.0514787
|
236 |
+
0.0051334 0.6770625 0.3295914
|
237 |
+
0.0000000 0.4963115 0.5859728
|
238 |
+
0.0000000 0.3045949 0.8037184
|
239 |
+
0.0000000 0.1145534 0.9684715
|
240 |
+
0.0301581 0.0000000 1.0000000
|
241 |
+
0.1508926 0.0000000 1.0000000
|
242 |
+
0.3058541 0.0000000 1.0000000
|
243 |
+
0.4848254 0.0000000 0.9457798
|
244 |
+
0.6760059 0.0000000 0.7715638
|
245 |
+
0.8667905 0.0000000 0.5464753
|
246 |
+
1.0000000 0.0000000 0.2853554
|
247 |
+
1.0000000 0.0000000 0.0054208
|
248 |
+
1.0000000 0.0000000 0.0000000
|
249 |
+
1.0000000 0.1260862 0.0000000
|
250 |
+
1.0000000 0.3166027 0.0000000
|
251 |
+
1.0000000 0.5080026 0.0000000
|
252 |
+
1.0000000 0.6876660 0.0000000
|
253 |
+
1.0000000 0.8437470 0.0000000
|
254 |
+
1.0000000 0.9659545 0.0000000
|
255 |
+
0.8925165 1.0000000 0.0000000
|
256 |
+
0.7027915 1.0000000 0.0000000
|
257 |
+
0.5109044 1.0000000 0.0000000
|
258 |
+
0.3295071 0.9982549 0.0000000
|
app.py
CHANGED
@@ -32,7 +32,11 @@ import logging
|
|
32 |
import gc
|
33 |
|
34 |
# Import functions from modules
|
35 |
-
from utils.file_utils import
|
|
|
|
|
|
|
|
|
36 |
|
37 |
from utils.color_utils import (
|
38 |
hex_to_rgb,
|
@@ -800,7 +804,7 @@ def load_trellis_model():
|
|
800 |
loaded = False
|
801 |
if TRELLIS_PIPELINE == None:
|
802 |
try:
|
803 |
-
TRELLIS_PIPELINE = TrellisImageTo3DPipeline.from_pretrained("
|
804 |
TRELLIS_PIPELINE.cuda()
|
805 |
# Preload with a dummy image to finalize initialization
|
806 |
try:
|
@@ -1143,6 +1147,33 @@ def extract_gaussian(state: dict, req: gr.Request, progress=gr.Progress(track_tq
|
|
1143 |
torch.cuda.ipc_collect()
|
1144 |
return gaussian_path, gaussian_path
|
1145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
|
1147 |
@spaces.GPU()
|
1148 |
def getVersions():
|
@@ -1564,6 +1595,9 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
1564 |
gr.Markdown("""
|
1565 |
### Files over 10 MB may not display in the 3D model viewer
|
1566 |
""", elem_id="file_size_info", elem_classes="intro" )
|
|
|
|
|
|
|
1567 |
|
1568 |
is_multiimage = gr.State(False)
|
1569 |
output_buf = gr.State()
|
@@ -1811,6 +1845,10 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
1811 |
).then(
|
1812 |
lambda: gr.Button(interactive=True),
|
1813 |
outputs=[glb_file]
|
|
|
|
|
|
|
|
|
1814 |
)
|
1815 |
|
1816 |
extract_gaussian_btn.click(
|
@@ -1820,6 +1858,10 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
1820 |
).then(
|
1821 |
lambda: gr.Button(interactive=True),
|
1822 |
outputs=[gaussian_file]
|
|
|
|
|
|
|
|
|
1823 |
)
|
1824 |
|
1825 |
if __name__ == "__main__":
|
@@ -1854,7 +1896,7 @@ if __name__ == "__main__":
|
|
1854 |
# image_processor = DPTImageProcessor.from_pretrained("Intel/dpt-large")
|
1855 |
# depth_model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large", ignore_mismatched_sizes=True)
|
1856 |
if constants.IS_SHARED_SPACE:
|
1857 |
-
TRELLIS_PIPELINE = TrellisImageTo3DPipeline.from_pretrained("
|
1858 |
TRELLIS_PIPELINE.to(device)
|
1859 |
try:
|
1860 |
TRELLIS_PIPELINE.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8)), 512, True) # Preload rembg
|
|
|
32 |
import gc
|
33 |
|
34 |
# Import functions from modules
|
35 |
+
from utils.file_utils import (
|
36 |
+
cleanup_temp_files,
|
37 |
+
get_file_parts,
|
38 |
+
generate_permalink_from_urls
|
39 |
+
)
|
40 |
|
41 |
from utils.color_utils import (
|
42 |
hex_to_rgb,
|
|
|
804 |
loaded = False
|
805 |
if TRELLIS_PIPELINE == None:
|
806 |
try:
|
807 |
+
TRELLIS_PIPELINE = TrellisImageTo3DPipeline.from_pretrained("jetx/TRELLIS-image-large")
|
808 |
TRELLIS_PIPELINE.cuda()
|
809 |
# Preload with a dummy image to finalize initialization
|
810 |
try:
|
|
|
1147 |
torch.cuda.ipc_collect()
|
1148 |
return gaussian_path, gaussian_path
|
1149 |
|
1150 |
+
def update_permalink(glb, gaussian, depth_out, depth_src_file):
|
1151 |
+
"""
|
1152 |
+
Determines the smaller file (glb or gaussian) in bytes and uses that file along with
|
1153 |
+
the depth output and the file used to generate the 3D model (depth_src_file) to
|
1154 |
+
create a permalink URL.
|
1155 |
+
|
1156 |
+
Parameters:
|
1157 |
+
glb (str): Path to the extracted GLB file.
|
1158 |
+
gaussian (str): Path to the extracted Gaussian file.
|
1159 |
+
depth_out (str): File path for the depth image.
|
1160 |
+
depth_src_file (str): File path for the image used to generate the 3D model.
|
1161 |
+
|
1162 |
+
Returns:
|
1163 |
+
tuple: A tuple of (update object for permalink_row, permalink URL string).
|
1164 |
+
"""
|
1165 |
+
file_candidates = {}
|
1166 |
+
if glb and os.path.exists(glb):
|
1167 |
+
file_candidates[glb] = os.path.getsize(glb)
|
1168 |
+
if gaussian and os.path.exists(gaussian):
|
1169 |
+
file_candidates[gaussian] = os.path.getsize(gaussian)
|
1170 |
+
|
1171 |
+
if not file_candidates:
|
1172 |
+
return gr.update(visible=False), ""
|
1173 |
+
|
1174 |
+
smallest_file = min(file_candidates, key=file_candidates.get)
|
1175 |
+
permalink = generate_permalink_from_urls(smallest_file, depth_out, depth_src_file)
|
1176 |
+
return gr.update(visible=True), permalink
|
1177 |
|
1178 |
@spaces.GPU()
|
1179 |
def getVersions():
|
|
|
1595 |
gr.Markdown("""
|
1596 |
### Files over 10 MB may not display in the 3D model viewer
|
1597 |
""", elem_id="file_size_info", elem_classes="intro" )
|
1598 |
+
with gr.Row(visible=False) as permalink_row:
|
1599 |
+
permalink_button = gr.Button("View in Permalink", elem_classes="solid small centered", variant="secondary")
|
1600 |
+
permalink_text = gr.Textbox(label="Permalink", elem_classes="solid small centered")
|
1601 |
|
1602 |
is_multiimage = gr.State(False)
|
1603 |
output_buf = gr.State()
|
|
|
1845 |
).then(
|
1846 |
lambda: gr.Button(interactive=True),
|
1847 |
outputs=[glb_file]
|
1848 |
+
).then(
|
1849 |
+
fn=update_permalink,
|
1850 |
+
inputs=[glb_file, gaussian_file, depth_output, ddd_image_path], # ddd_image_path now holds the source file
|
1851 |
+
outputs=[permalink_row, permalink_text]
|
1852 |
)
|
1853 |
|
1854 |
extract_gaussian_btn.click(
|
|
|
1858 |
).then(
|
1859 |
lambda: gr.Button(interactive=True),
|
1860 |
outputs=[gaussian_file]
|
1861 |
+
).then(
|
1862 |
+
fn=update_permalink,
|
1863 |
+
inputs=[glb_file, gaussian_file, depth_output, ddd_image_path], # Use the actual depth source file here
|
1864 |
+
outputs=[permalink_row, permalink_text]
|
1865 |
)
|
1866 |
|
1867 |
if __name__ == "__main__":
|
|
|
1896 |
# image_processor = DPTImageProcessor.from_pretrained("Intel/dpt-large")
|
1897 |
# depth_model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large", ignore_mismatched_sizes=True)
|
1898 |
if constants.IS_SHARED_SPACE:
|
1899 |
+
TRELLIS_PIPELINE = TrellisImageTo3DPipeline.from_pretrained("jetx/TRELLIS-image-large")
|
1900 |
TRELLIS_PIPELINE.to(device)
|
1901 |
try:
|
1902 |
TRELLIS_PIPELINE.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8)), 512, True) # Preload rembg
|
requirements.txt
CHANGED
@@ -19,7 +19,7 @@ sentencepiece
|
|
19 |
--extra-index-url https://download.pytorch.org/whl/cu124
|
20 |
torch
|
21 |
torchvision
|
22 |
-
xformers
|
23 |
|
24 |
# Other dependencies
|
25 |
Haishoku
|
@@ -65,13 +65,13 @@ xatlas==0.0.9
|
|
65 |
pyvista==0.44.2
|
66 |
pymeshfix==0.17.0
|
67 |
igraph==0.11.8
|
68 |
-
git+https://github.com/EasternJournalist/utils3d.git@
|
69 |
spconv-cu124==2.3.8
|
70 |
gradio_litmodel3d==0.0.1
|
71 |
#linux only
|
72 |
https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
|
73 |
-
https://huggingface.co/spaces/
|
74 |
-
https://huggingface.co/spaces/
|
75 |
#Windows only
|
76 |
#https://huggingface.co/spaces/Surn/HexaGrid/main/wheels/flash_attn-2.7.4.post1-cp312-cp312-win_amd64.whl?download=true
|
77 |
#https://huggingface.co/spaces/Surn/HexaGrid/main/wheels/diff_gaussian_rasterization-0.0.0-cp312-cp312-win_amd64.whl?download=true
|
|
|
19 |
--extra-index-url https://download.pytorch.org/whl/cu124
|
20 |
torch
|
21 |
torchvision
|
22 |
+
xformers==0.0.29.post3
|
23 |
|
24 |
# Other dependencies
|
25 |
Haishoku
|
|
|
65 |
pyvista==0.44.2
|
66 |
pymeshfix==0.17.0
|
67 |
igraph==0.11.8
|
68 |
+
git+https://github.com/EasternJournalist/utils3d.git@3913c65d81e05e47b9f367250cf8c0f7462a0900
|
69 |
spconv-cu124==2.3.8
|
70 |
gradio_litmodel3d==0.0.1
|
71 |
#linux only
|
72 |
https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
|
73 |
+
https://huggingface.co/spaces/Surn/HexaGrid/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl?download=true
|
74 |
+
https://huggingface.co/spaces/Surn/Hexagrid/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl?download=true
|
75 |
#Windows only
|
76 |
#https://huggingface.co/spaces/Surn/HexaGrid/main/wheels/flash_attn-2.7.4.post1-cp312-cp312-win_amd64.whl?download=true
|
77 |
#https://huggingface.co/spaces/Surn/HexaGrid/main/wheels/diff_gaussian_rasterization-0.0.0-cp312-cp312-win_amd64.whl?download=true
|
utils/file_utils.py
CHANGED
@@ -103,4 +103,23 @@ def get_unique_file_path(directory, filename, file_ext, counter=0):
|
|
103 |
return get_unique_file_path(directory, filename, file_ext, counter + 1)
|
104 |
|
105 |
# Example usage:
|
106 |
-
# new_file_path = get_unique_file_path(video_dir, title_file_name, video_new_ext)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
return get_unique_file_path(directory, filename, file_ext, counter + 1)
|
104 |
|
105 |
# Example usage:
|
106 |
+
# new_file_path = get_unique_file_path(video_dir, title_file_name, video_new_ext)
|
107 |
+
|
108 |
+
def generate_permalink_from_urls(model_url, hm_url, img_url, permalink_viewer_url="surn-3d-viewer.hf.space"):
|
109 |
+
"""
|
110 |
+
Constructs and returns a permalink URL with query string parameters for the viewer.
|
111 |
+
Each parameter is passed separately so that the image positions remain consistent.
|
112 |
+
|
113 |
+
Parameters:
|
114 |
+
model_url (str): Processed URL for the 3D model.
|
115 |
+
hm_url (str): Processed URL for the height map image.
|
116 |
+
img_url (str): Processed URL for the main image.
|
117 |
+
permalink_viewer_url (str): The base viewer URL.
|
118 |
+
|
119 |
+
Returns:
|
120 |
+
str: The generated permalink URL.
|
121 |
+
"""
|
122 |
+
import urllib.parse
|
123 |
+
params = {"3d": model_url, "hm": hm_url, "image": img_url}
|
124 |
+
query_str = urllib.parse.urlencode(params)
|
125 |
+
return f"https://{permalink_viewer_url}/?{query_str}"
|