mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 21:10:58 -05:00
Compare commits
645
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a5e4538a0 | ||
|
|
3f70ca72dd | ||
|
|
d8a4b6c735 | ||
|
|
48ed6d118c | ||
|
|
4c3ac3edda | ||
|
|
dae5764658 | ||
|
|
98547df063 | ||
|
|
9c856235fc | ||
|
|
205f6de1b2 | ||
|
|
a9fa45575e | ||
|
|
1b77974a0e | ||
|
|
724ae2570e | ||
|
|
dc7b5b7e60 | ||
|
|
3259433717 | ||
|
|
bc5d84a306 | ||
|
|
2357f00944 | ||
|
|
24127f20e4 | ||
|
|
4c8f14d4d5 | ||
|
|
e14440ba02 | ||
|
|
7295a3295f | ||
|
|
10176079c7 | ||
|
|
8999a80e92 | ||
|
|
41b07049ff | ||
|
|
b45f6ed691 | ||
|
|
9d16eb05c1 | ||
|
|
b414540251 | ||
|
|
2949456adc | ||
|
|
3a72292898 | ||
|
|
07c640ce84 | ||
|
|
49a15fd1f1 | ||
|
|
3267f9949d | ||
|
|
47df6930d2 | ||
|
|
913d282d60 | ||
|
|
743934ff50 | ||
|
|
bc209fe939 | ||
|
|
302975ddfd | ||
|
|
d7664e8e1c | ||
|
|
9f7fc09e9f | ||
|
|
2686cb94e0 | ||
|
|
fd7f1e1893 | ||
|
|
eb3499596e | ||
|
|
00bfdad3d0 | ||
|
|
ff3821956a | ||
|
|
a5a5f5473b | ||
|
|
7c553ffcee | ||
|
|
52f0b44c26 | ||
|
|
fbed7cd530 | ||
|
|
4ce8752a6a | ||
|
|
3239e318b1 | ||
|
|
471dcff697 | ||
|
|
2af57fcf3e | ||
|
|
f2b0e77210 | ||
|
|
10c8bc1ef3 | ||
|
|
35dfe6a7f2 | ||
|
|
48ecc44978 | ||
|
|
4f0e2d5f72 | ||
|
|
96c99fd102 | ||
|
|
26794b3d2e | ||
|
|
c3a60ed8ab | ||
|
|
13964901f0 | ||
|
|
593fb50fcb | ||
|
|
fff71d7aa4 | ||
|
|
57eecb3757 | ||
|
|
022aa523cb | ||
|
|
6d01506bd1 | ||
|
|
0cc3baee27 | ||
|
|
d5b28d2d3e | ||
|
|
d6a3d4887f | ||
|
|
cce4f5f3b7 | ||
|
|
9123dbc3d9 | ||
|
|
d43a747033 | ||
|
|
c3e5b42bf3 | ||
|
|
25cdbf2f1d | ||
|
|
59f7b6f732 | ||
|
|
fe7251744f | ||
|
|
fdd60b436a | ||
|
|
0836e88f4c | ||
|
|
261978f763 | ||
|
|
d072e021d1 | ||
|
|
66442d9eda | ||
|
|
0f4cab9ca3 | ||
|
|
6de4d451ac | ||
|
|
9d4e426ace | ||
|
|
bfb5103f46 | ||
|
|
3308c05836 | ||
|
|
5a539e589d | ||
|
|
604c72179a | ||
|
|
be19eefa1a | ||
|
|
34e2b1e544 | ||
|
|
95152e9a88 | ||
|
|
cbe8aaa1ba | ||
|
|
11185584a7 | ||
|
|
76559cf783 | ||
|
|
2e7bd622f3 | ||
|
|
68048659d4 | ||
|
|
608e94a6a8 | ||
|
|
9e0bee8fba | ||
|
|
dcec9b9e8a | ||
|
|
3fc0f45942 | ||
|
|
bfd325900f | ||
|
|
1ef7ae1009 | ||
|
|
17d51f8d87 | ||
|
|
ca81d1b543 | ||
|
|
1de3e669d6 | ||
|
|
ac39ac0a76 | ||
|
|
f9caa7d836 | ||
|
|
5f7a10a54c | ||
|
|
e478c73ddf | ||
|
|
92676e842c | ||
|
|
7eee225296 | ||
|
|
1319471c04 | ||
|
|
47e7269880 | ||
|
|
9b83caece1 | ||
|
|
138057e105 | ||
|
|
3e8b6f39fe | ||
|
|
63b4a3180f | ||
|
|
6842794af6 | ||
|
|
a963e5146a | ||
|
|
eb65ed5fa8 | ||
|
|
f6989230be | ||
|
|
2d3f29139a | ||
|
|
a059aa7271 | ||
|
|
8699a9e342 | ||
|
|
48bf168d99 | ||
|
|
f1fd99be15 | ||
|
|
a0b8849806 | ||
|
|
49db299f96 | ||
|
|
b1e87b7d90 | ||
|
|
bb0a4958ef | ||
|
|
4aacc23101 | ||
|
|
536307c162 | ||
|
|
d5c86d1345 | ||
|
|
1900a31541 | ||
|
|
067538f1c2 | ||
|
|
a256681f6d | ||
|
|
03443be19c | ||
|
|
ec03420efc | ||
|
|
bfc8171fa7 | ||
|
|
248ee45d11 | ||
|
|
97be5da1b5 | ||
|
|
d26902911f | ||
|
|
0560a2d607 | ||
|
|
264058ea87 | ||
|
|
b175cc0e65 | ||
|
|
ae781a3e37 | ||
|
|
ee00fbe585 | ||
|
|
82791ec39e | ||
|
|
b6bbc76b18 | ||
|
|
1742827ed9 | ||
|
|
68bc9d0bb0 | ||
|
|
ccc67d43cc | ||
|
|
3845c632b2 | ||
|
|
22518d9164 | ||
|
|
5dbed7afbb | ||
|
|
a485666b1c | ||
|
|
54e9b8af70 | ||
|
|
5a7b0b1bdd | ||
|
|
ee0067161e | ||
|
|
a0f464e454 | ||
|
|
332982faa5 | ||
|
|
c0e142d668 | ||
|
|
ca8dce4805 | ||
|
|
ed1eb9a540 | ||
|
|
0620fa6f98 | ||
|
|
94adc01d62 | ||
|
|
6e76cd3da6 | ||
|
|
5a1fd2679c | ||
|
|
f5c3e12f90 | ||
|
|
0a141ea118 | ||
|
|
dd6c5d1975 | ||
|
|
91dcd1f876 | ||
|
|
1869ead6ad | ||
|
|
1c81874b28 | ||
|
|
c8b79bfb40 | ||
|
|
767d76f831 | ||
|
|
b163791db2 | ||
|
|
d4e8bfb1f8 | ||
|
|
fabc1583ca | ||
|
|
804ab3e4e8 | ||
|
|
cd0e104808 | ||
|
|
a7d794e29b | ||
|
|
eed7dc28f8 | ||
|
|
d4c5710513 | ||
|
|
d8c4df4c02 | ||
|
|
13809ad309 | ||
|
|
95888e683d | ||
|
|
3012dea984 | ||
|
|
ae899d8aca | ||
|
|
dda05ba22c | ||
|
|
63795b2cb6 | ||
|
|
8aa97a6a4f | ||
|
|
e23369761b | ||
|
|
2b27d6fe41 | ||
|
|
c6eefc41ec | ||
|
|
9e3a3b79f9 | ||
|
|
2aa063c354 | ||
|
|
f77d4a636b | ||
|
|
018b05a3a2 | ||
|
|
fd3661e25d | ||
|
|
39de5aba13 | ||
|
|
6354e7c3b4 | ||
|
|
eaa9ddd62d | ||
|
|
195a2eeb9c | ||
|
|
bef5dce947 | ||
|
|
dd3f9c9d3e | ||
|
|
aac31f77ad | ||
|
|
d07a147db9 | ||
|
|
ba76acec35 | ||
|
|
a2c196587f | ||
|
|
8d36d6c709 | ||
|
|
4f5f6cfe51 | ||
|
|
7c59f267fc | ||
|
|
23a6daa144 | ||
|
|
a22038ea31 | ||
|
|
5de40b2dab | ||
|
|
484e6788e3 | ||
|
|
b67cfb5fbe | ||
|
|
d46075a2a3 | ||
|
|
aa9b834f4b | ||
|
|
2abba4b639 | ||
|
|
c42c091b2d | ||
|
|
cde8447a9c | ||
|
|
4306a4763d | ||
|
|
9701e29b58 | ||
|
|
8512846efa | ||
|
|
c7b54e1548 | ||
|
|
8343cf1b65 | ||
|
|
4d4b55d39d | ||
|
|
6b8c1a3106 | ||
|
|
63b3cb8216 | ||
|
|
3d4522126e | ||
|
|
8be1b5afa3 | ||
|
|
11f6995942 | ||
|
|
589d13fdd1 | ||
|
|
3f9160701f | ||
|
|
9e8c27edfd | ||
|
|
6540aed9dc | ||
|
|
7cd570083c | ||
|
|
8787e3ef1e | ||
|
|
49b25cc79d | ||
|
|
eff73a9cff | ||
|
|
d0e3e0f6bb | ||
|
|
e676df0bf4 | ||
|
|
ebed726768 | ||
|
|
e0145f0e70 | ||
|
|
2f3037514f | ||
|
|
f7c636cf58 | ||
|
|
ec4a172929 | ||
|
|
773b96fb35 | ||
|
|
40d0d0d844 | ||
|
|
dbae9803e2 | ||
|
|
87093bf291 | ||
|
|
0b3ea3af2a | ||
|
|
1a75d5b7b3 | ||
|
|
fb5dbae029 | ||
|
|
d2fba4349d | ||
|
|
b76b4460e3 | ||
|
|
5fee53d7c7 | ||
|
|
4f589cd1b7 | ||
|
|
5b9f1551ee | ||
|
|
e47125f12d | ||
|
|
afa050b45e | ||
|
|
ab6986e4b4 | ||
|
|
53626cb312 | ||
|
|
a8810a2db8 | ||
|
|
cb8266d61e | ||
|
|
056065458f | ||
|
|
7cb18d63f2 | ||
|
|
12a119cc1b | ||
|
|
c8d8546c57 | ||
|
|
3265e097c0 | ||
|
|
695d3da34b | ||
|
|
6733a19315 | ||
|
|
baefb9f7d6 | ||
|
|
fc47232e6b | ||
|
|
83dc262249 | ||
|
|
1d3885c367 | ||
|
|
070433b416 | ||
|
|
f15b89cf3d | ||
|
|
699bb6a6a7 | ||
|
|
226f111a00 | ||
|
|
b7794ab48f | ||
|
|
0bd5c9e93b | ||
|
|
5a981f55aa | ||
|
|
3e9581a29d | ||
|
|
ab42870ff1 | ||
|
|
998c8ef49d | ||
|
|
aa8e7597ee | ||
|
|
725d16bbd9 | ||
|
|
f6ee06a72f | ||
|
|
14d028ea8a | ||
|
|
699c49c02f | ||
|
|
b126998ee3 | ||
|
|
1b43433b72 | ||
|
|
1f7dc268a8 | ||
|
|
dda67adc52 | ||
|
|
fa74b9715f | ||
|
|
653a0b26ce | ||
|
|
ab8e9b9134 | ||
|
|
dac67ada23 | ||
|
|
f56530e36b | ||
|
|
3077359165 | ||
|
|
efdb0377f4 | ||
|
|
4e935a1c2b | ||
|
|
063760663f | ||
|
|
176cbcc4be | ||
|
|
359b7a5bd0 | ||
|
|
9f67a3b82d | ||
|
|
eb0e05f61e | ||
|
|
24f6b3c2f6 | ||
|
|
c47bae40d4 | ||
|
|
cf2c246bc2 | ||
|
|
9b89402549 | ||
|
|
f2f2bd465c | ||
|
|
7e9acc6476 | ||
|
|
7d68347f4f | ||
|
|
655f9fad7d | ||
|
|
754581ec70 | ||
|
|
80b7352581 | ||
|
|
dd7bd71587 | ||
|
|
e41f72305b | ||
|
|
fa2a15a4f2 | ||
|
|
eddb71d712 | ||
|
|
71758e6616 | ||
|
|
7afa50ce29 | ||
|
|
14480e50b4 | ||
|
|
b99e4c5edb | ||
|
|
f5b7ad0428 | ||
|
|
ff2713358d | ||
|
|
60ab3565bd | ||
|
|
d4ee7a8673 | ||
|
|
8e15e1e14c | ||
|
|
a8f0947352 | ||
|
|
2600762df2 | ||
|
|
1100fc1a91 | ||
|
|
a538989c57 | ||
|
|
a4524ee679 | ||
|
|
1551a014a4 | ||
|
|
e5afff51a6 | ||
|
|
9a7b746460 | ||
|
|
a63b085086 | ||
|
|
3b40f005d0 | ||
|
|
afc4fbdcb5 | ||
|
|
63008a7fe8 | ||
|
|
902c840833 | ||
|
|
e8a8c6349f | ||
|
|
76a62eaece | ||
|
|
226fb93a36 | ||
|
|
1868170c31 | ||
|
|
7ecdac5151 | ||
|
|
f41833e4f4 | ||
|
|
bd9c4d752f | ||
|
|
7dab1b9ea1 | ||
|
|
512b214fb8 | ||
|
|
21e2eeac68 | ||
|
|
ec7a61a08e | ||
|
|
c195a23425 | ||
|
|
2c61db12d6 | ||
|
|
8bac7ca332 | ||
|
|
56fb99aa81 | ||
|
|
e87091c5cb | ||
|
|
ffb081777d | ||
|
|
e8be6f9775 | ||
|
|
2094ab2fe8 | ||
|
|
596434868c | ||
|
|
14c5f02127 | ||
|
|
ffc018ee18 | ||
|
|
0b7f08e838 | ||
|
|
3a8398a94e | ||
|
|
35e26e7f72 | ||
|
|
3e6b4c43af | ||
|
|
e5289809fd | ||
|
|
b335e1839c | ||
|
|
ce3f83e9af | ||
|
|
e324c6ce44 | ||
|
|
062a80fafa | ||
|
|
986e8b104a | ||
|
|
1e948a51e9 | ||
|
|
f9b7a0e774 | ||
|
|
4db56881c0 | ||
|
|
c11b2f0a94 | ||
|
|
3d9a0cfcc1 | ||
|
|
b019968ce1 | ||
|
|
31c88d6d64 | ||
|
|
a601998fa5 | ||
|
|
c1ccfb419a | ||
|
|
d9a1fcf989 | ||
|
|
839b33425a | ||
|
|
8017fef05a | ||
|
|
0534db0033 | ||
|
|
ef53568dcf | ||
|
|
72c5c99a1c | ||
|
|
0b0a9c428c | ||
|
|
a9f0b1d485 | ||
|
|
76dc39df16 | ||
|
|
79d8af8bf4 | ||
|
|
b1d69ba9ac | ||
|
|
ffcf460291 | ||
|
|
f0a8b6d175 | ||
|
|
e3a5d68fcc | ||
|
|
877b95a00c | ||
|
|
20e32ff3e3 | ||
|
|
97a6f6e4ff | ||
|
|
cf27fca799 | ||
|
|
5eab05753f | ||
|
|
385e1e53c1 | ||
|
|
039e61499f | ||
|
|
9dd91ce7cc | ||
|
|
a75c1f391a | ||
|
|
d833b3babd | ||
|
|
1427e3eecd | ||
|
|
45990f5631 | ||
|
|
5653a918c0 | ||
|
|
8172774a98 | ||
|
|
6189d6fe9d | ||
|
|
395940ef34 | ||
|
|
85cfc0cf2e | ||
|
|
93e066e70b | ||
|
|
5cb79a5a33 | ||
|
|
6b06a825f3 | ||
|
|
d653260ee5 | ||
|
|
c8530e186e | ||
|
|
aee52c04ff | ||
|
|
cd91acb4a8 | ||
|
|
d591472478 | ||
|
|
c14073f06d | ||
|
|
edde256ff6 | ||
|
|
c6bcd25b19 | ||
|
|
82c1563459 | ||
|
|
866ed89d9c | ||
|
|
ac4ffb4f34 | ||
|
|
41fe0866d4 | ||
|
|
de3e2e8924 | ||
|
|
800c9bd9d5 | ||
|
|
1fe62a2570 | ||
|
|
f293b56089 | ||
|
|
a0a2d1434f | ||
|
|
8ba1d9f303 | ||
|
|
a11779e3aa | ||
|
|
5c46fd7c60 | ||
|
|
09e26164b8 | ||
|
|
8c24b0c755 | ||
|
|
83ae73d8d0 | ||
|
|
1d0db0eeb9 | ||
|
|
04581d06ee | ||
|
|
a31ecc01ab | ||
|
|
be20e105ea | ||
|
|
67864f3db2 | ||
|
|
10c277d9cf | ||
|
|
c6e4c2e274 | ||
|
|
a3815ad64d | ||
|
|
8cd48fcf58 | ||
|
|
523c02326b | ||
|
|
37eef276a0 | ||
|
|
f5cbedb230 | ||
|
|
6994a9c2ce | ||
|
|
213742ff29 | ||
|
|
df4f1e6a6c | ||
|
|
64fa281bc1 | ||
|
|
bd386aa70b | ||
|
|
28875c9272 | ||
|
|
a79bfc7a24 | ||
|
|
ecca8ff17c | ||
|
|
a3cabf6779 | ||
|
|
dd35a7cca9 | ||
|
|
f876cac4cf | ||
|
|
d2b840cb13 | ||
|
|
85bac00194 | ||
|
|
367a516f89 | ||
|
|
5fe85072a2 | ||
|
|
5867d2356c | ||
|
|
275333c1ed | ||
|
|
5ec2cde68f | ||
|
|
daf5a63f86 | ||
|
|
2fe3d5dc99 | ||
|
|
44df952bd1 | ||
|
|
5bf98f70d9 | ||
|
|
af685b37cf | ||
|
|
0f7ff50cf6 | ||
|
|
1ae8d8d615 | ||
|
|
63c0124267 | ||
|
|
17e8c1942e | ||
|
|
cf24a07bba | ||
|
|
9ece30722f | ||
|
|
9ab977d016 | ||
|
|
ebd3f52717 | ||
|
|
35a75e144a | ||
|
|
4b145a7419 | ||
|
|
eb539e9142 | ||
|
|
37604cdd7b | ||
|
|
f724031aa3 | ||
|
|
b8b10f6fc1 | ||
|
|
bd4bcab2c2 | ||
|
|
caa3e3ae53 | ||
|
|
7cd8099ab5 | ||
|
|
6ec39b9c68 | ||
|
|
c8b4b7daa0 | ||
|
|
a294549d02 | ||
|
|
33ff75274f | ||
|
|
945e5226c5 | ||
|
|
85a52cd26e | ||
|
|
32ee4209da | ||
|
|
f94cdac47d | ||
|
|
a2ea870ac7 | ||
|
|
a2c48d7469 | ||
|
|
fe3dd7d66b | ||
|
|
88fae4ba89 | ||
|
|
6505e67bf2 | ||
|
|
3453fe0e3b | ||
|
|
8b36d870d1 | ||
|
|
9555ac51fe | ||
|
|
f00b4011b5 | ||
|
|
d1d208d714 | ||
|
|
a5ce9a3cc4 | ||
|
|
6ad2468e59 | ||
|
|
c59695343f | ||
|
|
52a83609b6 | ||
|
|
f710b68a3e | ||
|
|
3d63e34ca1 | ||
|
|
4a1f1441bf | ||
|
|
ee90f03436 | ||
|
|
1858aea619 | ||
|
|
592ba627be | ||
|
|
f754c6e41f | ||
|
|
54af3d301c | ||
|
|
22eeacf355 | ||
|
|
630aa497f3 | ||
|
|
6e9c05c596 | ||
|
|
3f781ad98f | ||
|
|
5d038fdf8f | ||
|
|
a09acf7c53 | ||
|
|
3ba64618c3 | ||
|
|
73e583c7ed | ||
|
|
1d7a54f640 | ||
|
|
552fae54a7 | ||
|
|
4d2ae85fd9 | ||
|
|
76775dec60 | ||
|
|
22bc8d54a0 | ||
|
|
878bff867a | ||
|
|
05d5bfc1a7 | ||
|
|
3acdd0b5e2 | ||
|
|
1a7a74ee8a | ||
|
|
820f4ebc32 | ||
|
|
423fb369db | ||
|
|
2a58079289 | ||
|
|
b2df674178 | ||
|
|
1fd33e76b4 | ||
|
|
824683b974 | ||
|
|
4bed11d21d | ||
|
|
13bdcbdda6 | ||
|
|
f49c724303 | ||
|
|
a9502c183b | ||
|
|
b469a237ce | ||
|
|
0df93c48c3 | ||
|
|
070c192633 | ||
|
|
75a68c7e0f | ||
|
|
b2db079cf5 | ||
|
|
6658281a1c | ||
|
|
8cb04f1dcb | ||
|
|
58f6ee68df | ||
|
|
d0cef7bec9 | ||
|
|
8eed406fbd | ||
|
|
44586c4cee | ||
|
|
02f5aacb8e | ||
|
|
001ff86ed3 | ||
|
|
94b406eca2 | ||
|
|
f8bdea1b3b | ||
|
|
8a37a7240c | ||
|
|
a4c1abfe9c | ||
|
|
6bb7a18676 | ||
|
|
a8173226ea | ||
|
|
692c3f64b6 | ||
|
|
4842b9bbc1 | ||
|
|
a507f8bc38 | ||
|
|
24f2c07199 | ||
|
|
e871dde078 | ||
|
|
47ff379018 | ||
|
|
cdb0f37889 | ||
|
|
6d7c3c6e5f | ||
|
|
7b72d51bd3 | ||
|
|
11a9e1249c | ||
|
|
f3a6ddb70a | ||
|
|
d2aa07228b | ||
|
|
a2c3668beb | ||
|
|
15d66a4530 | ||
|
|
75523811e4 | ||
|
|
4672102da4 | ||
|
|
ca59189dd9 | ||
|
|
3564c1b459 | ||
|
|
78263e3c49 | ||
|
|
e36fb66e05 | ||
|
|
1540d87018 | ||
|
|
61f0869359 | ||
|
|
d23c7abfeb | ||
|
|
2d59891dee | ||
|
|
2f86bc75ac | ||
|
|
8c5fb0bee2 | ||
|
|
b9f0d7749d | ||
|
|
b2caa3758a | ||
|
|
de656d4d74 | ||
|
|
c803232a52 | ||
|
|
cd9b0080dd | ||
|
|
6885eb5fc9 | ||
|
|
100ad0da35 | ||
|
|
7010d56bc3 | ||
|
|
b34371eef0 | ||
|
|
e6542438b5 | ||
|
|
287e3e5f0c | ||
|
|
8fcb908af9 | ||
|
|
56e84f434f | ||
|
|
925f2d78ae | ||
|
|
90219594bb | ||
|
|
08e8560499 | ||
|
|
9e38b9a2fc | ||
|
|
e9a6320eab | ||
|
|
da05885d7d | ||
|
|
ba9f716ff8 | ||
|
|
2633c5f0ef | ||
|
|
da805b4f1d | ||
|
|
9eb75c7eba | ||
|
|
75607b3c12 | ||
|
|
ce69b1b055 | ||
|
|
9ee7fdbac5 | ||
|
|
67e3ecebc1 | ||
|
|
52db0b7796 | ||
|
|
15fa5a2bee | ||
|
|
32babc99f0 | ||
|
|
bdac796e51 | ||
|
|
18c50af218 | ||
|
|
62cbde94bc | ||
|
|
b2f9b44e96 | ||
|
|
6a48a5372c | ||
|
|
1b0368664a | ||
|
|
6a83524fd9 | ||
|
|
233247f3c0 | ||
|
|
60045a01d0 | ||
|
|
dc5dfd9831 | ||
|
|
7b36fc0b98 | ||
|
|
92e1d10809 | ||
|
|
4a486cedd2 | ||
|
|
004cde84a7 | ||
|
|
61b74500d8 | ||
|
|
8285826ed0 | ||
|
|
03d0110ee6 | ||
|
|
34517fbaff |
@@ -75,3 +75,8 @@ TTS_HIFIGAN_SUPERRES_VOCODER_MODEL_FILENAME=hifigan_superres_twilight_33000.pt
|
||||
|
||||
# Development key. Permissible to check in.
|
||||
NEWRELIC_API_KEY=c402be1c4c4216ec83d0cfc0851520cfFFFFNRAL
|
||||
|
||||
STORYTELLER_ROOT = "/home/tensor/code/storyteller" # your path here!
|
||||
STORYTELLER_FRONTEND = "storyteller-frontend"
|
||||
STORYTELLER_ML = "storyteller-ml"
|
||||
STORYTELLER_RUST = "storyteller-rust"
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
# Ignore certain code for Github language statistics
|
||||
# https://github.com/github/linguist/blob/master/docs/overrides.md
|
||||
old_code/trumpet-trumped.com/dictionary/cmudict-0.7b linguist-vendored
|
||||
old_code/voder-vocodes-1.0/frontends/admin/node_modules linguist-vendored
|
||||
windows/sqlite linguist-vendored
|
||||
old_code/voder-vocodes-1.0/frontends/admin/node_modules/** linguist-vendored
|
||||
test_data/html_scraping/** linguist-vendored
|
||||
windows/sqlite/** linguist-vendored
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -2,7 +2,7 @@
|
||||
# https://github.com/actions/starter-workflows/ci/docker-publish.yml
|
||||
# If using base images, don't forget to add READ access, eg. from a package settings page like:
|
||||
# https://github.com/orgs/storytold/packages/container/docker-base-images-rust-ssl/settings/actions_access
|
||||
name: Publish Docker Container to GHCR
|
||||
name: "[CPU] Build GHCR Docker artifact"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -19,7 +19,9 @@ jobs:
|
||||
# See also https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching
|
||||
build-docker-image:
|
||||
name: "Build Docker Image"
|
||||
runs-on: ubuntu-22.04 # runs-on: ubuntu-latest
|
||||
#runs-on: ubuntu-22.04 # runs-on: ubuntu-latest
|
||||
#runs-on: github-ubuntu-16core # NB: Premium GitHub runner with more cores
|
||||
runs-on: github-ubuntu-64core # NB: Premium GitHub runner with more cores
|
||||
if: github.event_name == 'push'
|
||||
permissions:
|
||||
packages: write
|
||||
@@ -64,6 +66,7 @@ jobs:
|
||||
username: ${{ github.actor }} # username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image_name: storytold/storyteller-rust
|
||||
dockerfile: service_cpu.Dockerfile
|
||||
# NB: The `git_push_tag: true` option does not work as expected, so we put the sha in `image_tag`:
|
||||
# https://github.com/whoan/docker-build-with-cache-action/issues/72
|
||||
image_tag: latest,${{ github.sha }},${{ steps.vars.outputs.sha_short }}
|
||||
@@ -0,0 +1,115 @@
|
||||
# Adapted from
|
||||
# https://github.com/actions/starter-workflows/ci/docker-publish.yml
|
||||
# If using base images, don't forget to add READ access, eg. from a package settings page like:
|
||||
# https://github.com/orgs/storytold/packages/container/docker-base-images-rust-ssl/settings/actions_access
|
||||
name: "[GPU] Build GHCR Docker artifact"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
# NB: Default-branch doesn't work, despite Github's documentation.
|
||||
#- $default-branch
|
||||
- master
|
||||
env:
|
||||
IMAGE_NAME: storyteller-rust-gpu
|
||||
|
||||
jobs:
|
||||
# Push image to GitHub Packages.
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
# See also https://depot.dev/blog/docker-layer-caching-in-github-actions
|
||||
# See also https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching
|
||||
build-docker-image:
|
||||
name: "Build Docker Image"
|
||||
#runs-on: ubuntu-22.04 # runs-on: ubuntu-latest
|
||||
#runs-on: github-ubuntu-16core # NB: Premium GitHub runner with more cores
|
||||
runs-on: github-ubuntu-64core # NB: Premium GitHub runner with more cores
|
||||
if: github.event_name == 'push'
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# - uses: docker/setup-buildx-action@v1
|
||||
# name: Set up Docker Buildx
|
||||
|
||||
- uses: docker/login-action@v1
|
||||
name: Login to GitHub Container Registry
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }} # username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Calculate short SHA
|
||||
id: vars
|
||||
# echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
echo "sha_short=$(echo ${{ github.sha }} | cut -c1-12)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Emit short SHA
|
||||
run: |
|
||||
echo "Full SHA: ${{ github.sha }}"
|
||||
echo "Short SHA: ${{ steps.vars.outputs.sha_short }}"
|
||||
|
||||
#- uses: actions/cache@v2
|
||||
# name: Cache Docker layers
|
||||
# with:
|
||||
# path: /tmp/.buildx-cache
|
||||
# key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-buildx-
|
||||
|
||||
# Docs for this action are at https://github.com/marketplace/actions/build-docker-images-using-cache
|
||||
- uses: whoan/docker-build-with-cache-action@v6
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }} # username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image_name: storytold/storyteller-rust-gpu
|
||||
dockerfile: service_gpu.Dockerfile
|
||||
# NB: The `git_push_tag: true` option does not work as expected, so we put the sha in `image_tag`:
|
||||
# https://github.com/whoan/docker-build-with-cache-action/issues/72
|
||||
image_tag: latest,${{ github.sha }},${{ steps.vars.outputs.sha_short }}
|
||||
# NB: Inject the Git SHA into the container so the servers can emit their own version:
|
||||
build_extra_args: "--build-arg=GIT_SHA=${{ github.sha }}"
|
||||
|
||||
# - name: Build image
|
||||
# run: |
|
||||
# SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-12)
|
||||
# docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" --build-arg GIT_SHA=${SHORT_SHA}
|
||||
|
||||
# - name: Push image to GitHub Container Registry
|
||||
# run: |
|
||||
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
||||
|
||||
# # Change all uppercase to lowercase
|
||||
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# # Strip git ref prefix from version
|
||||
# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
|
||||
# # Strip "v" prefix from tag name
|
||||
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
# # Use Docker `latest` tag convention
|
||||
# [ "$VERSION" == "$default-branch" ] && VERSION=latest
|
||||
|
||||
# echo IMAGE_ID=$IMAGE_ID
|
||||
# echo VERSION=$VERSION
|
||||
|
||||
# docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
# docker push $IMAGE_ID:$VERSION
|
||||
|
||||
# SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-12)
|
||||
|
||||
# docker tag $IMAGE_NAME $IMAGE_ID:$SHORT_SHA
|
||||
# docker push $IMAGE_ID:$SHORT_SHA
|
||||
|
||||
- name: Cleanup / Debug
|
||||
# This job will run even on failures to help with debugging.
|
||||
if: always()
|
||||
run: |
|
||||
echo "Report at final github action step:"
|
||||
echo "Disk usage:"
|
||||
pwd
|
||||
du -hsc * | sort -hr
|
||||
@@ -13,6 +13,7 @@ secrets.yaml
|
||||
_develop/tools/.secrets
|
||||
_develop/tools/db_secrets.toml
|
||||
twitch_secrets.toml
|
||||
crates/service/web/storyteller_web/config/storyteller-web.development-secrets.env
|
||||
|
||||
# New env secrets (per-app)
|
||||
*-secrets.env
|
||||
|
||||
Generated
+13
@@ -3,12 +3,19 @@
|
||||
<words>
|
||||
<w>arpabet</w>
|
||||
<w>backfill</w>
|
||||
<w>canonicalized</w>
|
||||
<w>canonicalizing</w>
|
||||
<w>cashapp</w>
|
||||
<w>cheermote</w>
|
||||
<w>cidrs</w>
|
||||
<w>crockford</w>
|
||||
<w>culted</w>
|
||||
<w>dalle</w>
|
||||
<w>demuxer</w>
|
||||
<w>dereferencing</w>
|
||||
<w>downloaders</w>
|
||||
<w>downvote</w>
|
||||
<w>encodec</w>
|
||||
<w>fakeyou</w>
|
||||
<w>ffprobe</w>
|
||||
<w>greenlight</w>
|
||||
@@ -18,15 +25,21 @@
|
||||
<w>hifigan</w>
|
||||
<w>hparams</w>
|
||||
<w>huggingface</w>
|
||||
<w>lipsync</w>
|
||||
<w>mochi</w>
|
||||
<w>nestedness</w>
|
||||
<w>pathbuf</w>
|
||||
<w>replayable</w>
|
||||
<w>retryably</w>
|
||||
<w>scrollback</w>
|
||||
<w>softvc</w>
|
||||
<w>sql's</w>
|
||||
<w>symphonia</w>
|
||||
<w>tacotron</w>
|
||||
<w>techcrunch</w>
|
||||
<w>transcoded</w>
|
||||
<w>transcodings</w>
|
||||
<w>unpermitted</w>
|
||||
<w>upserting</w>
|
||||
<w>vits</w>
|
||||
<w>vocoded</w>
|
||||
|
||||
Generated
+1157
-2232
File diff suppressed because it is too large
Load Diff
+21
-9
@@ -11,42 +11,52 @@ members = [
|
||||
# CLI tools for operations, etc.
|
||||
"crates/cli/database_backup",
|
||||
"crates/cli/database_cleanup",
|
||||
"crates/cli/dev_database_seed",
|
||||
"crates/cli/dev_upload_media_file",
|
||||
"crates/cli/kubectl_pod_cleanup",
|
||||
"crates/cli/scrape_test",
|
||||
|
||||
# Shared libraries
|
||||
"crates/lib/actix_helpers",
|
||||
"crates/lib/api_clients/cloud_storage",
|
||||
"crates/lib/api_clients/fakeyou_client",
|
||||
"crates/lib/api_clients/google_drive_common",
|
||||
"crates/lib/api_clients/twitch_common",
|
||||
"crates/lib/bootstrap",
|
||||
"crates/lib/caching/memory_caching",
|
||||
"crates/lib/caching/redis_caching",
|
||||
"crates/lib/concurrency",
|
||||
"crates/lib/cookies",
|
||||
"crates/lib/crockford",
|
||||
"crates/lib/datetimes",
|
||||
"crates/lib/deprecated/config", # TODO(bt, 2023-02-13): Deprecate or repurpose
|
||||
"crates/lib/deprecated/container_common", # TODO(bt, 2023-02-13): Pull apart and rehome pieces
|
||||
"crates/lib/deprecated/http_server_common", # TODO(bt, 2023-03-20): Move useful pieces to actix_helpers
|
||||
"crates/lib/envvar",
|
||||
"crates/lib/easyenv", # NB: Vendored version of https://github.com/echelon/easyenv.rs that we'll improve.
|
||||
"crates/lib/errors",
|
||||
"crates/lib/files",
|
||||
"crates/lib/filesys",
|
||||
"crates/lib/hashing",
|
||||
"crates/lib/files/archives",
|
||||
"crates/lib/files/filesys",
|
||||
"crates/lib/files/hashing",
|
||||
"crates/lib/files/images",
|
||||
"crates/lib/files/media",
|
||||
"crates/lib/files/mimetypes",
|
||||
"crates/lib/idempotency",
|
||||
"crates/lib/jobs_common",
|
||||
"crates/lib/media",
|
||||
"crates/lib/mysql_queries",
|
||||
"crates/lib/redis_common",
|
||||
"crates/lib/sqlite_queries",
|
||||
"crates/lib/server_environment",
|
||||
"crates/lib/sqlx_mysql_helpers",
|
||||
"crates/lib/storyteller_root",
|
||||
"crates/lib/subprocess_common",
|
||||
"crates/lib/testing",
|
||||
"crates/lib/tts_common",
|
||||
"crates/lib/url_config",
|
||||
"crates/lib/user_input_common",
|
||||
"crates/lib/web_scrapers",
|
||||
#"crates/lib/api_clients/fakeyou_client",
|
||||
#"crates/lib/sqlite_queries",
|
||||
|
||||
# Programs: Desktop apps
|
||||
"crates/programs/aichatbot-sidecar",
|
||||
#"crates/programs/aichatbot-sidecar",
|
||||
|
||||
# Services: API servers, jobs, workers, etc.
|
||||
"crates/service/job/analytics_job",
|
||||
@@ -58,7 +68,6 @@ members = [
|
||||
"crates/service/job/w2l_inference_job",
|
||||
"crates/service/other/twitch_pubsub_subscriber",
|
||||
"crates/service/web/dummy_service",
|
||||
"crates/service/web/image_generation_service",
|
||||
"crates/service/web/storyteller_web",
|
||||
"crates/service/web/websocket_gateway",
|
||||
|
||||
@@ -66,4 +75,7 @@ members = [
|
||||
"crates/service/plugins/billing",
|
||||
"crates/service/plugins/inference_workloads",
|
||||
"crates/service/plugins/users",
|
||||
|
||||
# Vendored code
|
||||
"crates/vendor/newrelic-telemetry-sdk-rust",
|
||||
]
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
# Persist clippy check configurations:
|
||||
# https://github.com/ericseppanen/cargo-cranky
|
||||
# Clippy doesn't allow this (yet):
|
||||
# https://github.com/rust-lang/rust-clippy/issues/6625
|
||||
deny = [
|
||||
# Rust
|
||||
"unsafe_code", # We may remove this if needed
|
||||
|
||||
# Clippy - "serious" lints
|
||||
"clippy::borrow_interior_mutable_const", # Seems dangerous to allow this. Eg. `const F = Lazy::new()`;
|
||||
|
||||
# Clippy - bad math
|
||||
#"clippy::cast_possible_truncation", # Seems dangerous, eg f64 to u64.
|
||||
#"clippy::cast_possible_wrap",
|
||||
|
||||
# Clippy - pointer safety / readability / correctness
|
||||
"clippy::as_ptr_cast_mut",
|
||||
"clippy::borrow_as_ptr",
|
||||
"clippy::borrow_deref_ref",
|
||||
|
||||
# Clippy - performance
|
||||
"clippy::cmp_owned",
|
||||
"clippy::useless_vec",
|
||||
"clippy::format_in_format_args",
|
||||
#"clippy::redundant_clone",
|
||||
#"clippy::unnecessary_to_owned",
|
||||
#"clippy::vec_init_then_push",
|
||||
|
||||
# Clippy - "ergonomic" / "usage" lints
|
||||
"clippy::option_option", # Lint: Don't ever Option<Option<T>>! Enums instead.
|
||||
"clippy::zero_sized_map_values", # Lint: use a HashSet instead of HashMap<T, ()>.
|
||||
|
||||
# Clippy - "aesthetic" / "style" lints
|
||||
"clippy::clone_double_ref", # Lint: feels safer/hygienic to disallow this, but I'm not strongly opposed.
|
||||
"clippy::double_comparisons", # Lint: readability
|
||||
"clippy::empty_structs_with_brackets", # Lint: {} feels less aesthetic than ;
|
||||
"clippy::implicit_clone", # Lint: Recommendation here seems more idiomatic.
|
||||
"clippy::needless_return", # Lint: not the worst offender, but let's try to keep unnecessary returns out.
|
||||
"clippy::redundant_field_names", # Lint: Duplicate names is a burden when reading: you wonder why they're dupes.
|
||||
"clippy::redundant_static_lifetimes", # Lint: feels more modern to elide static lifetimes
|
||||
|
||||
# Rust
|
||||
"unused_imports", # These are easy to automatically cull
|
||||
|
||||
# Possible:
|
||||
# "clippy::ptr_arg",
|
||||
# "clippy::too_many_lines" (note: this is configurable)
|
||||
]
|
||||
|
||||
warn = [
|
||||
]
|
||||
|
||||
allow = [
|
||||
# Rust
|
||||
"deprecated", # Other systems can handle deprecated code instead of the linter
|
||||
"missing_docs", # Not everything needs documentation. Too much documentation is bad. Literate code.
|
||||
|
||||
# Clippy
|
||||
"clippy::if_same_then_else", # There are cases this is clearer! Branches may have notes / considerations.
|
||||
"clippy::single_char_pattern", # This is like punishing trailing commas. Chars are dumb.
|
||||
]
|
||||
@@ -43,4 +43,7 @@ Our Rust monorepo, which serves both our API surface area and our downloadable c
|
||||
.' /"' | "' '_ One Rust Monorepo at a time
|
||||
/_|.-'\ ,". '.'`__'-( \
|
||||
/ ,"'"\,' `/ `-.|"
|
||||
```
|
||||
```
|
||||
|
||||
- [documentation](./_develop/docs)
|
||||
- [tools, misc](./_develop)
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
README
|
||||
======
|
||||
|
||||
This directory contains a collection of (hopefully organized and up to date) documentation on
|
||||
running the various backend pieces, development setup, production maintenance, etc. Check out
|
||||
all the markdown documents in this directory tree for information organized by topic.
|
||||
|
||||
Development / Setup
|
||||
-------------------
|
||||
|
||||
- [Most of the general documents for cross-cutting setup of FakeYou.com live here.](./local_development)
|
||||
- Some per-application documents (such as for `aichatbot-sidecar`) live as READMEs under that particular
|
||||
application's code directory, eg. `/crates/{appCategory}/{appName}/README.md` (These are irrelevant
|
||||
for most folks.)
|
||||
|
||||
Web API Overview
|
||||
----------------
|
||||
|
||||
### FakeYou.com
|
||||
|
||||
* [FakeYou.com](https://fakeyou.com) is powered by the following applications:
|
||||
* HTTP APIs:
|
||||
* `storyteller-web` - HTTP API + database monolith for FakeYou
|
||||
* Asynchronous Jobs:
|
||||
* `download-job` - Handle async download of ML models (RVC, SVC, etc.)
|
||||
* `inference-job` - Run async ML model inference (RVC, SVC, SadTalker, etc.)
|
||||
This will handle most model inference going forward.
|
||||
* `tts-download-job` - (*deprecated*) Async download of Tacotron2 models only
|
||||
* `tts-inference-job` - (*deprecated*) Async TTS inference of Tacotron2 models only
|
||||
* `w2l-download-job` - (*deprecated*) Async download of videos and images
|
||||
* `w2l-inference-job` - (*deprecated*) Async W2L inference
|
||||
|
||||
### PowerStream
|
||||
|
||||
* [PowerStream](https://power.stream) (deprecated) is powered by the following applications:
|
||||
* HTTP APIs:
|
||||
* `storyteller-web` - HTTP + database monolith for FakeYou ***and*** PowerStream.
|
||||
* Twitch API integration:
|
||||
* `twitch-pubsub-subscriber` - Dynamically subscribes to Twitch PubSub for "active" users
|
||||
* Websocket events:
|
||||
* `websocket-gateway` - Websocket for users' browsers to pull down enriched Twitch events.
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
Notes / TODOs:
|
||||
|
||||
* Examples for good Actix+Sqlx Tests:
|
||||
https://stackoverflow.com/questions/65370752/how-do-i-create-an-actix-web-server-that-accepts-both-sqlx-database-pools-and-tr
|
||||
|
||||
* Actix/sqlx runtime compat:
|
||||
https://github.com/launchbadge/sqlx/issues/1117#issuecomment-801237734
|
||||
@@ -1,38 +0,0 @@
|
||||
AI Chatbot Sidecar
|
||||
==================
|
||||
|
||||
This is the first app that doesn't run as a part of our SoA API architecture. (Though it is written such that we
|
||||
could port it.) This app is responsible for generating all the content that goes into our streaming AI-powered TV
|
||||
programs.
|
||||
|
||||
### Windows Installation
|
||||
|
||||
The application uses sqlite, which is tricky to install on Windows.
|
||||
|
||||
1. Put together an sqlite build directory containing the sources and dll file. One is checked in under this monorepo
|
||||
in `./windows/sqlite` at the time of this writing, though that may change in the future.
|
||||
|
||||
|
||||
2. Add environment variables for the sqlite build directory (see https://github.com/diesel-rs/diesel/issues/487)
|
||||
|
||||
* PATH (append the sqlite build directory to the end)
|
||||
* SQLITE3_LIB_DIR (a new environment variable; set it to the sqllite build path)
|
||||
|
||||
|
||||
3. Build the `sqlite3.lib` file with the following:
|
||||
|
||||
```
|
||||
lib /def:sqlite3.def /out:sqlite3.lib /MACHINE:amd64
|
||||
```
|
||||
|
||||
This must be done in "Developer Command Prompt for VS 2022" (or similar), not `cmd` or `PowerShell`.
|
||||
|
||||
|
||||
4. Run the diesel_cli tool build
|
||||
```
|
||||
cargo install diesel_cli --no-default-features --features sqlite
|
||||
```
|
||||
|
||||
If it still complains about the `sqlite3.lib` file not being found, be sure to double check that `echo %PATH%` shows
|
||||
the updated PATH from the steps above.
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
Migrations guide
|
||||
================
|
||||
|
||||
## Diesel Migrations
|
||||
|
||||
To run pending migrations, execute the following:
|
||||
|
||||
```bash
|
||||
diesel migration run
|
||||
```
|
||||
|
||||
To revert the last 3 migrations:
|
||||
|
||||
```bash
|
||||
diesel migration revert -n 3
|
||||
```
|
||||
|
||||
To reset the entire database (drop, migrate), run:
|
||||
|
||||
```bash
|
||||
diesel database reset
|
||||
```
|
||||
|
||||
## Server Query Codegen
|
||||
|
||||
We use SQLx instead of Diesel in the production server. It's typesafe
|
||||
SQL instead of an ORM like Diesel.
|
||||
|
||||
SQLx connects to a database to derive type information, but obviously
|
||||
cannot do this for builds in CI. In order to cache the types, we build
|
||||
and check in a cache file (necessary for builds):
|
||||
|
||||
```bash
|
||||
SQLX_OFFLINE=true cargo sqlx prepare
|
||||
```
|
||||
|
||||
Now that we have multiple binaries, it's required to include all the queries in the main
|
||||
binary so we can generate the cached queries as a single target. That's then executed
|
||||
with:
|
||||
|
||||
```bash
|
||||
SQLX_OFFLINE=true cargo sqlx prepare -- --bin storyteller-web
|
||||
```
|
||||
@@ -0,0 +1,216 @@
|
||||
FakeYou Development Setup (bare metal)
|
||||
======================================
|
||||
|
||||
Set your Environment .env File with the following paths, copy this in
|
||||
The root path and the folders associated with the path.
|
||||
This will change the base paths for development.
|
||||
STORYTELLER_ROOT = "/home/tensor/code/storyteller" # change this
|
||||
STORYTELLER_FRONTEND = "storyteller-frontend"
|
||||
STORYTELLER_ML = "storyteller-ml"
|
||||
STORYTELLER_RUST = "storyteller-rust"
|
||||
|
||||
This document describes how to run the FakeYou infrastructure on your development
|
||||
machine's bare metal (no containers).
|
||||
|
||||
Setup instructions and development were tested and known to work on the following
|
||||
platforms:
|
||||
|
||||
- Mac OS (Apple M2 silicon)
|
||||
- Ubuntu 22.04
|
||||
|
||||
The applications (binary targets) you might be interested in running include, but
|
||||
are not limited to:
|
||||
|
||||
- `storyteller-web`, the HTTP API server
|
||||
- `download-job`, which downloads models from the web and stores them in GCS
|
||||
- `inference-job`, which downloads models from GCS and runs inference with them
|
||||
|
||||
Setup Instructions
|
||||
------------------
|
||||
|
||||
### (1) Install Rust
|
||||
|
||||
Install Rust [using this guide](https://www.rust-lang.org/learn/get-started). If it asks,
|
||||
you'll want "stable" Rust, not "nightly" Rust. If it doesn't ask, it defaults to "stable".
|
||||
|
||||
### (2) Install the necessary libraries
|
||||
|
||||
Mac: (Lost the list, but it should match Linux. Install Homebrew.)
|
||||
|
||||
Ubuntu 22.04:
|
||||
|
||||
```bash
|
||||
sudo apt install jq \
|
||||
libmysqlclient-dev \
|
||||
libsqlite3-dev \
|
||||
pkgconf
|
||||
```
|
||||
|
||||
(Note: jq is for combining mysql codegen outputs; pkgconf is if using openssl instead of rustls.)
|
||||
|
||||
### (3) Install MySQL server
|
||||
|
||||
Mac:
|
||||
|
||||
```bash
|
||||
brew install mysql
|
||||
```
|
||||
|
||||
If `mysql -uroot` fails, reboot the machine:
|
||||
|
||||
```bash
|
||||
sudo reboot now
|
||||
```
|
||||
|
||||
Ubuntu 22.04:
|
||||
|
||||
```bash
|
||||
sudo apt install mysql-server
|
||||
```
|
||||
|
||||
|
||||
### (4) Install a `storyteller` user and table in MySQL
|
||||
|
||||
Connect to mysql:
|
||||
|
||||
```bash
|
||||
# If the following command asks for a password, the password is typically "root"
|
||||
sudo mysql -u root -p
|
||||
```
|
||||
|
||||
Once in MySQL, run the following:
|
||||
|
||||
```mysql
|
||||
use mysql;
|
||||
CREATE DATABASE storyteller;
|
||||
CREATE USER 'storyteller'@'localhost' IDENTIFIED BY 'password';
|
||||
GRANT ALL PRIVILEGES ON storyteller.* TO 'storyteller'@'localhost';
|
||||
```
|
||||
|
||||
Then verify access with `./dev_mysql_connect.sh`
|
||||
|
||||
### (5) Install Diesel CLI (for MySQL migrations):
|
||||
|
||||
```bash
|
||||
cargo install diesel_cli \
|
||||
--no-default-features \
|
||||
--features mysql,sqlite
|
||||
```
|
||||
|
||||
As of this writing, Mac [has some issues with Diesel CLI](https://github.com/diesel-rs/diesel/issues/2605)
|
||||
and requires a few extra dependencies to be installed:
|
||||
|
||||
```bash
|
||||
brew install libpq
|
||||
```
|
||||
|
||||
### (6) Run the pending database migrations:
|
||||
|
||||
```bash
|
||||
diesel migration run
|
||||
```
|
||||
|
||||
You might get a scary message about `"Encountered unknown type for Mysql: enum"` -- you can ignore this
|
||||
error (see below).
|
||||
|
||||
### (7) (optional) Install the SQLx CLI (if doing database development)
|
||||
|
||||
```bash
|
||||
# NB(bt,2023-10-04): "--no-default-features" not working
|
||||
# cargo install sqlx-cli --no-default-features --features rustls,mysql,sqlite
|
||||
cargo install sqlx-cli --features rustls,mysql,sqlite
|
||||
```
|
||||
|
||||
We'll be using diesel to manage the migrations, but sqlx within the app to actually perform queries.
|
||||
Diesel is an immature ORM, which isn't a good tech bet, so we use sqlx as at-compile-time
|
||||
typesafe SQL.
|
||||
|
||||
### (8) Install hosts file:
|
||||
|
||||
(This should be the same on Linux and Mac, but might differ for Windows.)
|
||||
|
||||
If you're developing against the frontend, it'll target development domains (eg. `dev.fakeyou.com`) instead
|
||||
of `127.0.0.1` or `localhost`. You can make your machine route domains to localhost by editing your hosts
|
||||
file (located at `/etc/hosts`) to include the following configuration lines:
|
||||
|
||||
```
|
||||
127.0.0.1 dev.fakeyou.com
|
||||
127.0.0.1 api.dev.fakeyou.com
|
||||
127.0.0.1 devproxy.fakeyou.com
|
||||
|
||||
127.0.0.1 dev.storyteller.ai
|
||||
127.0.0.1 api.dev.storyteller.ai
|
||||
127.0.0.1 devproxy.storyteller.ai
|
||||
```
|
||||
|
||||
### (9a) Install Redis
|
||||
|
||||
```
|
||||
sudo apt install redis
|
||||
```
|
||||
|
||||
### (9b) Run one or more applications:
|
||||
DO NOT CHECK THESE TWO FILES INTO THE REPO
|
||||
Ask Brandon for the .env-secrets and .storteller-web.development-secrets.env and place it in the root of the folder.
|
||||
|
||||
To start the HTTP API server,
|
||||
|
||||
```bash
|
||||
cargo run --bin storyteller-web
|
||||
```
|
||||
Note that this compiles and runs the "development" binary. It's faster and easier to debug than the
|
||||
optimized "production" build. To build a fully optimized production release,
|
||||
run `cargo build --release --bin storyteller-web` . Note that this will take much longer.
|
||||
|
||||
DO NOT CHECK THESE TWO FILES INTO THE REPO
|
||||
|
||||
Ask Brandon for the .download-job.development-secrets.env and place it in
|
||||
crates/service/job/download_job/config
|
||||
|
||||
Ask Brandon for the .inference-job.development-secrets.env and place it in
|
||||
crates/service/job/inference_job/config
|
||||
|
||||
To download some ML models, run:
|
||||
|
||||
```bash
|
||||
cargo run --bin download-job
|
||||
cargo run --bin tts-download-job
|
||||
```
|
||||
|
||||
If you want to run both the HTTP API and the jobs, you'll need to run both processes in different
|
||||
terminals or tmux sessions.
|
||||
|
||||
Note also that the configurations pointing to the ML monorepo must be set up for each application.
|
||||
Additionally, some development secrets may be needed (ask the team to share).
|
||||
|
||||
To execute ML inference, run:
|
||||
|
||||
```bash
|
||||
cargo run --bin inference-job
|
||||
cargo run --bin tts-inference-job
|
||||
```
|
||||
|
||||
Again, note that the configurations pointing to the ML monorepo must be set up for each application.
|
||||
Additionally, some development secrets may be needed (ask the team to share).
|
||||
|
||||
Solutions to Common Setup Problems
|
||||
-----------------------------------
|
||||
|
||||
### [Fix] Sqlx Error when Performing Schema Migrations
|
||||
|
||||
You might get this error message during migration,
|
||||
|
||||
```
|
||||
Encountered unknown type for Mysql: enum
|
||||
thread 'main' panicked at 'internal error: entered unreachable code: Mysql only supports a closed set of types.
|
||||
If you ever see this error message please open an issue at https://github.com/diesel-rs/diesel
|
||||
containing a dump of your schema definition.', diesel_cli/src/print_schema.rs:310:17
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
```
|
||||
|
||||
I haven't found the cause (it doesn't happen on newer installs), but the migrations appear to work regardless
|
||||
of this error message. You can essentially ignore it.
|
||||
|
||||
### [Fix] Can't connect to local MySQL after install on Ubuntu
|
||||
|
||||
- If MySql in local dev can't be connected to, [reset the accounts](https://linuxconfig.org/how-to-reset-root-mysql-mariadb-password-on-ubuntu-20-04-focal-fossa-linux).
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
# Local Kubernetes environment for standing up the APIs and their dependencies
|
||||
|
||||
(These are Paul's notes.)
|
||||
|
||||
- Install minikube, kubectl, docker, and musl from your OS package manager
|
||||
- `rustup target add x86_64-unknown-linux-musl`
|
||||
- `cargo build --release --bin storyteller-web --target=x86_64-unknown-linux-musl`
|
||||
@@ -0,0 +1,56 @@
|
||||
Local Development nginx proxy
|
||||
=============================
|
||||
|
||||
It isn't necessary to use nginx for development, but it can be nice. Nginx allows for a more
|
||||
sophisticated testing setup that makes cookie and CORS issues less of a pain.
|
||||
|
||||
You can use nginx to serve (locally-signed) SSL, redirect traffic to different ports, or run
|
||||
multiple copies of the app side by side.
|
||||
|
||||
### Hosts file
|
||||
|
||||
Set the following configs in your `/etc/hosts` file (as you would probably do even without nginx),
|
||||
|
||||
```
|
||||
127.0.0.1 dev.fakeyou.com
|
||||
127.0.0.1 api.dev.fakeyou.com
|
||||
127.0.0.1 devproxy.fakeyou.com
|
||||
|
||||
127.0.0.1 dev.storyteller.ai
|
||||
127.0.0.1 api.dev.storyteller.ai
|
||||
127.0.0.1 devproxy.storyteller.ai
|
||||
|
||||
# Deprecated development hostnames :
|
||||
127.0.0.1 jungle.horse
|
||||
127.0.0.1 api.jungle.horse
|
||||
```
|
||||
|
||||
### Nginx installation and administration
|
||||
|
||||
Configure Nginx per the checked in Nginx configs (and instructions) in
|
||||
the directory `/_develop/localdev/nginx-http-config`.
|
||||
|
||||
This should be straightforward, but if it isn't, contribute docs here.
|
||||
|
||||
### [Fix] Python 3.6 on Apple M1 Mac
|
||||
|
||||
Python3.6 isn't supported on Apple silicon, and it's not in homebrew. It can be installed with
|
||||
[nix using Rosetta](https://stackoverflow.com/a/65980989):
|
||||
|
||||
Download: https://nixos.org/download.html#nix-quick-install
|
||||
|
||||
```
|
||||
nix run nixpkgs.python36 -c python
|
||||
```
|
||||
|
||||
Install venv:
|
||||
|
||||
```
|
||||
nix run nixpkgs.python36 -c python -m venv python
|
||||
```
|
||||
|
||||
Install other packages on Mac that aren't used in venv:
|
||||
|
||||
```
|
||||
python3 -m pip install --user requests gdown youtube_dl
|
||||
```
|
||||
@@ -1,248 +0,0 @@
|
||||
dev setup
|
||||
=========
|
||||
|
||||
[Back to main README](../../README.md)
|
||||
|
||||
## Debugging and Fixing CUDA/PyTorch
|
||||
|
||||
See this spreadsheet for previous battles with version incompatibility:
|
||||
https://docs.google.com/spreadsheets/d/1BEdLmwOzo3r83-iJn9sj6co1VT92t3lIeJ-lNH25bdQ/edit#gid=0
|
||||
|
||||
Ubuntu might upgrade the driver by accident, and it might need reinstallation. Who knows.
|
||||
This stuff is a nightmare.
|
||||
|
||||
## Database Setup
|
||||
|
||||
### Mac Install
|
||||
|
||||
```
|
||||
brew install mysql
|
||||
# If mysql -uroot fails, reboot the machine:
|
||||
sudo reboot now
|
||||
```
|
||||
|
||||
### Linux Install
|
||||
|
||||
Install the following libraries, and see the notes further below about MySQL on Ubuntu 20.04.
|
||||
|
||||
```
|
||||
jq # for combining mysql codegen outputs
|
||||
libmysqlclient-dev
|
||||
mysql-server
|
||||
libsqlite3-dev
|
||||
pkgconf # if using openssl instead of rustls
|
||||
```
|
||||
|
||||
### Migrations
|
||||
|
||||
To manage the database and perform migrations, install the Rust tools diesel and sqlx.
|
||||
|
||||
We'll be using diesel to manage the migrations, but sqlx within the app to actually perform queries.
|
||||
Diesel is an ORM, which is dumb, so we use sqlx as at-compile-time typesafe SQL.
|
||||
|
||||
The CLI is necessary to perform codegen:
|
||||
|
||||
```
|
||||
sudo apt-get install libmysqlclient-dev
|
||||
cargo install sqlx-cli --no-default-features --features rustls,mysql,sqlite
|
||||
```
|
||||
|
||||
Diesel now supports configuring the migration directory via an environment variable,
|
||||
so we can install the currently published version:
|
||||
|
||||
```
|
||||
cargo install diesel_cli \
|
||||
--no-default-features \
|
||||
--features mysql,sqlite
|
||||
```
|
||||
|
||||
If the modern version fails, try installing a cherry-picked version with a
|
||||
TOML-based migration directory configuration:
|
||||
|
||||
```
|
||||
cargo install diesel_cli \
|
||||
--git https://github.com/diesel-rs/diesel.git \
|
||||
--rev a213fe232a122f35a812b0ce0269708a1845a4c9 \
|
||||
--no-default-features \
|
||||
--features mysql
|
||||
```
|
||||
|
||||
#### Sqlx Error on Linux when Performing Schema Migrations
|
||||
|
||||
You might get this error message during migration,
|
||||
|
||||
```
|
||||
Encountered unknown type for Mysql: enum
|
||||
thread 'main' panicked at 'internal error: entered unreachable code: Mysql only supports a closed set of types.
|
||||
If you ever see this error message please open an issue at https://github.com/diesel-rs/diesel containing a dump of your schema definition.', diesel_cli/src/print_schema.rs:310:17
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
```
|
||||
|
||||
I haven't found the cause (it doesn't happen on Mac), but the migrations appear to work regardless of the error message.
|
||||
|
||||
#### Linux database notes
|
||||
|
||||
If MySql in local dev can't be connected to, reset the accounts:
|
||||
|
||||
https://linuxconfig.org/how-to-reset-root-mysql-mariadb-password-on-ubuntu-20-04-focal-fossa-linux
|
||||
|
||||
#### MySql on Ubuntu 22.04
|
||||
|
||||
Should work largely out of the box. We'll need a dev account:
|
||||
|
||||
```
|
||||
# Connect to mysql:
|
||||
# sudo mysql -u root -p (password is "root")
|
||||
|
||||
use mysql;
|
||||
CREATE USER 'storyteller'@'localhost' IDENTIFIED BY 'password';
|
||||
GRANT ALL PRIVILEGES ON storyteller.* TO 'storyteller'@'localhost';
|
||||
```
|
||||
|
||||
Then verify with `./dev_mysql_connect.sh`
|
||||
|
||||
#### Fixing dev MySql on Ubuntu 20.04
|
||||
|
||||
For some reason, the MySql default install on 20.04 gave me a bunch of trouble.
|
||||
|
||||
In retrospect, I _think_ this is because 'root@localhost' requires sudo to access, but if this
|
||||
gives any trouble in the future, here's how I got around it (two full hours of distraction!)
|
||||
|
||||
```
|
||||
sudo apt-get install mysql-server
|
||||
|
||||
# But for some reason the default password doesn't work and diesel/sqlx can't connect?
|
||||
|
||||
# Kill everything
|
||||
|
||||
sudo apt purge mysql-server mysql-client mysql-common
|
||||
sudo apt autoremove
|
||||
sudo mv -iv /var/lib/mysql /var/tmp/mysql-backup
|
||||
sudo rm -rf /var/lib/mysql*
|
||||
|
||||
sudo /usr/bin/mysql_secure_installation
|
||||
|
||||
# still no work...
|
||||
|
||||
sudo systemctl stop mysql.service
|
||||
|
||||
# ugh, it wasn't chowned or created (both states observed in different installs)…
|
||||
sudo mkdir -p /var/run/mysqld
|
||||
sudo chown mysql:mysql /var/run/mysqld
|
||||
|
||||
sudo mysqld_safe --skip-grant-tables --skip-networking &
|
||||
|
||||
mysql -u root
|
||||
|
||||
flush privileges;
|
||||
USE mysql;
|
||||
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
|
||||
|
||||
sudo killall -u mysql
|
||||
sudo systemctl restart mysql.service
|
||||
|
||||
# now it works
|
||||
sudo mysql -u root -p
|
||||
|
||||
# but now I have to use "sudo" !?!?
|
||||
|
||||
use mysql;
|
||||
|
||||
CREATE USER 'storyteller'@'localhost' IDENTIFIED BY 'password';
|
||||
GRANT ALL PRIVILEGES ON storyteller.* TO 'storyteller'@'localhost';
|
||||
```
|
||||
|
||||
### Install Diesel (migrations only)
|
||||
|
||||
We use Diesel to manage migrations, but we don't use it in server code.
|
||||
Actual server code uses SQLx. To install the CLI tool, run the following:
|
||||
|
||||
```
|
||||
cargo install diesel_cli
|
||||
```
|
||||
|
||||
Mac [has issues](https://github.com/diesel-rs/diesel/issues/2605) and requires a few dependencies:
|
||||
|
||||
```
|
||||
brew install libpq
|
||||
```
|
||||
|
||||
### Database migrations
|
||||
|
||||
To reset the entire database (drop, migrate), run:
|
||||
|
||||
```
|
||||
diesel database reset
|
||||
```
|
||||
|
||||
To migrate at the current step and beyond:
|
||||
|
||||
```
|
||||
diesel migration run
|
||||
```
|
||||
|
||||
To undo migrations at the current step:
|
||||
|
||||
```
|
||||
diesel migration redo
|
||||
```
|
||||
|
||||
### Server Query Codegen
|
||||
|
||||
We use SQLx instead of Diesel in the production server. It's typesafe
|
||||
SQL instead of an ORM like Diesel.
|
||||
|
||||
SQLx connects to a database to derive type information, but obviously
|
||||
cannot do this for builds in CI. In order to cache the types, we build
|
||||
and check in a cache file (necessary for builds):
|
||||
|
||||
```
|
||||
SQLX_OFFLINE=true cargo sqlx prepare
|
||||
```
|
||||
|
||||
Now that we have multiple binaries, it's required to include all the queries in the main
|
||||
binary so we can generate the cached queries as a single target. That's then executed
|
||||
with:
|
||||
|
||||
```
|
||||
SQLX_OFFLINE=true cargo sqlx prepare -- --bin storyteller-web
|
||||
```
|
||||
|
||||
### Setting Up a Local Nginx Proxy
|
||||
|
||||
Set up a local nginx to proxy to the frontend and backend so cookie issues aren't annoying
|
||||
|
||||
Configure Nginx per the checked in Nginx configs (and instructions) in `localdev/nginx-http-config`.
|
||||
|
||||
```
|
||||
|
||||
And in /etc/hosts,
|
||||
|
||||
```
|
||||
127.0.0.1 jungle.horse
|
||||
127.0.0.1 api.jungle.horse
|
||||
|
||||
```
|
||||
|
||||
### Python 3.6 on Apple M1 Mac
|
||||
|
||||
Python3.6 isn't supported on Apple silicon, and it's not in homebrew. It can be installed with
|
||||
[nix using Rosetta](https://stackoverflow.com/a/65980989):
|
||||
|
||||
Download: https://nixos.org/download.html#nix-quick-install
|
||||
|
||||
```
|
||||
nix run nixpkgs.python36 -c python
|
||||
```
|
||||
|
||||
Install venv:
|
||||
|
||||
```
|
||||
nix run nixpkgs.python36 -c python -m venv python
|
||||
```
|
||||
|
||||
Install other packages on Mac that aren't used in venv:
|
||||
|
||||
```
|
||||
python3 -m pip install --user requests gdown youtube_dl
|
||||
```
|
||||
@@ -1,77 +0,0 @@
|
||||
old readme
|
||||
==========
|
||||
|
||||
Contents of the main README.md, which will always be woefully out of date. Docs will migrate into this folder on a
|
||||
per-subject basis. App-specific docs will live under each app.
|
||||
|
||||
Application overview
|
||||
--------------------
|
||||
|
||||
* [FakeYou.com](https://fakeyou.com) is powered by:
|
||||
* HTTP APIs:
|
||||
* `storyteller-web` - HTTP + database monolith for FakeYou
|
||||
* Asynchronous Jobs:
|
||||
* `tts-download-job` - Async download of models
|
||||
* `tts-inference-job` - Async TTS inference
|
||||
* `w2l-download-job` - Async download of videos and images
|
||||
* `w2l-inference-job` - Async W2L inference
|
||||
|
||||
* [StorytellerStream](https://storyteller.stream) is powered by:
|
||||
* HTTP APIs:
|
||||
* `storyteller-web` - HTTP + database monolith for FakeYou
|
||||
* Websocket events:
|
||||
* `websocket-gateway` - Websocket to pull down Twitch events.
|
||||
* Twitch API integration:
|
||||
* `twitch-pubsub-subscriber` - Dynamically subscribes to Twitch PubSub for "active" users
|
||||
|
||||
Schema and API notes
|
||||
--------------------
|
||||
|
||||
* [Redis Schema Notes README](_docs/redis_schema.md)
|
||||
|
||||
Local development
|
||||
-----------------
|
||||
|
||||
[Local development setup README](_docs/local_development_setup.md)
|
||||
|
||||
Production and Deployment
|
||||
-------------------------
|
||||
|
||||
[Production builds and deployment README](_docs/production_builds_and_deployment.md)
|
||||
|
||||
Development notes
|
||||
-----------------
|
||||
|
||||
[Development notes README](_docs/development_notes.md)
|
||||
|
||||
Dump a MySQL report
|
||||
-------------------
|
||||
|
||||
```
|
||||
mysql -u storyteller \
|
||||
-pPasswordHere \
|
||||
-h IP_HERE \
|
||||
-P 3306 \
|
||||
-D storyteller \
|
||||
-B \
|
||||
-e "select * from voice_clone_requests;" | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > voice_clone_report.csv
|
||||
```
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
* Revise this README to be more useful.
|
||||
|
||||
Notes / TODOs:
|
||||
|
||||
* Examples for good Actix+Sqlx Tests:
|
||||
https://stackoverflow.com/questions/65370752/how-do-i-create-an-actix-web-server-that-accepts-both-sqlx-database-pools-and-tr
|
||||
|
||||
* Actix/sqlx runtime compat:
|
||||
https://github.com/launchbadge/sqlx/issues/1117#issuecomment-801237734
|
||||
|
||||
* Redis caching of more endpoints
|
||||
|
||||
* Jobs for analytics queries (#uses per model, etc)
|
||||
* Jobs for ingesting Discord, Twitter, Reddit RPAN chat, Twitch chat (not PubSub), etc.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
Production Database
|
||||
===================
|
||||
|
||||
Secrets can be subbed in for `.env` and the standard diesel migration tooling will work.
|
||||
|
||||
Dump a MySQL report
|
||||
-------------------
|
||||
|
||||
```bash
|
||||
mysql -u storyteller \
|
||||
-pPasswordHere \
|
||||
-h IP_HERE \
|
||||
-P 3306 \
|
||||
-D storyteller \
|
||||
-B \
|
||||
-e "select * from voice_clone_requests;" | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > voice_clone_report.csv
|
||||
```
|
||||
@@ -1,6 +1,8 @@
|
||||
database schema
|
||||
================
|
||||
|
||||
(This is woefully incomplete and unmaintained.)
|
||||
|
||||
Twitch Model
|
||||
------------
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- 1) Find uploads that failed (recently)
|
||||
|
||||
select
|
||||
id,
|
||||
token,
|
||||
download_type,
|
||||
title,
|
||||
download_url,
|
||||
status,
|
||||
attempt_count
|
||||
from generic_download_jobs
|
||||
where status IN ('started', 'attempt_failed', 'complete_failure', 'dead')
|
||||
and download_type NOT IN ('vits', 'hifigan')
|
||||
and created_at > NOW() - INTERVAL 15 DAY;
|
||||
|
||||
|
||||
-- 2) Then restart them
|
||||
-- NB: Double inner query is to get away from query optimizer:
|
||||
-- "You can't specify target table 'generic_download_jobs' for update in FROM clause"
|
||||
|
||||
update generic_download_jobs
|
||||
set
|
||||
status='pending',
|
||||
attempt_count=0
|
||||
where token IN (
|
||||
select token from (
|
||||
select token
|
||||
from generic_download_jobs
|
||||
where status IN ('started', 'attempt_failed', 'complete_failure', 'dead')
|
||||
and download_type NOT IN ('vits', 'hifigan')
|
||||
and created_at > NOW() - INTERVAL 15 DAY
|
||||
) as x
|
||||
);
|
||||
|
||||
|
||||
-- Kill bad pending downloads
|
||||
-- eg. awful voices, like Hitler
|
||||
|
||||
update generic_download_jobs
|
||||
set
|
||||
status='dead',
|
||||
download_url = CONCAT('NOPE', download_url)
|
||||
where token = 'jdown_ssape40dxbfgvhtsmedt34418x'
|
||||
limit 1;
|
||||
@@ -0,0 +1,18 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Kill routed jobs
|
||||
update generic_inference_jobs set status = 'dead' where maybe_routing_tag IS NOT NULL limit 100;
|
||||
|
||||
-- Get pending jobs
|
||||
select count(*) from generic_inference_jobs where status = 'pending';
|
||||
|
||||
update generic_inference_jobs
|
||||
set status = 'dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed');
|
||||
|
||||
update generic_inference_jobs
|
||||
set status = 'dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed')
|
||||
and maybe_model_type IN ('sad_talker', 'so_vits_svc');
|
||||
@@ -0,0 +1,24 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Kill pending jobs
|
||||
update tts_inference_jobs set status = 'dead' where status = 'pending';
|
||||
|
||||
-- Kill all low priority pending, waiting, and in-progress jobs
|
||||
update tts_inference_jobs
|
||||
set status = 'dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed')
|
||||
and priority_level IN (0, 1);
|
||||
|
||||
-- Kill all pending jobs
|
||||
update tts_inference_jobs
|
||||
set status = 'dead'
|
||||
where status = 'pending';
|
||||
|
||||
-- Kill all waiting and in-progress jobs
|
||||
update tts_inference_jobs
|
||||
set status = 'dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed');
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Delete TTS results for a single model
|
||||
-- Do this in short batches so a lock isn't held for prohibitively long.
|
||||
update tts_results
|
||||
set mod_deleted_at = NOW()
|
||||
where model_token = 'TM:ztt5s1be5tq6'
|
||||
and mod_deleted_at IS NULL
|
||||
limit 5000;
|
||||
@@ -0,0 +1,35 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Upgrade top TTS model uploaders to a loyalty plan
|
||||
update users
|
||||
set maybe_loyalty_program_key = 'fakeyou_contributor'
|
||||
where token IN (
|
||||
select creator_user_token from
|
||||
(
|
||||
select count(*) as upload_count,
|
||||
creator_user_token
|
||||
from tts_models
|
||||
group by creator_user_token
|
||||
having upload_count >= 10
|
||||
order by upload_count desc
|
||||
) as t
|
||||
);
|
||||
|
||||
-- Upgrade top VC model uploaders to a loyalty plan
|
||||
update users
|
||||
set maybe_loyalty_program_key = 'fakeyou_contributor'
|
||||
where token IN (
|
||||
select creator_user_token from
|
||||
(
|
||||
select count(*) as upload_count,
|
||||
creator_user_token
|
||||
from voice_conversion_models
|
||||
group by creator_user_token
|
||||
having upload_count >= 10
|
||||
order by upload_count desc
|
||||
) as t
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Remove temporary test models
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'temporary test model'
|
||||
where token IN (
|
||||
'vcm_jt9mdz9xjjcb',
|
||||
'vcm_4xzkzdhs4kk5',
|
||||
'vcm_502wkt2pca3y'
|
||||
);
|
||||
|
||||
-- Remove broken models
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'broken model'
|
||||
where token IN (
|
||||
'vcm_982y9g6v3jrg',
|
||||
'vcm_16rpyehf7f0a',
|
||||
'vcm_8vjtz3dbnw17',
|
||||
'vcm_tc9mwr60cjth',
|
||||
'vcm_bshsyp01w9vg',
|
||||
'vcm_31whj8apmqj7',
|
||||
'vcm_84qa0an44p8p',
|
||||
'vcm_9xx4v5qz5fbg',
|
||||
'vcm_7zp2b2hs2at2',
|
||||
'vcm_zhvk0mnnb7zp',
|
||||
'vcm_1vc4scq9qp6m',
|
||||
'vcm_sr1b54mwy0ym',
|
||||
'vcm_qx96y8aasydk'
|
||||
);
|
||||
|
||||
-- Remove duplicate models
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'duplicate model'
|
||||
where token IN (
|
||||
'vcm_6w21em1bs7q3',
|
||||
'vcm_sbhvyj7926w4',
|
||||
'vcm_anv469g89adz',
|
||||
'vcm_xsx5yx585c7x',
|
||||
'vcm_dpahzjjpkf18',
|
||||
'vcm_y09dqe6zgwyk',
|
||||
'vcm_xrp96dwgppv2',
|
||||
'vcm_84awjbjxts6n',
|
||||
'vcm_b2x2sn8kf28j',
|
||||
'vcm_41nw6xgr5x3v',
|
||||
'vcm_a6x83tk0ttf2',
|
||||
'vcm_dgjgqxq5w97j',
|
||||
'vcm_59k5j452x7xy',
|
||||
'vcm_09p6vqnk7n05',
|
||||
'vcm_attanwh383hg',
|
||||
'vcm_t8d4f6w9pa8t',
|
||||
'vcm_s8s4q4c65xsy',
|
||||
'vcm_6e2av8pmkyz5',
|
||||
'vcm_82x5f330z4wf',
|
||||
'vcm_z6bax4kvjdx6',
|
||||
'vcm_v8hf35cyq3ft',
|
||||
'vcm_1h9b4v6nxmf5',
|
||||
'vcm_781bzn81qf6k',
|
||||
'vcm_w0xjjsexktby',
|
||||
'vcm_awsq3q4c711w',
|
||||
'vcm_kttxt7wgb6s6',
|
||||
'vcm_ets26z5fpt8d',
|
||||
'vcm_wjrw59wmwcrr',
|
||||
'vcm_bebgka17n0sr',
|
||||
'vcm_6mj0x3qd7yfd',
|
||||
'vcm_b71ke4fm61nx',
|
||||
'vcm_srz3gas5ra4d',
|
||||
'vcm_k64jj2t2j05b',
|
||||
'vcm_140rd035642m',
|
||||
'vcm_5y93wgr90s91',
|
||||
'vcm_jwp6p08byjn9',
|
||||
'vcm_ets26z5fpt8d',
|
||||
'vcm_7yfwzsyvrpq4',
|
||||
'vcm_f1vq0hp0tes2',
|
||||
'vcm_9f05kg36q4fg',
|
||||
'vcm_1xs9c2sgykgy',
|
||||
'vcm_hnd9z2fxq661',
|
||||
'vcm_jxd74xhcszry',
|
||||
'vcm_tvk0g6dwg3yv',
|
||||
'vcm_vrsdv4ahterx',
|
||||
'vcm_e2debszbm8vt',
|
||||
'vcm_rh98fw9a9an1',
|
||||
'vcm_2bvd1gmysaxf',
|
||||
'vcm_2cqq1j33y2hr',
|
||||
'vcm_ysj7kwb96kcp',
|
||||
'vcm_ef0eaneyr72p',
|
||||
'vcm_t59d7vdxtqs4',
|
||||
'vcm_90hrepevshtg',
|
||||
'vcm_4st9ex13vnbh',
|
||||
'vcm_30fne697qhab',
|
||||
'vcm_qy7evy03p6tg',
|
||||
'vcm_775eze19tv0n',
|
||||
'vcm_4bzkfvaexbv3',
|
||||
'vcm_08v2tdga8v93',
|
||||
'vcm_whxeyxzw12q6',
|
||||
'vcm_0rj5b6npxfkh',
|
||||
'vcm_hv22emyfkex4',
|
||||
'vcm_a1fmtgthezs0',
|
||||
'vcm_z9fpz1p5bpr2',
|
||||
'vcm_2y8ck2dbppkq',
|
||||
'vcm_0c9h3mzc4kre',
|
||||
'vcm_m0z3tt4gytm9'
|
||||
);
|
||||
|
||||
-- Remove duplicate models (2)
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'duplicate model'
|
||||
where token IN (
|
||||
'vcm_v790w43dv3ce',
|
||||
'vcm_xmzm7eextc3n',
|
||||
'vcm_r3b91dr0eta5',
|
||||
'vcm_p1rpmfmckd5c',
|
||||
'vcm_cpajdgenjfw7',
|
||||
'vcm_qchjs52fsr9y',
|
||||
'vcm_pkkjy8c6cpt3',
|
||||
'vcm_f8ra6j8d6wgv',
|
||||
'vcm_mhsz9bjn19tw',
|
||||
'vcm_btd5zab2jdqv',
|
||||
'vcm_q5evptaaqne3',
|
||||
'vcm_wqtqs4gj2zmj',
|
||||
'vcm_14rv35fct2ay',
|
||||
'vcm_418j0h41qy8a',
|
||||
'vcm_3m5m6bpm0rt2',
|
||||
'vcm_gdw4krmaxpza',
|
||||
'vcm_b3xhdb8zymvf',
|
||||
'vcm_aak9m6nvj3am',
|
||||
'vcm_mcw5kn21bbjh',
|
||||
'vcm_fydr6ts21mtf',
|
||||
'vcm_zpw560jzyqpw',
|
||||
'vcm_w24wcctnxbxf',
|
||||
'vcm_ya5tpzdcvvcz',
|
||||
'vcm_1ctmgrjtn1j7',
|
||||
'vcm_rk8fycc0reb2',
|
||||
'vcm_e2c8942vky34',
|
||||
'vcm_wevg8cf3hcw8',
|
||||
'vcm_6hzbyg453xb9',
|
||||
'vcm_xqfffshe2g0q',
|
||||
'vcm_32j1zmcvn61n'
|
||||
);
|
||||
|
||||
-- Remove duplicate models (3)
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'duplicate model'
|
||||
where token IN (
|
||||
'vcm_46sbq0r9hfjk',
|
||||
'vcm_k8nseqy8jyte',
|
||||
'vcm_gs8qam6npe46',
|
||||
'vcm_djh15g49cxm8',
|
||||
'vcm_d7zygjnp35my',
|
||||
'vcm_334yqeq11rpm',
|
||||
'vcm_6m3b6121318k',
|
||||
'vcm_a419w7gw6jrt',
|
||||
'vcm_wtyszwjwq0ts',
|
||||
'vcm_0q9t2azhqvf1',
|
||||
'vcm_fx2k40ffzjqg',
|
||||
'vcm_wvjqmzd8y4mt',
|
||||
'vcm_b2635v3p50je',
|
||||
'vcm_zfyr07z2d0rb',
|
||||
'vcm_yn2sn5j2jwed',
|
||||
'vcm_z596ja3yvyy9',
|
||||
'vcm_a1p854bn1sjs',
|
||||
'vcm_fv24vmr93805',
|
||||
'vcm_0y7vsc2e9s3r',
|
||||
'vcm_5aqzq0d246rm',
|
||||
'vcm_trvge62x7je9',
|
||||
'vcm_sghga68kwggk',
|
||||
'vcm_raxcc33pj608',
|
||||
'vcm_a66b3va0sj64',
|
||||
'vcm_bd1rjawqypw6',
|
||||
'vcm_evzff14n721p',
|
||||
'vcm_jnrr4ht9f42f'
|
||||
);
|
||||
|
||||
-- Remove duplicate models (4)
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'duplicate model'
|
||||
where token IN (
|
||||
'vcm_ds2pz63sagan',
|
||||
'vcm_wkczgvq2fjqq',
|
||||
'vcm_z8137w1rddse',
|
||||
'vcm_gknzxybf4erw',
|
||||
'vcm_z0m1qtmawccn',
|
||||
'vcm_yek6pmgvbb1s',
|
||||
'vcm_qqhnjwsjrvnx',
|
||||
'vcm_8fetm7qz94cp',
|
||||
'vcm_kz1zm1d269j0',
|
||||
'vcm_rfnkc8g5gbbv',
|
||||
'vcm_4ncqxetfe7dm',
|
||||
'vcm_qkpfem2a153n',
|
||||
'vcm_z5jkd9r4cawf',
|
||||
'vcm_vgh6ja6zzj0p',
|
||||
'vcm_bd473tdrrzhk',
|
||||
'vcm_2k7tmx3ndd3y',
|
||||
'vcm_weyxz516dd2m',
|
||||
'vcm_1j4kpjvgsj6k',
|
||||
'vcm_211g17ea44fw',
|
||||
'vcm_7zkbj6be0yr5',
|
||||
'vcm_nnaaxeqy4xj6',
|
||||
'vcm_wp7sgtz6mhc4',
|
||||
'vcm_h5w7fzhxcpxm',
|
||||
'vcm_7d5rxpqkjy07',
|
||||
'vcm_9vhjvrptygfz',
|
||||
'vcm_4qbbawahnkvb',
|
||||
'vcm_am870m8162at',
|
||||
'vcm_cftdb5227qt5',
|
||||
'vcm_m7vv1mcxfxvm',
|
||||
'vcm_qn8vsvvh1rqc',
|
||||
'vcm_erhvqjvk1dsk',
|
||||
'vcm_4zs8tdrw971e',
|
||||
'vcm_4zs8tdrw971e',
|
||||
'vcm_z8htjaejr1wx',
|
||||
'vcm_99wdsazefjwr',
|
||||
'vcm_k1at1sbepvqv',
|
||||
'vcm_xcp34f5d7ygs',
|
||||
'vcm_8v8srq9sx7cq',
|
||||
'vcm_f2yf7bxmk8h5',
|
||||
'vcm_gvtrjte4as1s',
|
||||
'vcm_2s0y50avy43b',
|
||||
'vcm_r638ygfxkpmq',
|
||||
'vcm_1ttm6pxcpqna',
|
||||
'vcm_0ytfkxh6pm4f',
|
||||
'vcm_zderdrfmgq6c',
|
||||
'vcm_jvdpr6mtddb8',
|
||||
'vcm_9tvcv961g09x',
|
||||
'vcm_aynpmxbhpy7n',
|
||||
'vcm_2gzsjb5bdsdq',
|
||||
'vcm_a0vep64tz56n',
|
||||
'vcm_zt4hgc9pyv11',
|
||||
'vcm_szfxm0crd8y8',
|
||||
'vcm_3q89kba3cy5z',
|
||||
'vcm_ywpwnhk4pv4x',
|
||||
'vcm_4he8jjmengb3',
|
||||
'vcm_jpdfswn0empy',
|
||||
'vcm_2nztkt3rgm1q',
|
||||
'vcm_q5gyxf5a11zf',
|
||||
'vcm_sa7k9ycne147',
|
||||
'vcm_p6gxtj9qefsg',
|
||||
'vcm_j2fvzdyachtw',
|
||||
'vcm_ecbv0rhc6br3',
|
||||
'vcm_jrgwspz2wt7p',
|
||||
'vcm_f5b4j3rt180n',
|
||||
'vcm_pzajxdfcjfpa',
|
||||
'vcm_rq4f2cbbm6j1',
|
||||
'vcm_rdmfpbnab47w',
|
||||
'vcm_03dtk4xtggm6',
|
||||
'vcm_zx7mdkh9s9qb',
|
||||
'vcm_e0megdtf71x6'
|
||||
);
|
||||
|
||||
-- Remove older models replaced by new versions
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'replaced with new version'
|
||||
where token IN (
|
||||
'vcm_gdg3najz6j3g'
|
||||
);
|
||||
|
||||
-- Remove takedown request models
|
||||
update voice_conversion_models
|
||||
set
|
||||
mod_deleted_at = NOW(),
|
||||
maybe_mod_comments = 'takedown request'
|
||||
where token IN (
|
||||
'vcm_2af74np3jh6q',
|
||||
'vcm_8kk7355dc184',
|
||||
'vcm_nsh89pcx4569',
|
||||
'vcm_q7ewn3yym4gy',
|
||||
'vcm_cwngb21xsf66',
|
||||
'vcm_jmzjrky179cm',
|
||||
'vcm_hj6a1nt1yvh9',
|
||||
'vcm_6wwx1e3cd48s',
|
||||
'vcm_pc76gc1xh7jg',
|
||||
'vcm_gb0p1wmtk9wp',
|
||||
'vcm_pbs955dvaeq6',
|
||||
'vcm_x2wyzr6h6539',
|
||||
'vcm_py7qwz310qff',
|
||||
'vcm_k01bqvh0dseq',
|
||||
'vcm_5m4dsn2fwa0q',
|
||||
'vcm_hn9m98g1am3z',
|
||||
'vcm_f9168tyyn6ex',
|
||||
'vcm_03y9w4h99r1h',
|
||||
'vcm_yr9f1s0xc7pc',
|
||||
'vcm_45767r26a9bb',
|
||||
'vcm_rq3cvp3x3hnh',
|
||||
'vcm_ng1nz8d67z4v',
|
||||
'vcm_f5arabzrk4en',
|
||||
'vcm_d379600cr8yx',
|
||||
'vcm_p7m9jw1krrkr',
|
||||
'vcm_x7v3m9mcvten',
|
||||
'vcm_6r057m7594bv',
|
||||
'vcm_wkm9e42d3spm',
|
||||
'vcm_cvz78weydh57',
|
||||
'vcm_7g5q89m75n1p',
|
||||
'vcm_fg3175bxy7kj'
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Kill pending jobs
|
||||
update w2l_inference_jobs set status='dead' where status IN ('pending', 'started', 'attempt_failed');
|
||||
|
||||
-- Unstick old jobs that might be stuck as "started"
|
||||
update w2l_template_upload_jobs
|
||||
set status='dead'
|
||||
where status='started'
|
||||
and created_at < ( CURDATE() - INTERVAL 1 DAY );
|
||||
|
||||
-- Kill pending jobs with tiktok URLs:
|
||||
-- These need to be blocked in the server and job directly.
|
||||
update w2l_template_upload_jobs
|
||||
set status='dead'
|
||||
where status='pending'
|
||||
and download_url LIKE '%tiktok%';
|
||||
|
||||
|
||||
-- Kill all pending jobs
|
||||
update w2l_template_upload_jobs
|
||||
set status='dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed');
|
||||
+6
@@ -28,3 +28,9 @@ where id IN (
|
||||
or subscriptions.status = 'past_due'
|
||||
)
|
||||
group by address_country
|
||||
|
||||
|
||||
-- Histogram
|
||||
select address_country, count(*)
|
||||
from customers
|
||||
group by address_country
|
||||
@@ -0,0 +1,90 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- NB: These are for use in Stripe Sigma, not MySQL
|
||||
-- NB: You must use single quotes instead of double quotes when comparing string values.
|
||||
|
||||
-- Status values: past_due, incomplete, active, canceled, incomplete_expired (perhaps not exhaustive)
|
||||
select distinct status
|
||||
from subscriptions
|
||||
|
||||
select count(*)
|
||||
from subscriptions
|
||||
where status IN ('active');
|
||||
|
||||
-- Metadata is in the 'subscriptions_metadata' table, and we store 'username', 'email', and 'user_token'
|
||||
select
|
||||
m.value,
|
||||
m.key,
|
||||
s.id,
|
||||
s.created,
|
||||
s.cancel_at,
|
||||
s.canceled_at
|
||||
from subscriptions as s
|
||||
join subscriptions_metadata as m
|
||||
on m.subscription_id = s.id
|
||||
where m.key = 'username'
|
||||
|
||||
|
||||
-- Full mapping of Stripe subscribers to FakeYou users
|
||||
select
|
||||
s.id as subscription_id,
|
||||
user_tokens.user_token,
|
||||
usernames.username,
|
||||
emails.email,
|
||||
s.status as subscription_status,
|
||||
s.created,
|
||||
s.cancel_at,
|
||||
s.canceled_at
|
||||
from subscriptions as s
|
||||
join (
|
||||
select
|
||||
m.subscription_id,
|
||||
m.value as username
|
||||
from subscriptions_metadata as m
|
||||
where m.key = 'username'
|
||||
) as usernames
|
||||
on s.id = usernames.subscription_id
|
||||
join (
|
||||
select m.subscription_id,
|
||||
m.value as email
|
||||
from subscriptions_metadata as m
|
||||
where m.key = 'email'
|
||||
) as emails
|
||||
on s.id = emails.subscription_id
|
||||
join (
|
||||
select m.subscription_id,
|
||||
m.value as user_token
|
||||
from subscriptions_metadata as m
|
||||
where m.key = 'user_token'
|
||||
) as user_tokens
|
||||
on s.id = user_tokens.subscription_id
|
||||
order by s.id asc
|
||||
|
||||
-- Without emails
|
||||
select
|
||||
s.id as subscription_id,
|
||||
user_tokens.user_token,
|
||||
usernames.username,
|
||||
s.status as subscription_status,
|
||||
s.created,
|
||||
s.cancel_at,
|
||||
s.canceled_at
|
||||
from subscriptions as s
|
||||
join (
|
||||
select
|
||||
m.subscription_id,
|
||||
m.value as username
|
||||
from subscriptions_metadata as m
|
||||
where m.key = 'username'
|
||||
) as usernames
|
||||
on s.id = usernames.subscription_id
|
||||
join (
|
||||
select m.subscription_id,
|
||||
m.value as user_token
|
||||
from subscriptions_metadata as m
|
||||
where m.key = 'user_token'
|
||||
) as user_tokens
|
||||
on s.id = user_tokens.subscription_id
|
||||
order by s.id asc
|
||||
@@ -0,0 +1,8 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- NB: These are for use in Stripe Sigma, not MySQL
|
||||
-- NB: You must use single quotes instead of double quotes when comparing string values.
|
||||
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- See how many jobs of each time were created in the last period
|
||||
select
|
||||
distinct maybe_model_type as model_type,
|
||||
count(*) as created
|
||||
from generic_inference_jobs
|
||||
where created_at > (CURDATE() - INTERVAL 60 MINUTE)
|
||||
group by maybe_model_type;
|
||||
|
||||
-- See how long recent jobs are taking
|
||||
select
|
||||
id,
|
||||
maybe_input_source_token,
|
||||
assigned_worker,
|
||||
assigned_cluster,
|
||||
success_execution_millis / 1000 / 60 as minutes
|
||||
from generic_inference_jobs
|
||||
where status != 'pending'
|
||||
and success_execution_millis IS NOT NULL
|
||||
order by id desc
|
||||
limit 50;
|
||||
|
||||
-- See who is uploading SadTalker jobs
|
||||
select
|
||||
maybe_creator_user_token,
|
||||
users.username as maybe_creator_username,
|
||||
creator_ip_address,
|
||||
count(*) as attempts
|
||||
from generic_inference_jobs
|
||||
left outer join users
|
||||
on users.token = generic_inference_jobs.maybe_creator_user_token
|
||||
where maybe_model_type = 'sad_talker'
|
||||
and status IN ('pending', 'started', 'complete_failure', 'attempt_failed')
|
||||
group by maybe_creator_user_token, maybe_creator_username, creator_ip_address
|
||||
order by attempts desc;
|
||||
|
||||
-- Detailed report on most recent jobs, ordered by worst performing.
|
||||
-- TODO: Determine if the problem is in downloading models. Make sure the job timer doesn't include
|
||||
-- sections where models / files get downloaded.
|
||||
select *
|
||||
from (
|
||||
select
|
||||
jobs.created_at,
|
||||
jobs.first_started_at,
|
||||
jobs.id,
|
||||
jobs.status,
|
||||
jobs.attempt_count as attempts,
|
||||
trim(replace(replace(jobs.internal_debugging_failure_reason, "\n", ""), "\r", ""))
|
||||
as i_failure_reason,
|
||||
-- u.username,
|
||||
jobs.assigned_worker,
|
||||
jobs.assigned_cluster,
|
||||
jobs.maybe_input_source_token,
|
||||
jobs.maybe_model_type,
|
||||
jobs.maybe_model_token,
|
||||
m.media_source,
|
||||
m.maybe_original_mime_type as mime_type,
|
||||
TRUNCATE(jobs.success_execution_millis / 1000 / 60, 2) as execution_mins,
|
||||
TRUNCATE(jobs.success_inference_execution_millis / 1000 / 60, 2) as inference_mins,
|
||||
TRUNCATE((jobs.success_execution_millis - jobs.success_inference_execution_millis) / 1000 / 60, 2) as extra_mins,
|
||||
TRUNCATE(m.original_duration_millis / 1000 / 60, 2) as input_mins,
|
||||
jobs.success_execution_millis / m.original_duration_millis as ratio
|
||||
from generic_inference_jobs AS jobs
|
||||
left join users AS u on
|
||||
u.token = jobs.maybe_creator_user_token
|
||||
left join media_uploads AS m on
|
||||
m.token = jobs.maybe_input_source_token
|
||||
where
|
||||
jobs.status != 'pending'
|
||||
AND jobs.created_at > NOW() - INTERVAL 20 MINUTE
|
||||
AND jobs.maybe_model_type IN ('so_vits_svc')
|
||||
order by id desc
|
||||
limit 200
|
||||
) as t
|
||||
order by execution_mins desc;
|
||||
|
||||
order by assigned_worker desc, first_started_at asc;
|
||||
|
||||
order by first_started_at asc;
|
||||
|
||||
order by assigned_worker desc, execution_mins desc;
|
||||
|
||||
|
||||
-- Get pending so-vits-svc jobs
|
||||
select count(*)
|
||||
from generic_inference_jobs
|
||||
where maybe_model_type = 'so_vits_svc'
|
||||
and status='pending';
|
||||
|
||||
|
||||
-- Get jobs that have routing tags
|
||||
select
|
||||
id,
|
||||
maybe_input_source_token,
|
||||
maybe_creator_user_token,
|
||||
maybe_routing_tag,
|
||||
status
|
||||
from generic_inference_jobs
|
||||
where maybe_routing_tag IS NOT NULL
|
||||
limit 10;
|
||||
|
||||
|
||||
|
||||
-- Debug that we're setting the correct metadata on jobs
|
||||
-- For some reasons storyteller-web is enqueuing the wrong type!
|
||||
select
|
||||
jobs.id,
|
||||
jobs.token,
|
||||
jobs.maybe_model_type as jobs_model_type,
|
||||
jobs.maybe_model_token as jobs_model_token,
|
||||
models.token as model_token,
|
||||
models.model_type as model_type
|
||||
from generic_inference_jobs as jobs
|
||||
left outer join voice_conversion_models as models
|
||||
on jobs.maybe_model_token = models.token
|
||||
order by jobs.id
|
||||
desc
|
||||
limit 100;
|
||||
|
||||
-- Generic inference jobs + legacy TTS (this is a production endpoint)
|
||||
-- UPDATED QUERY: Queues as named rows
|
||||
SELECT
|
||||
maybe_model_type as queue_type,
|
||||
count(*) as pending_job_count,
|
||||
NOW() as present_time
|
||||
FROM (
|
||||
SELECT
|
||||
token,
|
||||
maybe_model_type
|
||||
FROM generic_inference_jobs
|
||||
WHERE status IN ("pending", "attempt_failed")
|
||||
UNION
|
||||
SELECT
|
||||
token,
|
||||
maybe_model_type
|
||||
FROM generic_inference_jobs
|
||||
WHERE status IN ("started")
|
||||
AND created_at > (CURDATE() - INTERVAL 15 MINUTE)
|
||||
) as generic_inner
|
||||
GROUP BY queue_type
|
||||
UNION
|
||||
SELECT
|
||||
"legacy_tts" as queue_type,
|
||||
count(*) as pending_job_count,
|
||||
NOW() as present_time
|
||||
FROM
|
||||
(
|
||||
SELECT token
|
||||
FROM tts_inference_jobs
|
||||
WHERE status IN ("pending", "attempt_failed")
|
||||
UNION
|
||||
SELECT token
|
||||
FROM tts_inference_jobs
|
||||
WHERE status IN ("started")
|
||||
AND created_at > (CURDATE() - INTERVAL 15 MINUTE)
|
||||
) as legacy_inner
|
||||
GROUP BY queue_type;
|
||||
|
||||
-- Generic inference jobs + legacy TTS (this was a production endpoint)
|
||||
-- OLD QUERY: Queues as columns
|
||||
SELECT
|
||||
(
|
||||
SELECT
|
||||
COUNT(distinct token) as generic_job_count
|
||||
FROM
|
||||
(
|
||||
SELECT token
|
||||
FROM generic_inference_jobs
|
||||
WHERE status = "started"
|
||||
AND created_at > (CURDATE() - INTERVAL 5 MINUTE)
|
||||
UNION
|
||||
SELECT token
|
||||
FROM generic_inference_jobs
|
||||
WHERE status IN ("pending", "attempt_failed")
|
||||
) as g
|
||||
) as generic_job_count,
|
||||
(
|
||||
SELECT
|
||||
COUNT(distinct token) as legacy_tts_job_count
|
||||
FROM
|
||||
(
|
||||
SELECT token
|
||||
FROM tts_inference_jobs
|
||||
WHERE status = "started"
|
||||
AND created_at > (CURDATE() - INTERVAL 5 MINUTE)
|
||||
UNION
|
||||
SELECT token
|
||||
FROM tts_inference_jobs
|
||||
WHERE status IN ("pending", "attempt_failed")
|
||||
) as t
|
||||
) as legacy_tts_job_count,
|
||||
NOW() as present_time;
|
||||
|
||||
-- Histogram of inference
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from generic_inference_jobs
|
||||
group by created_date
|
||||
|
||||
-- Histogram of inference (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from generic_inference_jobs
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
-- Histogram of inference (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from generic_inference_jobs
|
||||
where date(created_at) >= "2023-01-01"
|
||||
group by created_date
|
||||
@@ -0,0 +1,50 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
select
|
||||
mu.id,
|
||||
mu.token,
|
||||
u.username,
|
||||
mu.media_source,
|
||||
maybe_original_filename as filename,
|
||||
original_file_size_bytes as size_bytes,
|
||||
original_duration_millis as duration_millis,
|
||||
maybe_original_mime_type as mime_type
|
||||
from media_uploads as mu
|
||||
left join users AS u
|
||||
on u.token = mu.maybe_creator_user_token
|
||||
order by id desc limit 10;
|
||||
|
||||
-- Analyze all media
|
||||
select
|
||||
mu.id,
|
||||
mu.token,
|
||||
u.username,
|
||||
mu.media_source,
|
||||
maybe_original_filename as filename,
|
||||
original_file_size_bytes as size_bytes,
|
||||
original_duration_millis as duration_millis,
|
||||
maybe_original_mime_type as mime_type
|
||||
from media_uploads as mu
|
||||
left join users AS u
|
||||
on u.token = mu.maybe_creator_user_token
|
||||
order by id desc
|
||||
limit 40;
|
||||
|
||||
-- Analyze broken media (no duration)
|
||||
select
|
||||
mu.id,
|
||||
mu.token,
|
||||
u.username,
|
||||
mu.media_source,
|
||||
maybe_original_filename as filename,
|
||||
original_file_size_bytes as size_bytes,
|
||||
original_duration_millis as duration_millis,
|
||||
maybe_original_mime_type as mime_type
|
||||
from media_uploads as mu
|
||||
left join users AS u
|
||||
on u.token = mu.maybe_creator_user_token
|
||||
where mu.original_duration_millis = 0
|
||||
order by id desc
|
||||
limit 40;
|
||||
@@ -2,9 +2,6 @@
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Kill pending jobs
|
||||
update tts_inference_jobs set status = 'dead' where status = 'pending';
|
||||
|
||||
-- Total pending jobs
|
||||
select count(*)
|
||||
from tts_inference_jobs
|
||||
@@ -24,6 +21,23 @@ group by creator_ip_address
|
||||
order by attempts desc
|
||||
limit 50;
|
||||
|
||||
-- Top (IP addresses, usernames) making requests
|
||||
select distinct j.creator_ip_address, u.username, count(*) as attempts
|
||||
from tts_inference_jobs AS j
|
||||
left outer join users AS u
|
||||
on u.token = j.maybe_creator_user_token
|
||||
where j.status = 'pending'
|
||||
group by j.creator_ip_address, u.username
|
||||
order by attempts desc
|
||||
limit 50;
|
||||
|
||||
-- Find a job by an IP
|
||||
select *
|
||||
from tts_inference_jobs
|
||||
where status = 'pending'
|
||||
and creator_ip_address = '191.102.120.182'
|
||||
limit 1;
|
||||
|
||||
-- Top voices in requests
|
||||
select distinct model_token, count(*) as attempts
|
||||
from tts_inference_jobs
|
||||
@@ -32,17 +46,6 @@ group by model_token
|
||||
order by attempts desc
|
||||
limit 50;
|
||||
|
||||
|
||||
-- Kill pending jobs
|
||||
update tts_inference_jobs
|
||||
set status = 'dead'
|
||||
where status = 'pending';
|
||||
|
||||
-- Kill all waiting and in-progress jobs
|
||||
update tts_inference_jobs
|
||||
set status = 'dead'
|
||||
where status IN ('pending', 'started', 'attempt_failed');
|
||||
|
||||
-- Sample the pending inference text
|
||||
select creator_ip_address,
|
||||
model_token,
|
||||
|
||||
@@ -63,7 +63,7 @@ from (
|
||||
join users as u
|
||||
on u.token = m.creator_user_token
|
||||
order by r.use_count desc
|
||||
limit 25;
|
||||
limit 100;
|
||||
|
||||
|
||||
--
|
||||
@@ -125,7 +125,7 @@ from (
|
||||
join users as u
|
||||
on u.token = m.creator_user_token
|
||||
where m.created_at > ( CURDATE() - INTERVAL 31 DAY )
|
||||
AND u.username IN ( 'vegito1089', 'justinjohn0306')
|
||||
-- AND u.username IN ( 'vegito1089', 'justinjohn0306')
|
||||
order by r.use_count desc
|
||||
limit 100;
|
||||
|
||||
@@ -307,6 +307,21 @@ from (
|
||||
order by m.created_at desc
|
||||
limit 100;
|
||||
|
||||
-- Histogram of model contributions
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as model_count
|
||||
from tts_models
|
||||
group by created_date
|
||||
|
||||
-- Histogram of model contributions (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as model_count
|
||||
from tts_models
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
--
|
||||
-- Models deleted recently (voice actor take down)
|
||||
--
|
||||
|
||||
@@ -31,6 +31,29 @@ from (
|
||||
) as sample
|
||||
where sample.is_generated_on_prem IS TRUE;
|
||||
|
||||
-- Histogram of days of content per day
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
sum(duration_millis) / 1000 / 60 / 60 / 24 as days
|
||||
from tts_results
|
||||
group by created_date
|
||||
|
||||
-- Histogram of days of content per day (range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
sum(duration_millis) / 1000 / 60 / 60 / 24 as days
|
||||
from tts_results
|
||||
where date(created_at) >= "2023-01-01"
|
||||
group by created_date
|
||||
|
||||
-- Histogram of days of content per day (range)
|
||||
-- Maybe non-tablescan?
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
sum(duration_millis) / 1000 / 60 / 60 / 24 as days
|
||||
from tts_results
|
||||
where created_at > (CURDATE() - INTERVAL 30 DAY)
|
||||
group by created_date
|
||||
|
||||
-- Find TTS results for a single model
|
||||
select count(*) from tts_results
|
||||
@@ -64,14 +87,6 @@ ORDER BY created_at DESC
|
||||
|
||||
|
||||
|
||||
-- Delete TTS results for a single model
|
||||
-- Do this in short batches so a lock isn't held for prohibitively long.
|
||||
update tts_results
|
||||
set mod_deleted_at = NOW()
|
||||
where model_token = 'TM:ztt5s1be5tq6'
|
||||
and mod_deleted_at IS NULL
|
||||
limit 5000;
|
||||
|
||||
--- Search for particular text by a particular model
|
||||
SELECT
|
||||
raw_inference_text,
|
||||
@@ -104,7 +119,7 @@ WHERE
|
||||
|
||||
--- Search for 101soundboards.com using us
|
||||
SELECT
|
||||
r.maybe_creator_user_token, r.creator_ip_address
|
||||
r.maybe_creator_user_token, r.creator_ip_address, r.raw_inference_text
|
||||
FROM
|
||||
tts_results as r
|
||||
LEFT OUTER JOIN
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Example query for date ranges:
|
||||
select count(*)
|
||||
from users
|
||||
where created_at BETWEEN '2023-07-01 00:00:00' AND '2023-07-30 00:00:00';
|
||||
|
||||
--
|
||||
|
||||
-- Month by month subscriber usages.
|
||||
SELECT
|
||||
username,
|
||||
count(*) as total_use_count
|
||||
FROM (
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN tts_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at BETWEEN '2022-12-01 00:00:00' AND '2023-01-01 00:00:00'
|
||||
UNION
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN generic_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at BETWEEN '2022-12-01 00:00:00' AND '2023-01-01 00:00:00'
|
||||
UNION
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN w2l_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at BETWEEN '2022-12-01 00:00:00' AND '2023-01-01 00:00:00'
|
||||
) as t
|
||||
GROUP BY username
|
||||
ORDER BY total_use_count desc;
|
||||
|
||||
|
||||
+43
-1
@@ -37,7 +37,7 @@ FROM (
|
||||
x.use_count > 10;
|
||||
|
||||
|
||||
-- The first voice a paying customer uses
|
||||
-- The first TTS voice a paying customer uses
|
||||
-- TODO: List *all* of the voices a paying customer uses before they subscribe, not just the first.
|
||||
-- select first row of partially aggregate query: https://stackoverflow.com/a/73157541
|
||||
SELECT *
|
||||
@@ -78,6 +78,48 @@ FROM (
|
||||
) AS z
|
||||
ORDER BY use_count desc
|
||||
|
||||
|
||||
-- The first VC voice a paying customer uses
|
||||
-- TODO: List *all* of the voices a paying customer uses before they subscribe, not just the first.
|
||||
-- select first row of partially aggregate query: https://stackoverflow.com/a/73157541
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
m.token,
|
||||
m.title,
|
||||
count(*) as use_count,
|
||||
m.created_at,
|
||||
m.user_deleted_at,
|
||||
m.mod_deleted_at
|
||||
FROM voice_conversion_models AS m
|
||||
JOIN
|
||||
(
|
||||
SELECT
|
||||
model_token
|
||||
FROM (
|
||||
SELECT
|
||||
maybe_model_token as model_token,
|
||||
maybe_creator_user_token,
|
||||
row_number() over(partition by maybe_creator_user_token order by id asc) as rownum
|
||||
FROM
|
||||
generic_inference_jobs
|
||||
WHERE maybe_model_token IS NOT NULL
|
||||
AND maybe_creator_user_token IN
|
||||
(
|
||||
select distinct user_token
|
||||
from user_subscriptions
|
||||
where created_at > (CURDATE() - INTERVAL 2 DAY)
|
||||
)
|
||||
) AS x
|
||||
WHERE rownum = 1
|
||||
ORDER BY model_token desc
|
||||
) AS y
|
||||
ON m.token = y.model_token
|
||||
GROUP BY m.token
|
||||
) AS z
|
||||
ORDER BY use_count desc
|
||||
|
||||
|
||||
-- The last voice a paying customer uses
|
||||
-- select first row of partially aggregate query: https://stackoverflow.com/a/73157541
|
||||
SELECT *
|
||||
+47
-1
@@ -13,6 +13,52 @@ select count(*) from user_subscriptions;
|
||||
-- NB: "active" status users are current, treating "past_due" as active too (for now)
|
||||
select count(*) from user_subscriptions where maybe_stripe_subscription_status NOT IN ("canceled", "incomplete", "incomplete_expired");
|
||||
|
||||
-- ==================== TTS + VC + W2L ====================
|
||||
|
||||
-- Make sure the time intervals are the same!
|
||||
SELECT
|
||||
username,
|
||||
count(*) as total_use_count
|
||||
FROM (
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN tts_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at > NOW() - INTERVAL 31 DAY
|
||||
UNION
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN generic_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at > NOW() - INTERVAL 31 DAY
|
||||
UNION
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN w2l_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
SELECT DISTINCT user_token
|
||||
FROM user_subscriptions
|
||||
)
|
||||
AND j.created_at > NOW() - INTERVAL 31 DAY
|
||||
) as t
|
||||
GROUP BY username
|
||||
ORDER BY total_use_count desc
|
||||
|
||||
-- ==================== TEXT TO SPEECH====================
|
||||
|
||||
-- All paid subscribers generating results in the last week
|
||||
@@ -23,7 +69,7 @@ on u.token = j.maybe_creator_user_token
|
||||
WHERE u.token IN (
|
||||
select distinct user_token
|
||||
from user_subscriptions
|
||||
where maybe_stripe_subscription_status NOT IN ("canceled", "incomplete", "incomplete_expired")
|
||||
-- where maybe_stripe_subscription_status NOT IN ("canceled", "incomplete", "incomplete_expired")
|
||||
)
|
||||
AND j.created_at > NOW() - interval 7 day
|
||||
GROUP BY u.username
|
||||
@@ -0,0 +1,53 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
SELECT
|
||||
u.username as username,
|
||||
j.token as token
|
||||
FROM users AS u
|
||||
JOIN tts_inference_jobs AS j
|
||||
ON u.token = j.maybe_creator_user_token
|
||||
AND j.created_at > NOW() - INTERVAL 31 DAY
|
||||
|
||||
|
||||
SELECT
|
||||
t.maybe_creator_user_token as user_token,
|
||||
u.username,
|
||||
count(*) as usage_count,
|
||||
u.created_at
|
||||
FROM tts_results as t
|
||||
JOIN users as u
|
||||
ON u.token = t.maybe_creator_user_token
|
||||
WHERE t.maybe_creator_user_token IS NOT NULL
|
||||
GROUP BY t.maybe_creator_user_token
|
||||
ORDER BY usage_count DESC
|
||||
LIMIT 50000;
|
||||
|
||||
|
||||
SELECT
|
||||
v.maybe_creator_user_token as user_token,
|
||||
u.username,
|
||||
count(*) as usage_count
|
||||
FROM voice_conversion_results as v
|
||||
JOIN users as u
|
||||
ON u.token = v.maybe_creator_user_token
|
||||
WHERE v.maybe_creator_user_token IS NOT NULL
|
||||
GROUP BY v.maybe_creator_user_token
|
||||
ORDER BY usage_count DESC
|
||||
LIMIT 5000;
|
||||
|
||||
|
||||
SELECT
|
||||
w.maybe_creator_user_token as user_token,
|
||||
u.username,
|
||||
count(*) as usage_count
|
||||
FROM w2l_results as w
|
||||
JOIN users as u
|
||||
ON u.token = w.maybe_creator_user_token
|
||||
WHERE w.maybe_creator_user_token IS NOT NULL
|
||||
GROUP BY w.maybe_creator_user_token
|
||||
ORDER BY usage_count DESC
|
||||
LIMIT 5000;
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- All users
|
||||
select count(*) from users;
|
||||
|
||||
-- Users registered in the last year
|
||||
select count(*)
|
||||
from users
|
||||
where created_at > ( CURDATE() - INTERVAL 365 DAY )
|
||||
|
||||
-- Histogram of user signups
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as registered
|
||||
from users
|
||||
where date(created_at) >= "2023-01-01"
|
||||
group by created_date
|
||||
@@ -25,20 +25,26 @@ on u.token = m.creator_user_token
|
||||
where m.upload_count >= 5;
|
||||
|
||||
|
||||
|
||||
-- Upgrade top TTS model uploaders to a loyalty plan
|
||||
update users
|
||||
set maybe_loyalty_program_key = 'fakeyou_contributor'
|
||||
where token IN (
|
||||
select creator_user_token from
|
||||
(
|
||||
select count(*) as upload_count,
|
||||
creator_user_token
|
||||
from tts_models
|
||||
group by creator_user_token
|
||||
having upload_count >= 10
|
||||
order by upload_count desc
|
||||
) as t
|
||||
);
|
||||
-- Top VC model uploaders
|
||||
select
|
||||
u.id,
|
||||
u.token,
|
||||
u.username,
|
||||
u.created_at,
|
||||
u.maybe_stripe_customer_id,
|
||||
u.maybe_loyalty_program_key,
|
||||
m.upload_count
|
||||
from users as u
|
||||
join
|
||||
(
|
||||
select
|
||||
count(*) as upload_count,
|
||||
creator_user_token
|
||||
from voice_conversion_models
|
||||
group by creator_user_token
|
||||
order by upload_count desc
|
||||
) as m
|
||||
on u.token = m.creator_user_token
|
||||
where m.upload_count >= 5;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Inventory all
|
||||
select
|
||||
vc.id,
|
||||
vc.token,
|
||||
vc.model_type,
|
||||
vc.title,
|
||||
u.username,
|
||||
vc.original_download_url,
|
||||
vc.created_at,
|
||||
vc.updated_at,
|
||||
vc.user_deleted_at,
|
||||
vc.mod_deleted_at,
|
||||
vc.maybe_mod_comments
|
||||
from voice_conversion_models as vc
|
||||
left join users AS u on
|
||||
u.token = vc.creator_user_token;
|
||||
|
||||
-- Inventory non-deleted
|
||||
select
|
||||
vc.id,
|
||||
vc.token,
|
||||
vc.model_type,
|
||||
vc.title,
|
||||
u.username,
|
||||
vc.original_download_url,
|
||||
vc.created_at,
|
||||
vc.updated_at
|
||||
from voice_conversion_models as vc
|
||||
left join users AS u on
|
||||
u.token = vc.creator_user_token
|
||||
where
|
||||
vc.user_deleted_at IS NULL
|
||||
and vc.mod_deleted_at IS NULL
|
||||
order by vc.title asc;
|
||||
|
||||
-- Inventory duplicate non-deleted models
|
||||
select
|
||||
vc.id,
|
||||
vc.token,
|
||||
vc.model_type,
|
||||
vc.title,
|
||||
u.username,
|
||||
vc.original_download_url,
|
||||
vc.created_at,
|
||||
vc.updated_at
|
||||
from voice_conversion_models as vc
|
||||
left join users AS u on
|
||||
u.token = vc.creator_user_token
|
||||
where vc.original_download_url IN (
|
||||
select original_download_url from (
|
||||
select original_download_url,
|
||||
count(*) as duplicate_count
|
||||
from voice_conversion_models
|
||||
where user_deleted_at IS NULL
|
||||
and mod_deleted_at IS NULL
|
||||
group by original_download_url
|
||||
order by original_download_url desc
|
||||
) as duplicates
|
||||
where duplicate_count > 1
|
||||
)
|
||||
and vc.user_deleted_at IS NULL
|
||||
and vc.mod_deleted_at IS NULL
|
||||
order by
|
||||
vc.original_download_url asc,
|
||||
id asc;
|
||||
|
||||
-- order by vc.original_download_url ASC;
|
||||
|
||||
--
|
||||
-- Top 100 voice conversion models by use count
|
||||
-- (jobs table, not results table)
|
||||
--
|
||||
select
|
||||
m.token,
|
||||
m.model_type,
|
||||
m.title,
|
||||
u.username,
|
||||
r.use_count,
|
||||
m.created_at,
|
||||
m.user_deleted_at,
|
||||
m.mod_deleted_at
|
||||
from (
|
||||
select maybe_model_token, count(*) as use_count
|
||||
from generic_inference_jobs
|
||||
where maybe_model_token IS NOT NULL
|
||||
group by maybe_model_token
|
||||
) as r
|
||||
join voice_conversion_models as m
|
||||
on m.token = r.maybe_model_token
|
||||
join users as u
|
||||
on u.token = m.creator_user_token
|
||||
order by r.use_count desc
|
||||
limit 100;
|
||||
|
||||
|
||||
--
|
||||
-- Top 100 voice conversion models by use count (NON DELETED)
|
||||
-- (jobs table, not results table)
|
||||
--
|
||||
select
|
||||
m.token,
|
||||
m.model_type,
|
||||
m.title,
|
||||
u.username,
|
||||
r.use_count,
|
||||
m.created_at
|
||||
from (
|
||||
select maybe_model_token, count(*) as use_count
|
||||
from generic_inference_jobs
|
||||
where maybe_model_token IS NOT NULL
|
||||
group by maybe_model_token
|
||||
) as r
|
||||
join voice_conversion_models as m
|
||||
on m.token = r.maybe_model_token
|
||||
join users as u
|
||||
on u.token = m.creator_user_token
|
||||
where m.user_deleted_at IS NULL
|
||||
and m.mod_deleted_at IS NULL
|
||||
order by r.use_count desc
|
||||
limit 100;
|
||||
|
||||
|
||||
--
|
||||
-- Top 100 voice conversion models by use count (NON DELETED, LAST 7 DAYS)
|
||||
-- (jobs table, not results table)
|
||||
--
|
||||
select
|
||||
m.token,
|
||||
m.model_type,
|
||||
m.title,
|
||||
u.username,
|
||||
r.use_count,
|
||||
m.created_at
|
||||
from (
|
||||
select maybe_model_token, count(*) as use_count
|
||||
from generic_inference_jobs
|
||||
where maybe_model_token IS NOT NULL
|
||||
and created_at > ( CURDATE() - INTERVAL 7 day)
|
||||
group by maybe_model_token
|
||||
) as r
|
||||
join voice_conversion_models as m
|
||||
on m.token = r.maybe_model_token
|
||||
join users as u
|
||||
on u.token = m.creator_user_token
|
||||
where m.user_deleted_at IS NULL
|
||||
and m.mod_deleted_at IS NULL
|
||||
order by r.use_count desc
|
||||
limit 100;
|
||||
|
||||
|
||||
|
||||
-- Histogram of model contributions
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as model_count
|
||||
from voice_conversion_models
|
||||
group by created_date
|
||||
|
||||
-- Histogram of model contributions (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as model_count
|
||||
from voice_conversion_models
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Histogram of days of content per day
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
sum(duration_millis) / 1000 / 60 / 60 / 24 as days
|
||||
from voice_conversion_results
|
||||
group by created_date
|
||||
|
||||
@@ -5,3 +5,26 @@
|
||||
-- Pending job count
|
||||
select count(*) from w2l_inference_jobs where status='pending';
|
||||
|
||||
-- Histogram of inference
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from w2l_inference_jobs
|
||||
group by created_date
|
||||
|
||||
-- Histogram of inference (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from w2l_inference_jobs
|
||||
where date(created_at) >= "2023-01-01"
|
||||
group by created_date
|
||||
|
||||
-- Histogram of inference (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as job_count
|
||||
from w2l_inference_jobs
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Histogram of results
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as result_count
|
||||
from w2l_results
|
||||
group by created_date
|
||||
|
||||
-- Histogram of results and durations
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
sum(duration_millis) / 1000 / 60 / 60 as hours,
|
||||
avg(duration_millis) / 60 as average_seconds,
|
||||
count(*) as video_count
|
||||
from w2l_results
|
||||
group by created_date
|
||||
|
||||
-- Histogram of results (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as result_count
|
||||
from w2l_results
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
-- Created by date (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as use_count
|
||||
from w2l_results
|
||||
where date(created_at) > "2023-07-31"
|
||||
group by created_date
|
||||
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as created_count
|
||||
from tts_inference_jobs
|
||||
where created_at > (CURDATE() - INTERVAL 90 DAY)
|
||||
group by created_date
|
||||
@@ -14,15 +14,3 @@ from w2l_template_upload_jobs
|
||||
where status='started'
|
||||
and created_at < ( CURDATE() - INTERVAL 1 DAY );
|
||||
|
||||
-- Unstick old jobs that might be stuck as "started"
|
||||
update w2l_template_upload_jobs
|
||||
set status='dead'
|
||||
where status='started'
|
||||
and created_at < ( CURDATE() - INTERVAL 1 DAY );
|
||||
|
||||
-- Kill pending jobs with tiktok URLs:
|
||||
-- These need to be blocked in the server and job directly.
|
||||
update w2l_template_upload_jobs
|
||||
set status='dead'
|
||||
where status='pending'
|
||||
and download_url LIKE '%tiktok%';
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Histogram of template contributions
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as template_count
|
||||
from w2l_templates
|
||||
group by created_date
|
||||
|
||||
-- Histogram of template contributions (within range)
|
||||
select
|
||||
date(created_at) as created_date,
|
||||
count(*) as template_count
|
||||
from w2l_templates
|
||||
where created_at > (CURDATE() - INTERVAL 5 DAY)
|
||||
group by created_date
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN public_bucket_hash;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN bucket_has_wav;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN bucket_has_mp3;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN bucket_has_mp4;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN bucket_has_webm;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN bucket_has_spectrogram;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN public_bucket_directory_full_path VARCHAR(255) NOT NULL
|
||||
AFTER maybe_creator_synthetic_id;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN public_bucket_wav_audio_object_name VARCHAR(255) NOT NULL
|
||||
AFTER public_bucket_directory_full_path;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN public_bucket_spectrogram_object_name VARCHAR(255) NOT NULL
|
||||
AFTER public_bucket_wav_audio_object_name;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN public_bucket_video_object_name VARCHAR(255) NOT NULL
|
||||
AFTER public_bucket_spectrogram_object_name;
|
||||
@@ -0,0 +1,39 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- These columns are no longer useful.
|
||||
-- It's better to store booleans for each type of file we store and calculate the paths.
|
||||
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN public_bucket_directory_full_path;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN public_bucket_wav_audio_object_name;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN public_bucket_spectrogram_object_name;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN public_bucket_video_object_name;
|
||||
|
||||
-- The hash will contain the key information for where files live
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN public_bucket_hash VARCHAR(64) NOT NULL
|
||||
AFTER maybe_creator_synthetic_id;
|
||||
|
||||
-- The boolean flags will tell what we store.
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN bucket_has_wav BOOLEAN NOT NULL DEFAULT FALSE
|
||||
AFTER public_bucket_hash;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN bucket_has_mp3 BOOLEAN NOT NULL DEFAULT FALSE
|
||||
AFTER bucket_has_wav;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN bucket_has_mp4 BOOLEAN NOT NULL DEFAULT FALSE
|
||||
AFTER bucket_has_mp3;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN bucket_has_webm BOOLEAN NOT NULL DEFAULT FALSE
|
||||
AFTER bucket_has_mp4;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN bucket_has_spectrogram BOOLEAN NOT NULL DEFAULT FALSE
|
||||
AFTER bucket_has_webm;
|
||||
@@ -0,0 +1,15 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
DROP INDEX `fk_media_token_and_media_token_type` ON `voice_conversion_results`;
|
||||
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN media_token_type;
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN generated_by_cluster;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN maybe_vocoder_token VARCHAR(64) DEFAULT NULL
|
||||
AFTER model_token;
|
||||
|
||||
CREATE INDEX `fk_maybe_vocoder_token`
|
||||
ON `voice_conversion_results` (`maybe_vocoder_token`);
|
||||
@@ -0,0 +1,20 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- There isn't a vocoder, and even if so, it doesn't need to be referenced here.
|
||||
|
||||
DROP INDEX `fk_maybe_vocoder_token` ON `voice_conversion_results`;
|
||||
|
||||
ALTER TABLE voice_conversion_results DROP COLUMN maybe_vocoder_token;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN media_token_type VARCHAR(32) NOT NULL
|
||||
AFTER media_token;
|
||||
|
||||
ALTER TABLE voice_conversion_results
|
||||
ADD COLUMN generated_by_cluster VARCHAR(255) NOT NULL
|
||||
AFTER generated_by_worker;
|
||||
|
||||
CREATE INDEX `fk_media_token_and_media_token_type`
|
||||
ON `voice_conversion_results` (`media_token`, `media_token_type`);
|
||||
@@ -0,0 +1,9 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
DROP INDEX `fk_maybe_input_source_token` ON `generic_inference_jobs`;
|
||||
DROP INDEX `fk_maybe_input_source_token_and_type` ON `generic_inference_jobs`;
|
||||
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN maybe_input_source_token;
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN maybe_input_source_token_type;
|
||||
@@ -0,0 +1,17 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN maybe_input_source_token VARCHAR(32) DEFAULT NULL
|
||||
AFTER maybe_model_token;
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN maybe_input_source_token_type VARCHAR(32) DEFAULT NULL
|
||||
AFTER maybe_input_source_token;
|
||||
|
||||
CREATE INDEX `fk_maybe_input_source_token`
|
||||
ON `generic_inference_jobs` (`maybe_input_source_token`);
|
||||
|
||||
CREATE INDEX `fk_maybe_input_source_token_and_type`
|
||||
ON `generic_inference_jobs` (`maybe_input_source_token`, `maybe_input_source_token_type`);
|
||||
@@ -0,0 +1,10 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_uploads
|
||||
ADD COLUMN public_bucket_directory_full_path VARCHAR(255) NOT NULL
|
||||
AFTER public_bucket_directory_hash;
|
||||
|
||||
ALTER TABLE media_uploads
|
||||
RENAME COLUMN maybe_extra_file_modification_info TO extra_file_modification_info ;
|
||||
@@ -0,0 +1,8 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_uploads DROP COLUMN public_bucket_directory_full_path;
|
||||
|
||||
ALTER TABLE media_uploads
|
||||
RENAME COLUMN extra_file_modification_info TO maybe_extra_file_modification_info;
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_uploads DROP COLUMN media_source;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_uploads
|
||||
ADD COLUMN media_source VARCHAR(16) NOT NULL
|
||||
AFTER media_type;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user