mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 06:14:52 -05:00
Compare commits
192
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cb11fbf7e | ||
|
|
83b21f8965 | ||
|
|
dc139a6199 | ||
|
|
c71a7de5be | ||
|
|
559a9e1f4d | ||
|
|
ea8a911ba3 | ||
|
|
ce28899e4c | ||
|
|
501eb24cd8 | ||
|
|
07d8125de9 | ||
|
|
aa9e1c2fe4 | ||
|
|
3d64537e87 | ||
|
|
9c674b1579 | ||
|
|
c6c94cfe56 | ||
|
|
835bbe35c6 | ||
|
|
029e29bf9a | ||
|
|
57956c8124 | ||
|
|
ea269459e6 | ||
|
|
716589f62c | ||
|
|
2d5188ba91 | ||
|
|
d5205e764e | ||
|
|
3d8c01f8fe | ||
|
|
f0a328c059 | ||
|
|
c87b1ba20d | ||
|
|
d8f8735eca | ||
|
|
a2098b52d1 | ||
|
|
b8ccb9f6e0 | ||
|
|
8dc3d29daf | ||
|
|
42dfa3aa51 | ||
|
|
9ca42b370e | ||
|
|
ef9cc7de72 | ||
|
|
e7367bdfe7 | ||
|
|
467d849121 | ||
|
|
e98091c406 | ||
|
|
c9c4fd59d9 | ||
|
|
48b1f6306b | ||
|
|
98c087116b | ||
|
|
f13458a4e7 | ||
|
|
9903a31530 | ||
|
|
130326e7de | ||
|
|
d7295d79a1 | ||
|
|
c00e0c59f3 | ||
|
|
3dc271bb84 | ||
|
|
7bac45cad1 | ||
|
|
3cc0da13de | ||
|
|
1aa7914eee | ||
|
|
d4bda54911 | ||
|
|
30cef2bc57 | ||
|
|
e462f0c08a | ||
|
|
04c0e09d6f | ||
|
|
319a8f0ba8 | ||
|
|
4fa4a0a4e1 | ||
|
|
89099a4ef8 | ||
|
|
53b2aedbb0 | ||
|
|
5936ef87f4 | ||
|
|
00abb6230b | ||
|
|
fa21d8251e | ||
|
|
17b38a62cf | ||
|
|
132230bbbe | ||
|
|
be49dbd11e | ||
|
|
1b97d638a8 | ||
|
|
bd653c70d8 | ||
|
|
dc31723f63 | ||
|
|
6b03981ef9 | ||
|
|
d4a4ac4077 | ||
|
|
32acf33eeb | ||
|
|
c9060d973f | ||
|
|
a64990230e | ||
|
|
a3c6cc5b03 | ||
|
|
f16ca22110 | ||
|
|
5fa8bb93ce | ||
|
|
91e8a51216 | ||
|
|
7bd95d2078 | ||
|
|
e0f141fa74 | ||
|
|
029798e665 | ||
|
|
850e1b3c10 | ||
|
|
e1ea2cdf67 | ||
|
|
74ed7f365b | ||
|
|
e327a8648c | ||
|
|
88c68ccf9b | ||
|
|
2e5fdd91d3 | ||
|
|
44135d8d10 | ||
|
|
0d7afb10c2 | ||
|
|
dd76a6fea1 | ||
|
|
1886f40a9b | ||
|
|
f54ddb0acb | ||
|
|
a7b5cc9fc3 | ||
|
|
0e24e38576 | ||
|
|
6bc6bf0c24 | ||
|
|
fb2b5c9735 | ||
|
|
3d04302de1 | ||
|
|
7e169e3b51 | ||
|
|
5ba8d876f0 | ||
|
|
44845ad54e | ||
|
|
6ca7cbee31 | ||
|
|
2cf821d450 | ||
|
|
d5ef9c0b78 | ||
|
|
6284b2a32f | ||
|
|
a104ae37aa | ||
|
|
fa3f506f27 | ||
|
|
eb4f06179e | ||
|
|
6c86764798 | ||
|
|
cfa9558a33 | ||
|
|
2cadfb105b | ||
|
|
97560cb1f7 | ||
|
|
7450dd1525 | ||
|
|
d8e066dc23 | ||
|
|
fdae854e3f | ||
|
|
541695f028 | ||
|
|
0719a929f8 | ||
|
|
c0c86c90b8 | ||
|
|
a5c8f5fdc6 | ||
|
|
58210f0c25 | ||
|
|
ccf910e456 | ||
|
|
d9197d2fd9 | ||
|
|
61d32a1790 | ||
|
|
361b0e0894 | ||
|
|
12070bc399 | ||
|
|
a49b8b4b74 | ||
|
|
2422f6d0aa | ||
|
|
a1fc56ecee | ||
|
|
05025d8817 | ||
|
|
bcea80c39b | ||
|
|
cf59c8e2fc | ||
|
|
5528993768 | ||
|
|
da9e03e3ae | ||
|
|
76b8b07d8a | ||
|
|
14cba8b8ed | ||
|
|
55805c2d75 | ||
|
|
ae80de8508 | ||
|
|
b965bfb602 | ||
|
|
f08cc3fd4a | ||
|
|
b7853b8914 | ||
|
|
26d5d6d272 | ||
|
|
4e20f63f87 | ||
|
|
c8fa722b3d | ||
|
|
0540d2caba | ||
|
|
449c29e824 | ||
|
|
bf4bd8f21c | ||
|
|
59bcf8b040 | ||
|
|
9785f3292d | ||
|
|
6f7262d0e8 | ||
|
|
ec0b475457 | ||
|
|
47db5d0f3d | ||
|
|
e9de700f2c | ||
|
|
f365f1a02f | ||
|
|
bfebf60289 | ||
|
|
f0f2788e1b | ||
|
|
33b66f388f | ||
|
|
387cb22e65 | ||
|
|
7248425f30 | ||
|
|
cc0e3a2f01 | ||
|
|
aa719ba56f | ||
|
|
1da489a177 | ||
|
|
e777d996bc | ||
|
|
eeb6d486e1 | ||
|
|
57ca10f23d | ||
|
|
7b97c3bfd2 | ||
|
|
111383a0ae | ||
|
|
542a7c7116 | ||
|
|
c6dc35eccb | ||
|
|
d8fbc09867 | ||
|
|
2b0ebd5350 | ||
|
|
8d22697855 | ||
|
|
6cdbe9ea00 | ||
|
|
15db937039 | ||
|
|
a01bde2a4b | ||
|
|
98bf91fa17 | ||
|
|
6f4fe5c542 | ||
|
|
ebae1dbc9f | ||
|
|
39a07b25f5 | ||
|
|
168afd72cd | ||
|
|
8ba103fd2b | ||
|
|
ef53d96a27 | ||
|
|
ebc6834128 | ||
|
|
ea1090b8ef | ||
|
|
3415ad4e80 | ||
|
|
1238f95af8 | ||
|
|
69e6a73ef4 | ||
|
|
51ce0c29cb | ||
|
|
e45ee58cdf | ||
|
|
06feb58d83 | ||
|
|
e91f57944e | ||
|
|
84a2aa6108 | ||
|
|
968af24ccc | ||
|
|
edb2a7f95a | ||
|
|
aff8d5d310 | ||
|
|
55367e8723 | ||
|
|
957b68f679 | ||
|
|
20832a9af9 | ||
|
|
7eb93c7600 | ||
|
|
5298c028e0 | ||
|
|
ad32bdb119 |
@@ -64,6 +64,8 @@ HIFIGAN_ROOT_CODE_DIRECTORY=/home/bt/dev/storyteller/storyteller-ml/tts
|
||||
HIFIGAN_VIRTUAL_ENV_ACTIVATION_COMMAND="source python/bin/activate"
|
||||
HIFIGAN_MODEL_CHECK_SCRIPT_NAME="vocodes_model_check_hifigan.py"
|
||||
|
||||
DOWNLOAD_SCRIPT="/home/tensor/code/storyteller/web-downloader/.venv/bin/python3.11 /home/tensor/code/storyteller/web-downloader/download_internet_file.py"
|
||||
|
||||
TTS_INFERENCE_SIDECAR_HOSTNAME=localhost:8000
|
||||
|
||||
#TTS_WAVEGLOW_VOCODER_MODEL_FILENAME=waveglow_256channels_universal_v5.pt # THIS SOUNDS HORRID
|
||||
@@ -76,4 +78,5 @@ TTS_HIFIGAN_SUPERRES_VOCODER_MODEL_FILENAME=hifigan_superres_twilight_33000.pt
|
||||
# Development key. Permissible to check in.
|
||||
NEWRELIC_API_KEY=c402be1c4c4216ec83d0cfc0851520cfFFFFNRAL
|
||||
|
||||
# DO NOT UNCOMMENT THIS :P :P :P
|
||||
#STORYTELLER_ROOT="/home/tensor/code/storyteller/" # Put this in .env-secrets so that not everyone gets this setting.
|
||||
|
||||
@@ -17,6 +17,7 @@ production_database_voice_clone_report_download.sh
|
||||
secrets.toml
|
||||
secrets.yaml
|
||||
twitch_secrets.toml
|
||||
.DS_Store
|
||||
|
||||
# Old env secrets
|
||||
.*-secrets
|
||||
|
||||
Generated
+1
@@ -26,6 +26,7 @@
|
||||
<w>hparams</w>
|
||||
<w>huggingface</w>
|
||||
<w>lipsync</w>
|
||||
<w>mocap</w>
|
||||
<w>mochi</w>
|
||||
<w>nestedness</w>
|
||||
<w>pathbuf</w>
|
||||
|
||||
+43
-21
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nWHERE\n m.token = ?\n AND m.user_deleted_at IS NULL\n AND m.mod_deleted_at IS NULL\n ",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_text_transcript,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nWHERE\n m.token = ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,6 +65,26 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
"flags": "BLOB | BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 262140
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -74,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -84,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -104,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -114,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -164,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -174,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -184,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 20,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -194,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -204,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -214,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 23,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -224,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 24,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -234,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -244,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 26,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -254,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 27,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -274,6 +294,8 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -296,5 +318,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "06e0c5e80803d072551bc4df40e7d273ba0772608d52b46b840249415c341945"
|
||||
"hash": "00a60f2949c7e639eb5cead57615c9806d815c64ffdbe38bf06f6646fae0e065"
|
||||
}
|
||||
+4
-4
@@ -157,7 +157,7 @@
|
||||
"ordinal": 15,
|
||||
"name": "file_size_bytes",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
"type": "LongLong",
|
||||
"flags": "NOT_NULL",
|
||||
"char_set": 63,
|
||||
"max_size": 10
|
||||
@@ -288,7 +288,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -298,7 +298,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -308,7 +308,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nINSERT INTO generic_inference_jobs\nSET\n token = ?,\n uuid_idempotency_token = ?,\n\n inference_category = ?,\n maybe_model_type = ?,\n maybe_model_token = ?,\n\n maybe_input_source_token = ?,\n maybe_input_source_token_type = ?,\n\n maybe_raw_inference_text = ?,\n\n maybe_inference_args = ?,\n\n maybe_creator_user_token = ?,\n maybe_creator_anonymous_visitor_token = ?,\n creator_ip_address = ?,\n\n creator_set_visibility = ?,\n\n priority_level = ?,\n is_keepalive_required = ?,\n max_duration_seconds = ?,\n\n is_debug_request = ?,\n maybe_routing_tag = ?,\n\n status = \"pending\"\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 18
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "0d780caac7560f84efb50bd2ed876cbdd728b32e26b73dfbb3009ada12985405"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n INSERT INTO model_weights\n SET\n token = ?,\n weights_type = ?,\n weights_category = ?,\n title = ?,\n maybe_cover_image_media_file_token = ?,\n maybe_description_markdown = ?,\n maybe_description_rendered_html = ?,\n creator_user_token = ?,\n creator_ip_address = ?,\n creator_set_visibility = ?,\n maybe_last_update_user_token = ?,\n original_download_url = ?,\n original_filename = ?,\n file_size_bytes = ?,\n file_checksum_sha2 = ?,\n public_bucket_hash = ?,\n maybe_public_bucket_prefix = ?,\n maybe_public_bucket_extension = ?,\n version = ?\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 19
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "178b4b8e5c51aedd1cd65581426d868ecd7912c6ee97140d1351115895106164"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n INSERT INTO media_files\n SET\n token = ?,\n media_type = ?,\n\n origin_category = ?, \n origin_product_category = ?, \n maybe_origin_model_type = ?, \n maybe_origin_model_token = ?, \n maybe_origin_filename = ?,\n\n is_batch_generated = ?,\n maybe_batch_token = ?,\n\n maybe_mime_type = ?,\n file_size_bytes = ?,\n maybe_duration_millis = ?,\n maybe_audio_encoding = ?, \n maybe_video_encoding = ?, \n maybe_frame_width = ?, \n maybe_frame_height = ?, \n checksum_sha2 = ?,\n\n public_bucket_directory_hash = ?, \n maybe_public_bucket_prefix = ?, \n maybe_public_bucket_extension = ?, \n extra_file_modification_info = ?, \n\n maybe_creator_user_token = ?, \n maybe_creator_anonymous_visitor_token = ?, \n\n creator_ip_address = ?, \n creator_set_visibility = ?, \n\n maybe_creator_file_synthetic_id = ?, \n maybe_creator_category_synthetic_id = ?,\n\n maybe_mod_user_token = ?, \n is_generated_on_prem = ?, \n generated_by_worker = ?, \n generated_by_cluster = ?\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 31
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "38b93187e20b51c7950bf9c5500890c15a00eec76a1bdf7501f349125ce7e4c4"
|
||||
}
|
||||
+31
-20
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n users.token as user_token,\n users.username,\n users.display_name,\n\n users.email_address,\n users.email_confirmed,\n users.email_gravatar_hash,\n\n users.maybe_stripe_customer_id,\n users.maybe_loyalty_program_key,\n\n users.disable_gravatar,\n users.auto_play_audio_preference,\n users.auto_play_video_preference,\n users.preferred_tts_result_visibility as `preferred_tts_result_visibility: enums::common::visibility::Visibility`,\n users.preferred_w2l_result_visibility as `preferred_w2l_result_visibility: enums::common::visibility::Visibility`,\n\n users.user_role_slug,\n users.is_banned,\n\n user_roles.can_use_tts,\n user_roles.can_use_w2l,\n user_roles.can_delete_own_tts_results,\n user_roles.can_delete_own_w2l_results,\n user_roles.can_delete_own_account,\n\n user_roles.can_upload_tts_models,\n user_roles.can_upload_w2l_templates,\n user_roles.can_delete_own_tts_models,\n user_roles.can_delete_own_w2l_templates,\n\n user_roles.can_approve_w2l_templates,\n user_roles.can_edit_other_users_profiles,\n user_roles.can_edit_other_users_tts_models,\n user_roles.can_edit_other_users_w2l_templates,\n user_roles.can_delete_other_users_tts_models,\n user_roles.can_delete_other_users_tts_results,\n user_roles.can_delete_other_users_w2l_templates,\n user_roles.can_delete_other_users_w2l_results,\n user_roles.can_ban_users,\n user_roles.can_delete_users\n\nFROM users\nLEFT OUTER JOIN user_sessions\n ON users.token = user_sessions.user_token\nLEFT OUTER JOIN user_roles\n ON users.user_role_slug = user_roles.slug\nWHERE user_sessions.token = ?\n AND user_sessions.deleted_at IS NULL\n AND users.user_deleted_at IS NULL\n AND users.mod_deleted_at IS NULL\n ",
|
||||
"query": "\nSELECT\n users.token as user_token,\n users.username,\n users.display_name,\n\n users.email_address,\n users.email_confirmed,\n users.email_gravatar_hash,\n\n users.maybe_stripe_customer_id,\n users.maybe_loyalty_program_key,\n\n users.disable_gravatar,\n users.auto_play_audio_preference,\n users.auto_play_video_preference,\n users.preferred_tts_result_visibility as `preferred_tts_result_visibility: enums::common::visibility::Visibility`,\n users.preferred_w2l_result_visibility as `preferred_w2l_result_visibility: enums::common::visibility::Visibility`,\n\n users.user_role_slug,\n users.is_banned,\n\n users.can_access_studio,\n\n user_roles.can_use_tts,\n user_roles.can_use_w2l,\n user_roles.can_delete_own_tts_results,\n user_roles.can_delete_own_w2l_results,\n user_roles.can_delete_own_account,\n\n user_roles.can_upload_tts_models,\n user_roles.can_upload_w2l_templates,\n user_roles.can_delete_own_tts_models,\n user_roles.can_delete_own_w2l_templates,\n\n user_roles.can_approve_w2l_templates,\n user_roles.can_edit_other_users_profiles,\n user_roles.can_edit_other_users_tts_models,\n user_roles.can_edit_other_users_w2l_templates,\n user_roles.can_delete_other_users_tts_models,\n user_roles.can_delete_other_users_tts_results,\n user_roles.can_delete_other_users_w2l_templates,\n user_roles.can_delete_other_users_w2l_results,\n user_roles.can_ban_users,\n user_roles.can_delete_users\n\nFROM users\nLEFT OUTER JOIN user_sessions\n ON users.token = user_sessions.user_token\nLEFT OUTER JOIN user_roles\n ON users.user_role_slug = user_roles.slug\nWHERE user_sessions.token = ?\n AND user_sessions.deleted_at IS NULL\n AND users.user_deleted_at IS NULL\n AND users.mod_deleted_at IS NULL\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -155,6 +155,16 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"name": "can_access_studio",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY",
|
||||
"char_set": 63,
|
||||
"max_size": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"name": "can_use_tts",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -164,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 17,
|
||||
"name": "can_use_w2l",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -174,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 18,
|
||||
"name": "can_delete_own_tts_results",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -184,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 19,
|
||||
"name": "can_delete_own_w2l_results",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -194,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 20,
|
||||
"name": "can_delete_own_account",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -204,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 21,
|
||||
"name": "can_upload_tts_models",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -214,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 22,
|
||||
"name": "can_upload_w2l_templates",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -224,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 23,
|
||||
"name": "can_delete_own_tts_models",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -234,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 24,
|
||||
"name": "can_delete_own_w2l_templates",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -244,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 25,
|
||||
"name": "can_approve_w2l_templates",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -254,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 26,
|
||||
"name": "can_edit_other_users_profiles",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -264,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 27,
|
||||
"name": "can_edit_other_users_tts_models",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -274,7 +284,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 27,
|
||||
"ordinal": 28,
|
||||
"name": "can_edit_other_users_w2l_templates",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -284,7 +294,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 28,
|
||||
"ordinal": 29,
|
||||
"name": "can_delete_other_users_tts_models",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -294,7 +304,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"ordinal": 30,
|
||||
"name": "can_delete_other_users_tts_results",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -304,7 +314,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 30,
|
||||
"ordinal": 31,
|
||||
"name": "can_delete_other_users_w2l_templates",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -314,7 +324,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 31,
|
||||
"ordinal": 32,
|
||||
"name": "can_delete_other_users_w2l_results",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -324,7 +334,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 32,
|
||||
"ordinal": 33,
|
||||
"name": "can_ban_users",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -334,7 +344,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 33,
|
||||
"ordinal": 34,
|
||||
"name": "can_delete_users",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -363,6 +373,7 @@
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
@@ -384,5 +395,5 @@
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "07d330b4c2e6b0dc76e2e61a3b44b47b8d287adf5eb0646f6cf2876655581a13"
|
||||
"hash": "423109f2dcee23a558c43ecaab0eb2836714d5316620daaa1127b447cad59212"
|
||||
}
|
||||
+1
-1
@@ -118,7 +118,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n INSERT INTO media_files\n SET\n token = ?,\n \n origin_category = ?,\n origin_product_category = ?,\n maybe_origin_model_type = ?,\n \n media_type = ?,\n maybe_mime_type = ?,\n file_size_bytes = ?,\n \n checksum_sha2 = ?,\n \n public_bucket_directory_hash = ?,\n maybe_public_bucket_prefix = ?,\n maybe_public_bucket_extension = ?,\n \n maybe_creator_user_token = ?,\n maybe_creator_anonymous_visitor_token = ?,\n creator_ip_address = ?,\n \n creator_set_visibility = ?,\n \n maybe_creator_file_synthetic_id = ?,\n maybe_creator_category_synthetic_id = ?,\n \n is_generated_on_prem = ?,\n generated_by_worker = ?,\n generated_by_cluster = ?\n \n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 20
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "567937a5918833330b74f94724eb69628aae49705ec4f8028321c38625eaa60c"
|
||||
}
|
||||
+1
-1
@@ -118,7 +118,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n SELECT\n token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n updated_at\n FROM model_weights\n WHERE\n updated_at > ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "5c67010afd0bb8aa3cd8f6c2407c4c314ace016f816eca51991720a276340d41"
|
||||
}
|
||||
+26
-15
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n jobs.token as `job_token: tokens::tokens::generic_inference_jobs::InferenceJobToken`,\n\n jobs.status as `status: enums::common::job_status_plus::JobStatusPlus`,\n jobs.attempt_count,\n\n jobs.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n jobs.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n jobs.creator_ip_address,\n\n jobs.inference_category as `inference_category: enums::by_table::generic_inference_jobs::inference_category::InferenceCategory`,\n jobs.maybe_model_type,\n jobs.maybe_model_token,\n jobs.maybe_raw_inference_text,\n\n jobs.frontend_failure_category as `maybe_frontend_failure_category: enums::by_table::generic_inference_jobs::frontend_failure_category::FrontendFailureCategory`,\n\n jobs.on_success_result_entity_type as maybe_result_entity_type,\n jobs.on_success_result_entity_token as maybe_result_entity_token,\n\n tts_models.title as maybe_tts_model_title,\n voice_conversion_models.title as maybe_voice_conversion_model_title,\n\n tts_results.public_bucket_wav_audio_path as maybe_tts_public_bucket_path,\n voice_conversion_results.public_bucket_hash as maybe_voice_conversion_public_bucket_hash,\n\n media_files.public_bucket_directory_hash as maybe_media_file_public_bucket_directory_hash,\n media_files.maybe_public_bucket_prefix as maybe_media_file_public_bucket_prefix,\n media_files.maybe_public_bucket_extension as maybe_media_file_public_bucket_extension,\n\n jobs.assigned_worker as maybe_assigned_worker,\n jobs.assigned_cluster as maybe_assigned_cluster,\n\n jobs.is_keepalive_required,\n\n jobs.created_at,\n jobs.updated_at,\n\n jobs.first_started_at as maybe_first_started_at,\n jobs.successfully_completed_at as maybe_successfully_completed_at\n\nFROM generic_inference_jobs as jobs\n\nLEFT OUTER JOIN tts_models ON jobs.maybe_model_token = tts_models.token\nLEFT OUTER JOIN voice_conversion_models ON jobs.maybe_model_token = voice_conversion_models.token\n\nLEFT OUTER JOIN tts_results ON jobs.on_success_result_entity_token = tts_results.token\nLEFT OUTER JOIN voice_conversion_results ON jobs.on_success_result_entity_token = voice_conversion_results.token\nLEFT OUTER JOIN media_files ON jobs.on_success_result_entity_token = media_files.token\n\nWHERE jobs.token = ?\n ",
|
||||
"query": "\nSELECT\n jobs.token as `job_token: tokens::tokens::generic_inference_jobs::InferenceJobToken`,\n\n jobs.status as `status: enums::common::job_status_plus::JobStatusPlus`,\n jobs.attempt_count,\n\n jobs.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n jobs.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n jobs.creator_ip_address,\n\n jobs.inference_category as `inference_category: enums::by_table::generic_inference_jobs::inference_category::InferenceCategory`,\n jobs.maybe_model_type,\n jobs.maybe_model_token,\n jobs.maybe_raw_inference_text,\n\n jobs.frontend_failure_category as `maybe_frontend_failure_category: enums::by_table::generic_inference_jobs::frontend_failure_category::FrontendFailureCategory`,\n\n jobs.on_success_result_entity_type as maybe_result_entity_type,\n jobs.on_success_result_entity_token as maybe_result_entity_token,\n\n model_weights.title as maybe_model_weights_title,\n tts_models.title as maybe_tts_model_title,\n voice_conversion_models.title as maybe_voice_conversion_model_title,\n\n tts_results.public_bucket_wav_audio_path as maybe_tts_public_bucket_path,\n voice_conversion_results.public_bucket_hash as maybe_voice_conversion_public_bucket_hash,\n\n media_files.public_bucket_directory_hash as maybe_media_file_public_bucket_directory_hash,\n media_files.maybe_public_bucket_prefix as maybe_media_file_public_bucket_prefix,\n media_files.maybe_public_bucket_extension as maybe_media_file_public_bucket_extension,\n\n jobs.assigned_worker as maybe_assigned_worker,\n jobs.assigned_cluster as maybe_assigned_cluster,\n\n jobs.is_keepalive_required,\n\n jobs.created_at,\n jobs.updated_at,\n\n jobs.first_started_at as maybe_first_started_at,\n jobs.successfully_completed_at as maybe_successfully_completed_at\n\nFROM generic_inference_jobs as jobs\n\nLEFT OUTER JOIN model_weights ON jobs.maybe_model_token = model_weights.token\nLEFT OUTER JOIN tts_models ON jobs.maybe_model_token = tts_models.token\nLEFT OUTER JOIN voice_conversion_models ON jobs.maybe_model_token = voice_conversion_models.token\n\nLEFT OUTER JOIN tts_results ON jobs.on_success_result_entity_token = tts_results.token\nLEFT OUTER JOIN voice_conversion_results ON jobs.on_success_result_entity_token = voice_conversion_results.token\nLEFT OUTER JOIN media_files ON jobs.on_success_result_entity_token = media_files.token\n\nWHERE jobs.token = ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -135,7 +135,7 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"name": "maybe_tts_model_title",
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY | NO_DEFAULT_VALUE",
|
||||
@@ -145,7 +145,7 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"name": "maybe_voice_conversion_model_title",
|
||||
"name": "maybe_tts_model_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY | NO_DEFAULT_VALUE",
|
||||
@@ -155,7 +155,7 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"name": "maybe_tts_public_bucket_path",
|
||||
"name": "maybe_voice_conversion_model_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY | NO_DEFAULT_VALUE",
|
||||
@@ -165,6 +165,16 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"name": "maybe_tts_public_bucket_path",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY | NO_DEFAULT_VALUE",
|
||||
"char_set": 224,
|
||||
"max_size": 1020
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"name": "maybe_voice_conversion_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -174,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_media_file_public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -184,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_media_file_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -194,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 20,
|
||||
"name": "maybe_media_file_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -204,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_assigned_worker",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -214,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_assigned_cluster",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -224,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 23,
|
||||
"name": "is_keepalive_required",
|
||||
"type_info": {
|
||||
"type": "Tiny",
|
||||
@@ -234,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 24,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -244,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 25,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -254,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 26,
|
||||
"name": "maybe_first_started_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -264,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 27,
|
||||
"name": "maybe_successfully_completed_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -300,6 +310,7 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
@@ -307,5 +318,5 @@
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "4932e975b3369b06fcc23f7797f3a53a54211236383385b8740959b824bd9744"
|
||||
"hash": "5fcdce6dd4c2b24d9062fda7b0a080bda3f04da6933b4dba8d335f9b7aecacb3"
|
||||
}
|
||||
+3
-3
@@ -228,7 +228,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -238,7 +238,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -248,7 +248,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+4
-4
@@ -157,7 +157,7 @@
|
||||
"ordinal": 15,
|
||||
"name": "file_size_bytes",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
"type": "LongLong",
|
||||
"flags": "NOT_NULL",
|
||||
"char_set": 63,
|
||||
"max_size": 10
|
||||
@@ -388,7 +388,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -398,7 +398,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -408,7 +408,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nINSERT INTO media_files\nSET\n token = ?,\n\n origin_category = ?,\n origin_product_category = ?,\n\n maybe_origin_model_type = ?,\n maybe_origin_model_token = ?,\n\n maybe_text_transcript = ?,\n\n media_type = ?,\n maybe_mime_type = ?,\n file_size_bytes = ?,\n\n checksum_sha2 = ?,\n\n public_bucket_directory_hash = ?,\n maybe_public_bucket_prefix = ?,\n maybe_public_bucket_extension = ?,\n\n maybe_creator_user_token = ?,\n maybe_creator_anonymous_visitor_token = ?,\n creator_ip_address = ?,\n\n creator_set_visibility = ?,\n\n maybe_creator_file_synthetic_id = ?,\n maybe_creator_category_synthetic_id = ?,\n\n is_generated_on_prem = ?,\n generated_by_worker = ?,\n generated_by_cluster = ?\n\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 22
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "8aad4a39b2e43743a2efc1b37c17860c15a2314145c61ab4a25e449a4cb22128"
|
||||
}
|
||||
+4
-4
@@ -157,7 +157,7 @@
|
||||
"ordinal": 15,
|
||||
"name": "file_size_bytes",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
"type": "LongLong",
|
||||
"flags": "NOT_NULL",
|
||||
"char_set": 63,
|
||||
"max_size": 10
|
||||
@@ -328,7 +328,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -338,7 +338,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -348,7 +348,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nINSERT INTO generic_inference_jobs\nSET\n token = ?,\n uuid_idempotency_token = ?,\n\n job_type = ?,\n\n inference_category = ?,\n maybe_model_type = ?,\n maybe_model_token = ?,\n\n maybe_input_source_token = ?,\n maybe_input_source_token_type = ?,\n\n maybe_download_url = ?,\n maybe_cover_image_media_file_token = ?,\n\n maybe_raw_inference_text = ?,\n\n maybe_inference_args = ?,\n\n maybe_creator_user_token = ?,\n maybe_creator_anonymous_visitor_token = ?,\n creator_ip_address = ?,\n\n creator_set_visibility = ?,\n\n priority_level = ?,\n is_keepalive_required = ?,\n max_duration_seconds = ?,\n\n is_debug_request = ?,\n maybe_routing_tag = ?,\n\n status = \"pending\"\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 21
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "9b4c6f0d0db1c92e4d3eed8d572fa92c885bad4adcc053ae490b3a76c6c116d4"
|
||||
}
|
||||
+4
-4
@@ -157,7 +157,7 @@
|
||||
"ordinal": 15,
|
||||
"name": "file_size_bytes",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
"type": "LongLong",
|
||||
"flags": "NOT_NULL",
|
||||
"char_set": 63,
|
||||
"max_size": 10
|
||||
@@ -328,7 +328,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -338,7 +338,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -348,7 +348,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+3
-3
@@ -88,7 +88,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -98,7 +98,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -68,7 +68,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "INSERT INTO idempotency_tokens SET idempotency_value = ?",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "cfeb095db83dfad895835d509818ecccc6cb9da2b32b5155e5ca29d56d3b7fc0"
|
||||
}
|
||||
+2
-2
@@ -58,7 +58,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -68,7 +68,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n INSERT INTO model_weights\n SET\n token = ?,\n weights_type = ?,\n weights_category = ?,\n title = ?,\n maybe_description_markdown = ?,\n maybe_description_rendered_html = ?,\n creator_user_token = ?,\n creator_ip_address = ?,\n creator_set_visibility = ?,\n maybe_last_update_user_token = ?,\n original_download_url = ?,\n original_filename = ?,\n file_size_bytes = ?,\n file_checksum_sha2 = ?,\n public_bucket_hash = ?,\n maybe_public_bucket_prefix = ?,\n maybe_public_bucket_extension = ?,\n version = ?\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 18
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "db59a239bac6f5ceaad4396dfe6c2c933a7189dbf8da5f555b94148db1b0667f"
|
||||
}
|
||||
+4
-4
@@ -157,7 +157,7 @@
|
||||
"ordinal": 15,
|
||||
"name": "file_size_bytes",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
"type": "LongLong",
|
||||
"flags": "NOT_NULL",
|
||||
"char_set": 63,
|
||||
"max_size": 10
|
||||
@@ -288,7 +288,7 @@
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "NOT_NULL | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -298,7 +298,7 @@
|
||||
"name": "user_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
@@ -308,7 +308,7 @@
|
||||
"name": "mod_deleted_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
"flags": "BINARY",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n INSERT INTO media_files\n SET\n token = ?,\n \n origin_category = ?,\n origin_product_category = ?,\n\n maybe_origin_model_type = ?,\n\n maybe_text_transcript = ?,\n\n media_type = ?,\n maybe_mime_type = ?,\n file_size_bytes = ?,\n \n checksum_sha2 = ?,\n \n public_bucket_directory_hash = ?,\n maybe_public_bucket_prefix = ?,\n maybe_public_bucket_extension = ?,\n \n maybe_creator_user_token = ?,\n maybe_creator_anonymous_visitor_token = ?,\n creator_ip_address = ?,\n \n creator_set_visibility = ?,\n \n maybe_creator_file_synthetic_id = ?,\n maybe_creator_category_synthetic_id = ?,\n \n is_generated_on_prem = ?,\n generated_by_worker = ?,\n generated_by_cluster = ?\n \n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 21
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "e7f9bb387905704e9da3fd1657432a3d821d49462fcf82d8cca8dd2dcfb3df17"
|
||||
}
|
||||
+43
-21
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nWHERE\n m.token = ?\n ",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_text_transcript,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nWHERE\n m.token = ?\n AND m.user_deleted_at IS NULL\n AND m.mod_deleted_at IS NULL\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,6 +65,26 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "MULTIPLE_KEY | BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
"flags": "BLOB | BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 262140
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -74,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -84,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -104,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -114,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -164,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -174,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -184,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 20,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -194,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -204,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -214,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 23,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -224,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 24,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -234,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -244,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 26,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -254,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 27,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -274,6 +294,8 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -296,5 +318,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "c2de3b6de37dbbb5b6afd91af08aae2739cda97ef8ebb8f9b4ee967969ce43be"
|
||||
"hash": "f077f7692f4d79809534506dfde0dba28f4fdaa3d0b8cc2ebad2a594188429eb"
|
||||
}
|
||||
Generated
+451
-64
@@ -128,7 +128,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -166,7 +166,7 @@ dependencies = [
|
||||
"parse-size",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -298,7 +298,7 @@ dependencies = [
|
||||
"actix-router",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -347,7 +347,7 @@ checksum = "9aa0b287c8de4a76b691f29dbb5451e8dd5b79d777eaf87350c9b0cbfdb5e968"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -358,7 +358,7 @@ checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -681,7 +681,7 @@ checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -762,6 +762,51 @@ dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.6.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core",
|
||||
"bitflags 1.3.2",
|
||||
"bytes 1.5.0",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"itoa 1.0.9",
|
||||
"matchit",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"serde",
|
||||
"sync_wrapper",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.5.0",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"mime",
|
||||
"rustversion",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.69"
|
||||
@@ -1165,7 +1210,7 @@ dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1534,7 +1579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1627,7 +1672,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1660,7 +1705,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
|
||||
dependencies = [
|
||||
"darling_core 0.20.3",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1871,7 +1916,7 @@ dependencies = [
|
||||
"diesel_table_macro_syntax",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1880,7 +1925,7 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
|
||||
dependencies = [
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1947,7 +1992,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2292,6 +2337,50 @@ dependencies = [
|
||||
"my-workspace-hack",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "es-update-job"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"actix_helpers",
|
||||
"anyhow",
|
||||
"bootstrap",
|
||||
"chrono",
|
||||
"concurrency",
|
||||
"config",
|
||||
"container_common",
|
||||
"dotenv",
|
||||
"easyenv",
|
||||
"elasticsearch",
|
||||
"elasticsearch_schema",
|
||||
"enums",
|
||||
"errors",
|
||||
"filesys",
|
||||
"hashing",
|
||||
"hostname",
|
||||
"jobs_common",
|
||||
"log",
|
||||
"media",
|
||||
"memory_caching",
|
||||
"mimetypes",
|
||||
"my-workspace-hack",
|
||||
"mysql_queries",
|
||||
"once_cell",
|
||||
"rand 0.8.5",
|
||||
"redis_common",
|
||||
"reusable_types",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"server_environment",
|
||||
"sqlx",
|
||||
"storyteller_root",
|
||||
"subprocess",
|
||||
"subprocess_common",
|
||||
"testing",
|
||||
"tokens",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "etcetera"
|
||||
version = "0.8.0"
|
||||
@@ -2551,7 +2640,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2650,6 +2739,12 @@ version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "google_drive_common"
|
||||
version = "0.0.1"
|
||||
@@ -2674,7 +2769,7 @@ dependencies = [
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"http",
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
@@ -2883,7 +2978,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"speculoos",
|
||||
"speculoos 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2928,6 +3023,18 @@ dependencies = [
|
||||
"want",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper-timeout"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
|
||||
dependencies = [
|
||||
"hyper",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
"tokio-io-timeout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper-tls"
|
||||
version = "0.5.0"
|
||||
@@ -3025,9 +3132,19 @@ checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.1.0"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
|
||||
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown 0.12.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.2",
|
||||
@@ -3096,9 +3213,13 @@ dependencies = [
|
||||
"my-workspace-hack",
|
||||
"mysql_queries",
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
"opentelemetry-otlp",
|
||||
"opentelemetry_sdk",
|
||||
"r2d2_redis",
|
||||
"rand 0.8.5",
|
||||
"redis_common",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -3106,10 +3227,12 @@ dependencies = [
|
||||
"subprocess",
|
||||
"subprocess_common",
|
||||
"tempdir",
|
||||
"thumbnail_generator",
|
||||
"time 0.3.30",
|
||||
"tokens",
|
||||
"tokio",
|
||||
"tts_common",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3521,6 +3644,12 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
||||
|
||||
[[package]]
|
||||
name = "maybe-async"
|
||||
version = "0.2.7"
|
||||
@@ -3632,7 +3761,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"serial_test",
|
||||
"serial_test 2.0.0",
|
||||
"sqlx",
|
||||
"tokens",
|
||||
"tokio",
|
||||
@@ -3832,7 +3961,7 @@ dependencies = [
|
||||
"heck",
|
||||
"hmac 0.12.1",
|
||||
"hyper",
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
@@ -3867,7 +3996,7 @@ dependencies = [
|
||||
"sqlx-mysql",
|
||||
"sqlx-sqlite",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
"time 0.3.30",
|
||||
"time-macros",
|
||||
"tokio",
|
||||
@@ -3905,7 +4034,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"serial_test",
|
||||
"serial_test 2.0.0",
|
||||
"sqlx",
|
||||
"tokens",
|
||||
"tokio",
|
||||
@@ -3999,13 +4128,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
|
||||
dependencies = [
|
||||
"num-bigint 0.1.44",
|
||||
"num-complex",
|
||||
"num-complex 0.1.43",
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-rational 0.1.42",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af"
|
||||
dependencies = [
|
||||
"num-bigint 0.4.4",
|
||||
"num-complex 0.4.5",
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-rational 0.4.1",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint"
|
||||
version = "0.1.44"
|
||||
@@ -4056,6 +4199,15 @@ dependencies = [
|
||||
"rustc-serialize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-complex"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.45"
|
||||
@@ -4096,6 +4248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-bigint 0.4.4",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
@@ -4164,7 +4317,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4195,6 +4348,93 @@ dependencies = [
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"indexmap 2.2.3",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"thiserror",
|
||||
"urlencoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-otlp"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f24cda83b20ed2433c68241f918d0f6fdec8b1d43b7a9590ab4420c5095ca930"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures-core",
|
||||
"http",
|
||||
"opentelemetry",
|
||||
"opentelemetry-proto",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"opentelemetry_sdk",
|
||||
"prost",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tonic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-proto"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2e155ce5cc812ea3d1dffbd1539aed653de4bf4882d60e6e04dcf0901d674e1"
|
||||
dependencies = [
|
||||
"opentelemetry",
|
||||
"opentelemetry_sdk",
|
||||
"prost",
|
||||
"tonic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-semantic-conventions"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5774f1ef1f982ef2a447f6ee04ec383981a3ab99c8e77a1a7b30182e65bbc84"
|
||||
dependencies = [
|
||||
"opentelemetry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry_sdk"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f16aec8a98a457a52664d69e0091bac3a0abd18ead9b641cb00202ba4e0efe4"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"crossbeam-channel",
|
||||
"futures-channel",
|
||||
"futures-executor",
|
||||
"futures-util",
|
||||
"glob",
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
"ordered-float",
|
||||
"percent-encoding",
|
||||
"rand 0.8.5",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ordered-float"
|
||||
version = "4.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ordered-multimap"
|
||||
version = "0.4.3"
|
||||
@@ -4378,7 +4618,7 @@ dependencies = [
|
||||
"phf_shared 0.11.2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4416,7 +4656,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4545,13 +4785,36 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.69"
|
||||
version = "1.0.78"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
|
||||
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prost"
|
||||
version = "0.11.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
|
||||
dependencies = [
|
||||
"bytes 1.5.0",
|
||||
"prost-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prost-derive"
|
||||
version = "0.11.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.10.5",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "psm"
|
||||
version = "0.1.21"
|
||||
@@ -4604,9 +4867,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.33"
|
||||
version = "1.0.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
|
||||
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
@@ -4914,9 +5177,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.22"
|
||||
version = "0.11.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
|
||||
checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251"
|
||||
dependencies = [
|
||||
"async-compression",
|
||||
"base64 0.21.5",
|
||||
@@ -4937,9 +5200,11 @@ dependencies = [
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustls-pemfile",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"sync_wrapper",
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
@@ -5047,7 +5312,7 @@ dependencies = [
|
||||
"quote",
|
||||
"rust-embed-utils",
|
||||
"shellexpand",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
@@ -5377,22 +5642,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.193"
|
||||
version = "1.0.196"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
|
||||
checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.193"
|
||||
version = "1.0.196"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
||||
checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5402,7 +5667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "224e6a14f315852940f3ec103125aa6482f0e224732ed91ed3330ed633077c34"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"itoa 1.0.9",
|
||||
"ryu",
|
||||
"serde",
|
||||
@@ -5410,11 +5675,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.108"
|
||||
version = "1.0.113"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
|
||||
checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"itoa 1.0.9",
|
||||
"ryu",
|
||||
"serde",
|
||||
@@ -5469,7 +5734,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5526,7 +5791,21 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"log",
|
||||
"parking_lot 0.12.1",
|
||||
"serial_test_derive",
|
||||
"serial_test_derive 2.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serial_test"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"futures 0.3.29",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"parking_lot 0.12.1",
|
||||
"serial_test_derive 3.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5537,7 +5816,18 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serial_test_derive"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5740,7 +6030,16 @@ version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bcff6a72e2ddfb09ce0064568857e70d3cf6f4342244ebb1f84fa6f89b16c26"
|
||||
dependencies = [
|
||||
"num",
|
||||
"num 0.1.42",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "speculoos"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65881c9270d6157f30a09233305da51bed97eef9192d0ea21e57b1c8f05c3620"
|
||||
dependencies = [
|
||||
"num 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5815,7 +6114,7 @@ dependencies = [
|
||||
"futures-util",
|
||||
"hashlink",
|
||||
"hex",
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"log",
|
||||
"memchr",
|
||||
"native-tls",
|
||||
@@ -6041,6 +6340,7 @@ dependencies = [
|
||||
"buckets",
|
||||
"chrono",
|
||||
"cloud_storage",
|
||||
"collections",
|
||||
"composite_identifiers",
|
||||
"config",
|
||||
"container_common",
|
||||
@@ -6102,7 +6402,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"server_environment",
|
||||
"sha2 0.9.9",
|
||||
"speculoos",
|
||||
"speculoos 0.11.0",
|
||||
"sqlx",
|
||||
"strum",
|
||||
"symphonia",
|
||||
@@ -6127,7 +6427,7 @@ name = "storyteller_root"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"my-workspace-hack",
|
||||
"serial_test",
|
||||
"serial_test 2.0.0",
|
||||
"tempdir",
|
||||
]
|
||||
|
||||
@@ -6193,7 +6493,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustversion",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6210,7 +6510,12 @@ dependencies = [
|
||||
name = "subprocess_common"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"errors",
|
||||
"filesys",
|
||||
"log",
|
||||
"my-workspace-hack",
|
||||
"serial_test 3.0.0",
|
||||
"subprocess",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6400,15 +6705,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.39"
|
||||
version = "2.0.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
|
||||
checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sync_wrapper"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
||||
|
||||
[[package]]
|
||||
name = "system-configuration"
|
||||
version = "0.5.1"
|
||||
@@ -6504,7 +6815,17 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thumbnail_generator"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"easyenv",
|
||||
"log",
|
||||
"reqwest",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6652,6 +6973,16 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-io-timeout"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "2.2.0"
|
||||
@@ -6660,7 +6991,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6823,13 +7154,67 @@ version = "0.19.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tonic"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
"base64 0.21.5",
|
||||
"bytes 1.5.0",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"h2",
|
||||
"http",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"hyper-timeout",
|
||||
"percent-encoding",
|
||||
"pin-project",
|
||||
"prost",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower"
|
||||
version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"indexmap 1.9.3",
|
||||
"pin-project",
|
||||
"pin-project-lite",
|
||||
"rand 0.8.5",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-layer"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
|
||||
|
||||
[[package]]
|
||||
name = "tower-service"
|
||||
version = "0.3.2"
|
||||
@@ -6856,7 +7241,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7266,6 +7651,8 @@ dependencies = [
|
||||
"toml 0.5.11",
|
||||
"user_input_common",
|
||||
"user_traits_component",
|
||||
"utoipa",
|
||||
"utoipa-swagger-ui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7286,7 +7673,7 @@ version = "4.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ff05e3bac2c9428f57ade702667753ca3f5cf085e2011fe697de5bfd49aa72d"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"indexmap 2.2.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"utoipa-gen",
|
||||
@@ -7302,7 +7689,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7352,7 +7739,7 @@ dependencies = [
|
||||
"pulldown-cmark",
|
||||
"regex",
|
||||
"semver 1.0.20",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
"toml 0.7.8",
|
||||
"url",
|
||||
]
|
||||
@@ -7493,7 +7880,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -7527,7 +7914,7 @@ checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
@@ -7540,9 +7927,9 @@ checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-streams"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7"
|
||||
checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"js-sys",
|
||||
@@ -7905,7 +8292,7 @@ checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
"syn 2.0.49",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -26,6 +26,7 @@ members = [
|
||||
"crates/lib/api_clients/cloud_storage",
|
||||
"crates/lib/api_clients/google_drive_common",
|
||||
"crates/lib/api_clients/twitch_common",
|
||||
"crates/lib/api_clients/thumbnail_generator",
|
||||
"crates/lib/bootstrap",
|
||||
"crates/lib/caching/memory_caching",
|
||||
"crates/lib/caching/redis_caching",
|
||||
@@ -73,6 +74,7 @@ members = [
|
||||
"crates/service/job/analytics_job",
|
||||
"crates/service/job/download_job",
|
||||
"crates/service/job/email_sender_job",
|
||||
"crates/service/job/es-update-job",
|
||||
"crates/service/job/inference_job",
|
||||
"crates/service/job/tts_download_job",
|
||||
"crates/service/job/tts_inference_job",
|
||||
|
||||
@@ -34,7 +34,13 @@
|
||||
"created_at" : { "type" : "date" },
|
||||
"updated_at" : { "type" : "date" },
|
||||
"user_deleted_at" : { "type" : "date" },
|
||||
"mod_deleted_at" : { "type" : "date" }
|
||||
"mod_deleted_at" : { "type" : "date" },
|
||||
|
||||
"is_deleted" : {
|
||||
"type": "boolean",
|
||||
"index": true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
update model_weights
|
||||
set
|
||||
mod_deleted_at = NOW()
|
||||
where token IN (
|
||||
'weight_tnhacmxb9qwqrygc3pxvk3ds6',
|
||||
'weight_9g1pghkc0xhfy5n9m36b11vds',
|
||||
'weight_5k0kzkftr4x39xyc9yg5p9c86'
|
||||
);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Staff
|
||||
-- teddanson is victor's alt
|
||||
-- SELECT token, username FROM users WHERE username IN (
|
||||
UPDATE users SET can_access_studio = true WHERE username IN (
|
||||
'bflat',
|
||||
'brandon',
|
||||
'crossproduct',
|
||||
'crossproduct1',
|
||||
'echelon',
|
||||
'fyscott',
|
||||
'olivicmic',
|
||||
'saltacc',
|
||||
'teddanson',
|
||||
'vegito1089',
|
||||
'wilwong',
|
||||
'yae_ph',
|
||||
'zzz_last_item'
|
||||
);
|
||||
|
||||
UPDATE users SET can_access_studio = true WHERE username IN (
|
||||
'endtimes',
|
||||
'tropicalfun',
|
||||
'zzz_last_item'
|
||||
);
|
||||
@@ -375,7 +375,8 @@ where token IN (
|
||||
'vcm_a47wtfbsjrfc',
|
||||
'vcm_kygenhbg5mgj',
|
||||
'vcm_s8gndv19yt7p',
|
||||
'vcm_ny9pj57w5eyh'
|
||||
'vcm_ny9pj57w5eyh',
|
||||
'vcm_jg4rst3j2d7x'
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
|
||||
-- Inventory non-deleted
|
||||
select
|
||||
m.id,
|
||||
m.token,
|
||||
SUBSTRING(m.title, 1, 35) as title,
|
||||
u.username,
|
||||
SUBSTRING(m.original_download_url, 1, 35) as url,
|
||||
m.updated_at
|
||||
from model_weights as m
|
||||
left 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 m.title asc;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN job_type;
|
||||
@@ -0,0 +1,10 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN job_type VARCHAR(32) DEFAULT NULL
|
||||
AFTER uuid_idempotency_token;
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD INDEX index_job_type (job_type);
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
DROP INDEX index_updated_at ON model_weights;
|
||||
DROP INDEX index_user_deleted_at ON model_weights;
|
||||
DROP INDEX index_mod_deleted_at ON model_weights;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
CREATE INDEX index_updated_at ON model_weights (updated_at);
|
||||
CREATE INDEX index_user_deleted_at ON model_weights (user_deleted_at);
|
||||
CREATE INDEX index_mod_deleted_at ON model_weights (mod_deleted_at);
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE users DROP COLUMN can_access_studio;
|
||||
@@ -0,0 +1,10 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE users
|
||||
ADD COLUMN can_access_studio BOOLEAN NOT NULL DEFAULT false
|
||||
AFTER user_role_slug;
|
||||
|
||||
ALTER TABLE users
|
||||
ADD INDEX index_can_access_studio (can_access_studio);
|
||||
@@ -0,0 +1,6 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE model_weights
|
||||
MODIFY COLUMN file_size_bytes INT(10) NOT NULL DEFAULT 0;
|
||||
@@ -0,0 +1,6 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE model_weights
|
||||
MODIFY COLUMN file_size_bytes BIGINT(10) NOT NULL DEFAULT 0;
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_files DROP COLUMN maybe_text_transcript;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_files
|
||||
ADD COLUMN maybe_text_transcript TEXT DEFAULT NULL
|
||||
AFTER maybe_frame_height;
|
||||
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_files DROP COLUMN maybe_batch_token;
|
||||
@@ -0,0 +1,10 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE media_files
|
||||
ADD COLUMN maybe_batch_token VARCHAR(32) DEFAULT NULL
|
||||
AFTER is_batch_generated;
|
||||
|
||||
ALTER TABLE media_files
|
||||
ADD INDEX index_maybe_batch_token (maybe_batch_token);
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN maybe_download_url;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN maybe_download_url VARCHAR(1024) DEFAULT NULL
|
||||
AFTER maybe_raw_inference_text;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN on_success_result_batch_token;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN on_success_result_batch_token VARCHAR(32) DEFAULT NULL
|
||||
AFTER on_success_result_entity_token;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs DROP COLUMN maybe_cover_image_media_file_token;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE generic_inference_jobs
|
||||
ADD COLUMN maybe_cover_image_media_file_token VARCHAR(32) DEFAULT NULL
|
||||
AFTER maybe_download_url;
|
||||
@@ -17,9 +17,15 @@ CREATE TABLE generic_inference_jobs (
|
||||
|
||||
-- ========== INFERENCE DETAILS ==========
|
||||
|
||||
-- NB: Note that this is probably coming to mean "job type". It's grown to indicate the
|
||||
-- exact type of job to run (though that's still also somewhat incorrectly spread over
|
||||
-- maybe_model_type).
|
||||
-- The new enum for the type of job, which will eventually replace `inference_category` and `maybe_model_type`.
|
||||
-- This isn't fully supported yet in the inference-job, but we'll start populating it and adding logic around it.
|
||||
-- We'll start this out as nullable, then migrate the old rows with a default column value.
|
||||
job_type VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- NB: This is becoming a problematic field and is becoming conflated with `maybe_model_type`.
|
||||
-- We're using this to handle job dispatching, but the latter is being used to load container
|
||||
-- dependencies at startup (even if it isn't a real model type or a polymorphic foreign key).
|
||||
-- This is pretty gross and horrible.
|
||||
--
|
||||
-- Broad category of inference
|
||||
-- Examples (may not be up to date):
|
||||
@@ -27,7 +33,10 @@ CREATE TABLE generic_inference_jobs (
|
||||
-- * voice_conversion
|
||||
inference_category VARCHAR(32) NOT NULL,
|
||||
|
||||
-- NB: Note that this is probably no longer useful (so long as we migrate away from it)
|
||||
-- NB: See notes on inference_category. This is becoming a problematic field. We're using
|
||||
-- this to load the container spin-up arguments and dependencies, but the former is being
|
||||
-- used to dispatch the job. `inference_category` is the one that should probably go away,
|
||||
-- and this column should be renamed to `inference_job_type`.
|
||||
--
|
||||
-- Potential part of the composite foreign key to the primary model being used, if any.
|
||||
-- This will normally live in `maybe_inference_args`, but in this case, it's useful for
|
||||
@@ -63,6 +72,16 @@ CREATE TABLE generic_inference_jobs (
|
||||
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
|
||||
maybe_raw_inference_text TEXT DEFAULT NULL,
|
||||
|
||||
-- For download-related jobs, this is the URL
|
||||
-- This is nullable because not all inference jobs have a download URL.
|
||||
-- The length of 1024 is arbitrary, but we shouldn't need anything longer.
|
||||
maybe_download_url VARCHAR(1024) DEFAULT NULL,
|
||||
|
||||
-- For download-related jobs, this is the cover image to set.
|
||||
-- This is nullable because not all inference jobs have a download URL.
|
||||
-- And furthermore, not all download URLs have a cover image.
|
||||
maybe_cover_image_media_file_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- ========== SUCCESS CASE ==========
|
||||
|
||||
-- The type of the object will vary based on the type of the upload,
|
||||
@@ -73,6 +92,11 @@ CREATE TABLE generic_inference_jobs (
|
||||
-- This is only populated on a successful result.
|
||||
on_success_result_entity_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- If the job completes successfully, this is the batch token (ie. when
|
||||
-- several results are created).
|
||||
-- Only populated if there are actual batches generated.
|
||||
on_success_result_batch_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- ========== CREATOR DETAILS AND PREFERENCES ==========
|
||||
|
||||
-- Foreign key to user
|
||||
@@ -245,6 +269,7 @@ CREATE TABLE generic_inference_jobs (
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY (token),
|
||||
UNIQUE KEY (uuid_idempotency_token),
|
||||
KEY index_job_type (job_type),
|
||||
KEY index_inference_category (inference_category),
|
||||
KEY index_maybe_model_type_and_maybe_model_token (maybe_model_type, maybe_model_token),
|
||||
KEY index_maybe_model_type (maybe_model_type),
|
||||
|
||||
@@ -58,11 +58,15 @@ CREATE TABLE media_files (
|
||||
-- The original filename of the media (if uploaded by a user)
|
||||
maybe_origin_filename VARCHAR(255) DEFAULT NULL,
|
||||
|
||||
-- TODO: Remove after `maybe_batch_token` gains use.
|
||||
-- Whether this media file was generated as part of a batch
|
||||
-- If so, we can look up the batch in a separate query/call to the `batch_generations` table.
|
||||
-- We won't hold the batch token in this table since it'll be very sparsely populated.
|
||||
is_batch_generated BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
|
||||
-- If the media file is generated as part of a batch, this designates the batch.
|
||||
maybe_batch_token VARCHAR(32) DEFAULT NULL,
|
||||
|
||||
-- ========== METADATA ==========
|
||||
|
||||
-- We can store text transcripts, etc. in other tables and refer back via foreign key.
|
||||
@@ -100,6 +104,9 @@ CREATE TABLE media_files (
|
||||
-- For videos, the original frame height.
|
||||
maybe_frame_height INT(5) DEFAULT NULL,
|
||||
|
||||
-- Optional text transcript for audio or video (especially TTS)
|
||||
maybe_text_transcript TEXT DEFAULT NULL,
|
||||
|
||||
-- Checksum of the original media
|
||||
-- SHA1 hash [SHA2 = CHAR(64), SHA1 = CHAR(40), MD5 = CHAR(32)]
|
||||
-- checksum_sha1 CHAR(40) NOT NULL,
|
||||
@@ -212,6 +219,7 @@ CREATE TABLE media_files (
|
||||
KEY index_maybe_origin_model_type (maybe_origin_model_type),
|
||||
KEY fk_maybe_origin_model_token (maybe_origin_model_token),
|
||||
KEY fk_maybe_origin_model_type_and_token (maybe_origin_model_type, maybe_origin_model_token),
|
||||
KEY index_maybe_batch_token (maybe_batch_token),
|
||||
KEY index_media_type (media_type),
|
||||
KEY index_checksum_sha2 (checksum_sha2),
|
||||
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
|
||||
|
||||
@@ -95,8 +95,8 @@ CREATE TABLE model_weights (
|
||||
-- The filename that was used at upload time (if available)
|
||||
original_filename VARCHAR(255) DEFAULT NULL,
|
||||
|
||||
-- File characteristics
|
||||
file_size_bytes INT(10) NOT NULL DEFAULT 0,
|
||||
-- File size. BIGINT to store more than 2GB size.
|
||||
file_size_bytes BIGINT(10) NOT NULL DEFAULT 0,
|
||||
|
||||
-- Checksum of the original weights file
|
||||
-- SHA2 hash [SHA2 = CHAR(64), SHA1 = CHAR(40), MD5 = CHAR(32)]
|
||||
@@ -171,6 +171,9 @@ CREATE TABLE model_weights (
|
||||
KEY index_weights_category (weights_category),
|
||||
KEY fk_creator_user_token (creator_user_token),
|
||||
KEY index_creator_set_visibility (creator_set_visibility),
|
||||
KEY fk_maybe_cover_media_file_token (maybe_cover_image_media_file_token)
|
||||
KEY fk_maybe_cover_media_file_token (maybe_cover_image_media_file_token),
|
||||
KEY index_updated_at (updated_at),
|
||||
KEY index_user_deleted_at (user_deleted_at),
|
||||
KEY index_mod_deleted_at (user_deleted_at)
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
@@ -22,6 +22,10 @@ CREATE TABLE users (
|
||||
-- The role assigned to the user confers permissions.
|
||||
user_role_slug VARCHAR(16) NOT NULL,
|
||||
|
||||
-- Rollout flag for Storyteller Studio
|
||||
-- Default to false until rollout is 100%, then remove the column.
|
||||
can_access_studio BOOLEAN NOT NULL DEFAULT false,
|
||||
|
||||
-- ========== PREMIUM FEATURES ==========
|
||||
|
||||
-- If the user has a Stripe subscription (or has had one), we link it to the user here.
|
||||
@@ -171,6 +175,7 @@ CREATE TABLE users (
|
||||
UNIQUE KEY (username),
|
||||
UNIQUE KEY (email_address),
|
||||
KEY fk_user_role_slug (user_role_slug),
|
||||
KEY index_can_access_studio (can_access_studio),
|
||||
KEY fk_maybe_avatar_media_file_token (maybe_avatar_media_file_token),
|
||||
KEY fk_maybe_cover_media_file_token (maybe_cover_media_file_token)
|
||||
|
||||
|
||||
@@ -73,6 +73,14 @@ impl MediaFileBucketPath {
|
||||
pub fn get_basename(&self) -> &str {
|
||||
&self.filename
|
||||
}
|
||||
|
||||
pub fn get_optional_prefix(&self) -> Option<&str> {
|
||||
self.optional_prefix.as_deref()
|
||||
}
|
||||
|
||||
pub fn get_optional_extension(&self) -> Option<&str> {
|
||||
self.optional_extension.as_deref()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -12,6 +12,7 @@ const ORIGINAL_FILE_BASENAME : &str = "original_upload.bin";
|
||||
/// The original user upload file.
|
||||
/// It may have derivative files (down samples, crops, etc.) that live alongside it.
|
||||
#[derive(Clone)]
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub struct MediaUploadOriginalFilePath {
|
||||
directory: MediaUploadDirectory,
|
||||
full_object_path: String,
|
||||
@@ -21,11 +22,13 @@ impl PublicPath for MediaUploadOriginalFilePath {}
|
||||
|
||||
impl MediaUploadOriginalFilePath {
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn generate_new() -> Self {
|
||||
let entropy = crockford_entropy_lower(32);
|
||||
Self::from_object_hash(&entropy)
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn from_object_hash(hash: &str) -> Self {
|
||||
// TODO: Path construction could be cleaner.
|
||||
let directory = MediaUploadDirectory::from_object_hash(hash);
|
||||
@@ -36,22 +39,27 @@ impl MediaUploadOriginalFilePath {
|
||||
}
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn get_full_object_path_str(&self) -> &str {
|
||||
&self.full_object_path
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn to_full_object_pathbuf(&self) -> PathBuf {
|
||||
PathBuf::from(&self.full_object_path)
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn get_directory(&self) -> &MediaUploadDirectory {
|
||||
&self.directory
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn get_object_hash(&self) -> &str {
|
||||
&self.directory.get_object_hash()
|
||||
}
|
||||
|
||||
#[deprecated(note = "Use media_files records and MediaFileBucketPath instead. media_uploads records are DEPRECATED.")]
|
||||
pub fn get_basename() -> &'static str {
|
||||
ORIGINAL_FILE_BASENAME
|
||||
}
|
||||
|
||||
@@ -38,9 +38,11 @@ pub enum InferenceCategory {
|
||||
#[serde(rename = "workflow")]
|
||||
Workflow,
|
||||
|
||||
/// A job that turns "FBX" game engine files into "GLTF" files (Bevy-compatible).
|
||||
#[serde(rename = "convert_fbx_gltf")]
|
||||
ConvertFbxToGltf,
|
||||
#[serde(rename = "format_conversion")]
|
||||
FormatConversion,
|
||||
|
||||
#[serde(rename = "convert_bvh_to_workflow")]
|
||||
ConvertBvhToWorkflow,
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
@@ -58,7 +60,8 @@ impl InferenceCategory {
|
||||
Self::ImageGeneration => "image_generation",
|
||||
Self::Mocap => "mocap",
|
||||
Self::Workflow => "workflow",
|
||||
Self::ConvertFbxToGltf => "convert_fbx_gltf",
|
||||
Self::FormatConversion => "format_conversion",
|
||||
Self::ConvertBvhToWorkflow => "convert_bvh_to_workflow",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +74,8 @@ impl InferenceCategory {
|
||||
"image_generation" => Ok(Self::ImageGeneration),
|
||||
"mocap" => Ok(Self::Mocap),
|
||||
"workflow" => Ok(Self::Workflow),
|
||||
"convert_fbx_gltf" => Ok(Self::ConvertFbxToGltf),
|
||||
"format_conversion" => Ok(Self::FormatConversion),
|
||||
"convert_bvh_to_workflow" => Ok(Self::ConvertBvhToWorkflow),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
@@ -87,7 +91,8 @@ impl InferenceCategory {
|
||||
Self::ImageGeneration,
|
||||
Self::Mocap,
|
||||
Self::Workflow,
|
||||
Self::ConvertFbxToGltf,
|
||||
Self::FormatConversion,
|
||||
Self::ConvertBvhToWorkflow,
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -109,7 +114,8 @@ mod tests {
|
||||
assert_serialization(InferenceCategory::ImageGeneration, "image_generation");
|
||||
assert_serialization(InferenceCategory::Mocap, "mocap");
|
||||
assert_serialization(InferenceCategory::Workflow, "workflow");
|
||||
assert_serialization(InferenceCategory::ConvertFbxToGltf, "convert_fbx_gltf");
|
||||
assert_serialization(InferenceCategory::FormatConversion, "format_conversion");
|
||||
assert_serialization(InferenceCategory::ConvertBvhToWorkflow, "convert_bvh_to_workflow");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -121,7 +127,8 @@ mod tests {
|
||||
assert_eq!(InferenceCategory::ImageGeneration.to_str(), "image_generation");
|
||||
assert_eq!(InferenceCategory::Mocap.to_str(), "mocap");
|
||||
assert_eq!(InferenceCategory::Workflow.to_str(), "workflow");
|
||||
assert_eq!(InferenceCategory::ConvertFbxToGltf.to_str(), "convert_fbx_gltf");
|
||||
assert_eq!(InferenceCategory::FormatConversion.to_str(), "format_conversion");
|
||||
assert_eq!(InferenceCategory::ConvertBvhToWorkflow.to_str(), "convert_bvh_to_workflow");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -133,14 +140,15 @@ mod tests {
|
||||
assert_eq!(InferenceCategory::from_str("image_generation").unwrap(), InferenceCategory::ImageGeneration);
|
||||
assert_eq!(InferenceCategory::from_str("mocap").unwrap(), InferenceCategory::Mocap);
|
||||
assert_eq!(InferenceCategory::from_str("workflow").unwrap(), InferenceCategory::Workflow);
|
||||
assert_eq!(InferenceCategory::from_str("convert_fbx_gltf").unwrap(), InferenceCategory::ConvertFbxToGltf);
|
||||
assert_eq!(InferenceCategory::from_str("format_conversion").unwrap(), InferenceCategory::FormatConversion);
|
||||
assert_eq!(InferenceCategory::from_str("convert_bvh_to_workflow").unwrap(), InferenceCategory::ConvertBvhToWorkflow);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
// Static check
|
||||
let mut variants = InferenceCategory::all_variants();
|
||||
assert_eq!(variants.len(), 8);
|
||||
assert_eq!(variants.len(), 9);
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::LipsyncAnimation));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::TextToSpeech));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::VoiceConversion));
|
||||
@@ -148,7 +156,8 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::ImageGeneration));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::Mocap));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::Workflow));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::ConvertFbxToGltf));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::FormatConversion));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::ConvertBvhToWorkflow));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
|
||||
// Generated check
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
#[cfg(test)]
|
||||
use strum::EnumCount;
|
||||
#[cfg(test)]
|
||||
use strum::EnumIter;
|
||||
|
||||
/// Used in the `generic_inference_jobs` table in `VARCHAR(32)` field `job_type`.
|
||||
///
|
||||
/// TODO(bt,2024-02-01): This will replace "inference_category" and "maybe_model_type" for job control and dispatch,
|
||||
/// since those mechanisms are overloaded and inconsistent.
|
||||
///
|
||||
/// YOU CAN ADD NEW VALUES, BUT DO NOT CHANGE EXISTING VALUES WITHOUT A MIGRATION STRATEGY.
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd, Deserialize, Serialize, Default)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum InferenceJobType {
|
||||
/// Job that converts bevy to workflow files
|
||||
#[serde(rename = "bevy_to_workflow")]
|
||||
BevyToWorkflow,
|
||||
|
||||
/// Jobs that run ComfyUI workflows
|
||||
ComfyUi,
|
||||
|
||||
/// A job that turns "FBX" game engine files into "GLTF" files (Bevy-compatible).
|
||||
#[serde(rename = "convert_fbx_gltf")]
|
||||
ConvertFbxToGltf,
|
||||
|
||||
/// Process a video into BVH mocap animation data for game engines
|
||||
MocapNet,
|
||||
|
||||
/// Re-render a video is a video style transfer algorithm. We developed code
|
||||
/// around it, but chose to develop AnimateDiff / ComfyUI support instead.
|
||||
RerenderAVideo,
|
||||
|
||||
/// RVC is a voice conversion model. RVCv2 is the most popular such model currently.
|
||||
#[serde(rename = "rvc_v2")]
|
||||
RvcV2,
|
||||
|
||||
/// SadTalker does image-to-video lip-syncing when given an audio file and image.
|
||||
SadTalker,
|
||||
|
||||
/// so-vits-svc voice conversion. This predates RVCv2.
|
||||
SoVitsSvc,
|
||||
|
||||
/// Stable diffusion image generation
|
||||
StableDiffusion,
|
||||
|
||||
/// StyleTTS2 is a zero shot multi-speaker TTS model.
|
||||
/// This job type should handle both speaker vector encoding and inference.
|
||||
#[serde(rename = "styletts2")]
|
||||
StyleTTS2,
|
||||
|
||||
/// TT2 Text to speech
|
||||
Tacotron2,
|
||||
|
||||
/// A value we may use in the future for historical jobs
|
||||
/// (i.e. when we backfill the database column and make it non-nullable)
|
||||
#[default]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
impl_enum_display_and_debug_using_to_str!(InferenceJobType);
|
||||
impl_mysql_enum_coders!(InferenceJobType);
|
||||
|
||||
/// NB: Legacy API for older code.
|
||||
impl InferenceJobType {
|
||||
pub fn to_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::BevyToWorkflow => "bevy_to_workflow",
|
||||
Self::ComfyUi => "comfy_ui",
|
||||
Self::ConvertFbxToGltf => "convert_fbx_gltf",
|
||||
Self::MocapNet => "mocap_net",
|
||||
Self::RerenderAVideo => "rerender_a_video",
|
||||
Self::RvcV2 => "rvc_v2",
|
||||
Self::SadTalker => "sad_talker",
|
||||
Self::SoVitsSvc => "so_vits_svc",
|
||||
Self::StableDiffusion => "stable_diffusion",
|
||||
Self::StyleTTS2 => "styletts2",
|
||||
Self::Tacotron2 => "tacotron2",
|
||||
Self::Unknown => "unknown",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_str(value: &str) -> Result<Self, String> {
|
||||
match value {
|
||||
"bevy_to_workflow" => Ok(Self::BevyToWorkflow),
|
||||
"comfy_ui" => Ok(Self::ComfyUi),
|
||||
"convert_fbx_gltf" => Ok(Self::ConvertFbxToGltf),
|
||||
"mocap_net" => Ok(Self::MocapNet),
|
||||
"rerender_a_video" => Ok(Self::RerenderAVideo),
|
||||
"rvc_v2" => Ok(Self::RvcV2),
|
||||
"sad_talker" => Ok(Self::SadTalker),
|
||||
"so_vits_svc" => Ok(Self::SoVitsSvc),
|
||||
"stable_diffusion" => Ok(Self::StableDiffusion),
|
||||
"styletts2" => Ok(Self::StyleTTS2),
|
||||
"tacotron2" => Ok(Self::Tacotron2),
|
||||
"unknown" => Ok(Self::Unknown),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn all_variants() -> BTreeSet<Self> {
|
||||
// NB: BTreeSet is sorted
|
||||
// NB: BTreeSet::from() isn't const, but not worth using LazyStatic, etc.
|
||||
BTreeSet::from([
|
||||
Self::BevyToWorkflow,
|
||||
Self::ComfyUi,
|
||||
Self::ConvertFbxToGltf,
|
||||
Self::MocapNet,
|
||||
Self::RerenderAVideo,
|
||||
Self::RvcV2,
|
||||
Self::SadTalker,
|
||||
Self::SoVitsSvc,
|
||||
Self::StableDiffusion,
|
||||
Self::StyleTTS2,
|
||||
Self::Tacotron2,
|
||||
Self::Unknown,
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::by_table::generic_inference_jobs::inference_job_type::InferenceJobType;
|
||||
use crate::test_helpers::assert_serialization;
|
||||
|
||||
mod explicit_checks {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn default() {
|
||||
assert_eq!(InferenceJobType::default(), InferenceJobType::Unknown);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(InferenceJobType::BevyToWorkflow, "bevy_to_workflow");
|
||||
assert_serialization(InferenceJobType::ComfyUi, "comfy_ui");
|
||||
assert_serialization(InferenceJobType::ConvertFbxToGltf, "convert_fbx_gltf");
|
||||
assert_serialization(InferenceJobType::MocapNet, "mocap_net");
|
||||
assert_serialization(InferenceJobType::RerenderAVideo, "rerender_a_video");
|
||||
assert_serialization(InferenceJobType::RvcV2, "rvc_v2");
|
||||
assert_serialization(InferenceJobType::SadTalker, "sad_talker");
|
||||
assert_serialization(InferenceJobType::SoVitsSvc, "so_vits_svc");
|
||||
assert_serialization(InferenceJobType::StableDiffusion, "stable_diffusion");
|
||||
assert_serialization(InferenceJobType::StyleTTS2, "styletts2");
|
||||
assert_serialization(InferenceJobType::Tacotron2, "tacotron2");
|
||||
assert_serialization(InferenceJobType::Unknown, "unknown");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn to_str() {
|
||||
assert_eq!(InferenceJobType::BevyToWorkflow.to_str(), "bevy_to_workflow");
|
||||
assert_eq!(InferenceJobType::ComfyUi.to_str(), "comfy_ui");
|
||||
assert_eq!(InferenceJobType::ConvertFbxToGltf.to_str(), "convert_fbx_gltf");
|
||||
assert_eq!(InferenceJobType::MocapNet.to_str(), "mocap_net");
|
||||
assert_eq!(InferenceJobType::RerenderAVideo.to_str(), "rerender_a_video");
|
||||
assert_eq!(InferenceJobType::RvcV2.to_str(), "rvc_v2");
|
||||
assert_eq!(InferenceJobType::SadTalker.to_str(), "sad_talker");
|
||||
assert_eq!(InferenceJobType::SoVitsSvc.to_str(), "so_vits_svc");
|
||||
assert_eq!(InferenceJobType::StableDiffusion.to_str(), "stable_diffusion");
|
||||
assert_eq!(InferenceJobType::StyleTTS2.to_str(), "styletts2");
|
||||
assert_eq!(InferenceJobType::Tacotron2.to_str(), "tacotron2");
|
||||
assert_eq!(InferenceJobType::Unknown.to_str(), "unknown");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_str() {
|
||||
assert_eq!(InferenceJobType::from_str("bevy_to_workflow").unwrap(), InferenceJobType::BevyToWorkflow);
|
||||
assert_eq!(InferenceJobType::from_str("comfy_ui").unwrap(), InferenceJobType::ComfyUi);
|
||||
assert_eq!(InferenceJobType::from_str("convert_fbx_gltf").unwrap(), InferenceJobType::ConvertFbxToGltf);
|
||||
assert_eq!(InferenceJobType::from_str("mocap_net").unwrap(), InferenceJobType::MocapNet);
|
||||
assert_eq!(InferenceJobType::from_str("rerender_a_video").unwrap(), InferenceJobType::RerenderAVideo);
|
||||
assert_eq!(InferenceJobType::from_str("rvc_v2").unwrap(), InferenceJobType::RvcV2);
|
||||
assert_eq!(InferenceJobType::from_str("sad_talker").unwrap(), InferenceJobType::SadTalker);
|
||||
assert_eq!(InferenceJobType::from_str("so_vits_svc").unwrap(), InferenceJobType::SoVitsSvc);
|
||||
assert_eq!(InferenceJobType::from_str("stable_diffusion").unwrap(), InferenceJobType::StableDiffusion);
|
||||
assert_eq!(InferenceJobType::from_str("styletts2").unwrap(), InferenceJobType::StyleTTS2);
|
||||
assert_eq!(InferenceJobType::from_str("tacotron2").unwrap(), InferenceJobType::Tacotron2);
|
||||
assert_eq!(InferenceJobType::from_str("unknown").unwrap(), InferenceJobType::Unknown);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
// Static check
|
||||
let mut variants = InferenceJobType::all_variants();
|
||||
assert_eq!(variants.len(), 12);
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::BevyToWorkflow));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::ComfyUi));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::ConvertFbxToGltf));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::MocapNet));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::RerenderAVideo));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::RvcV2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::SadTalker));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::SoVitsSvc));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::StableDiffusion));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::StyleTTS2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::Tacotron2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::Unknown));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
|
||||
// Generated check
|
||||
use strum::IntoEnumIterator;
|
||||
assert_eq!(InferenceJobType::all_variants().len(), InferenceJobType::iter().len());
|
||||
}
|
||||
}
|
||||
|
||||
mod mechanical_checks {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn variant_length() {
|
||||
use strum::IntoEnumIterator;
|
||||
assert_eq!(InferenceJobType::all_variants().len(), InferenceJobType::iter().len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn round_trip() {
|
||||
for variant in InferenceJobType::all_variants() {
|
||||
assert_eq!(variant, InferenceJobType::from_str(variant.to_str()).unwrap());
|
||||
assert_eq!(variant, InferenceJobType::from_str(&format!("{}", variant)).unwrap());
|
||||
assert_eq!(variant, InferenceJobType::from_str(&format!("{:?}", variant)).unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serialized_length_ok_for_database() {
|
||||
const MAX_LENGTH : usize = 32;
|
||||
for variant in InferenceJobType::all_variants() {
|
||||
let serialized = variant.to_str();
|
||||
assert!(serialized.len() > 0, "variant {:?} is too short", variant);
|
||||
assert!(serialized.len() <= MAX_LENGTH, "variant {:?} is too long", variant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,11 @@ pub enum InferenceModelType {
|
||||
ComfyUi,
|
||||
#[serde(rename = "styletts2")]
|
||||
StyleTTS2,
|
||||
/// A job that turns "FBX" game engine files into "GLTF" files (Bevy-compatible).
|
||||
#[serde(rename = "convert_fbx_gltf")]
|
||||
ConvertFbxToGltf,
|
||||
#[serde(rename = "bvh_to_workflow")]
|
||||
BvhToWorkflow
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
@@ -62,6 +67,8 @@ impl InferenceModelType {
|
||||
Self::MocapNet => "mocap_net",
|
||||
Self::StyleTTS2 => "styletts2",
|
||||
Self::ComfyUi => "comfy_ui",
|
||||
Self::ConvertFbxToGltf => "convert_fbx_gltf",
|
||||
Self::BvhToWorkflow => "bvh_to_workflow",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,25 +85,29 @@ impl InferenceModelType {
|
||||
"mocap_net" => Ok(Self::MocapNet),
|
||||
"styletts2" => Ok(Self::StyleTTS2),
|
||||
"comfy_ui" => Ok(Self::ComfyUi),
|
||||
"convert_fbx_gltf" => Ok(Self::ConvertFbxToGltf),
|
||||
"bvh_to_workflow" => Ok(Self::BvhToWorkflow),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn all_variants() -> BTreeSet<InferenceModelType> {
|
||||
pub fn all_variants() -> BTreeSet<Self> {
|
||||
// NB: BTreeSet is sorted
|
||||
// NB: BTreeSet::from() isn't const, but not worth using LazyStatic, etc.
|
||||
BTreeSet::from([
|
||||
InferenceModelType::RvcV2,
|
||||
InferenceModelType::SadTalker,
|
||||
InferenceModelType::SoVitsSvc,
|
||||
InferenceModelType::Tacotron2,
|
||||
InferenceModelType::Vits,
|
||||
InferenceModelType::VallEX,
|
||||
InferenceModelType::RerenderAVideo,
|
||||
InferenceModelType::StableDiffusion,
|
||||
InferenceModelType::MocapNet,
|
||||
InferenceModelType::StyleTTS2,
|
||||
InferenceModelType::ComfyUi,
|
||||
Self::RvcV2,
|
||||
Self::SadTalker,
|
||||
Self::SoVitsSvc,
|
||||
Self::Tacotron2,
|
||||
Self::Vits,
|
||||
Self::VallEX,
|
||||
Self::RerenderAVideo,
|
||||
Self::StableDiffusion,
|
||||
Self::MocapNet,
|
||||
Self::StyleTTS2,
|
||||
Self::ComfyUi,
|
||||
Self::ConvertFbxToGltf,
|
||||
Self::BvhToWorkflow,
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -122,6 +133,8 @@ mod tests {
|
||||
assert_serialization(InferenceModelType::MocapNet, "mocap_net");
|
||||
assert_serialization(InferenceModelType::ComfyUi, "comfy_ui");
|
||||
assert_serialization(InferenceModelType::StyleTTS2, "styletts2");
|
||||
assert_serialization(InferenceModelType::ConvertFbxToGltf, "convert_fbx_gltf");
|
||||
assert_serialization(InferenceModelType::BvhToWorkflow, "bvh_to_workflow");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -137,6 +150,8 @@ mod tests {
|
||||
assert_eq!(InferenceModelType::MocapNet.to_str(), "mocap_net");
|
||||
assert_eq!(InferenceModelType::StyleTTS2.to_str(), "styletts2");
|
||||
assert_eq!(InferenceModelType::ComfyUi.to_str(), "comfy_ui");
|
||||
assert_eq!(InferenceModelType::ConvertFbxToGltf.to_str(), "convert_fbx_gltf");
|
||||
assert_eq!(InferenceModelType::BvhToWorkflow.to_str(), "bvh_to_workflow");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -152,13 +167,15 @@ mod tests {
|
||||
assert_eq!(InferenceModelType::from_str("mocap_net").unwrap(), InferenceModelType::MocapNet);
|
||||
assert_eq!(InferenceModelType::from_str("styletts2").unwrap(), InferenceModelType::StyleTTS2);
|
||||
assert_eq!(InferenceModelType::from_str("comfy_ui").unwrap(), InferenceModelType::ComfyUi);
|
||||
assert_eq!(InferenceModelType::from_str("convert_fbx_gltf").unwrap(), InferenceModelType::ConvertFbxToGltf);
|
||||
assert_eq!(InferenceModelType::from_str("bvh_to_workflow").unwrap(), InferenceModelType::BvhToWorkflow);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
// Static check
|
||||
let mut variants = InferenceModelType::all_variants();
|
||||
assert_eq!(variants.len(), 11);
|
||||
assert_eq!(variants.len(), 13);
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::RvcV2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::SadTalker));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::SoVitsSvc));
|
||||
@@ -170,6 +187,8 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::MocapNet));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::ComfyUi));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::StyleTTS2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::ConvertFbxToGltf));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceModelType::BvhToWorkflow));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
|
||||
// Generated check
|
||||
@@ -195,5 +214,15 @@ mod tests {
|
||||
assert_eq!(variant, InferenceModelType::from_str(&format!("{:?}", variant)).unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serialized_length_ok_for_database() {
|
||||
const MAX_LENGTH : usize = 32;
|
||||
for variant in InferenceModelType::all_variants() {
|
||||
let serialized = variant.to_str();
|
||||
assert!(serialized.len() > 0, "variant {:?} is too short", variant);
|
||||
assert!(serialized.len() <= MAX_LENGTH, "variant {:?} is too long", variant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
pub mod frontend_failure_category;
|
||||
pub mod inference_category;
|
||||
pub mod inference_input_source_token_type;
|
||||
pub mod inference_job_type;
|
||||
pub mod inference_model_type;
|
||||
pub mod inference_result_type;
|
||||
|
||||
@@ -44,6 +44,9 @@ pub enum MediaFileOriginModelType {
|
||||
|
||||
#[serde(rename = "styletts2")]
|
||||
StyleTTS2,
|
||||
|
||||
#[serde(rename = "stable_diffusion_1_5")]
|
||||
StableDiffusion15,
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
@@ -64,6 +67,7 @@ impl MediaFileOriginModelType {
|
||||
Self::MocapNet => "mocap_net",
|
||||
Self::ComfyUi => "comfy_ui",
|
||||
Self::StyleTTS2 => "styletts2",
|
||||
Self::StableDiffusion15 => "stable_diffusion_1_5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +82,7 @@ impl MediaFileOriginModelType {
|
||||
"mocap_net" => Ok(Self::MocapNet),
|
||||
"comfy_ui" => Ok(Self::ComfyUi),
|
||||
"styletts2" => Ok(Self::StyleTTS2),
|
||||
"stable_diffusion_1_5" => Ok(Self::StableDiffusion15),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
@@ -95,6 +100,7 @@ impl MediaFileOriginModelType {
|
||||
Self::MocapNet,
|
||||
Self::ComfyUi,
|
||||
Self::StyleTTS2,
|
||||
Self::StableDiffusion15
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -123,6 +129,7 @@ mod tests {
|
||||
assert_eq!(MediaFileOriginModelType::MocapNet.to_str(), "mocap_net");
|
||||
assert_eq!(MediaFileOriginModelType::ComfyUi.to_str(), "comfy_ui");
|
||||
assert_eq!(MediaFileOriginModelType::StyleTTS2.to_str(), "styletts2");
|
||||
assert_eq!(MediaFileOriginModelType::StableDiffusion15.to_str(), "stable_diffusion_1_5");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -136,13 +143,14 @@ mod tests {
|
||||
assert_eq!(MediaFileOriginModelType::from_str("mocap_net").unwrap(), MediaFileOriginModelType::MocapNet);
|
||||
assert_eq!(MediaFileOriginModelType::from_str("comfy_ui").unwrap(), MediaFileOriginModelType::ComfyUi);
|
||||
assert_eq!(MediaFileOriginModelType::from_str("styletts2").unwrap(), MediaFileOriginModelType::StyleTTS2);
|
||||
assert_eq!(MediaFileOriginModelType::from_str("stable_diffusion_1_5").unwrap(), MediaFileOriginModelType::StableDiffusion15);
|
||||
assert!(MediaFileOriginModelType::from_str("foo").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
let mut variants = MediaFileOriginModelType::all_variants();
|
||||
assert_eq!(variants.len(), 9);
|
||||
assert_eq!(variants.len(), 10);
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::RvcV2));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::SadTalker));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::SoVitsSvc));
|
||||
@@ -152,6 +160,7 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::MocapNet));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::ComfyUi));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::StyleTTS2));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::StableDiffusion15));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ pub enum MediaFileOriginProductCategory {
|
||||
#[serde(rename = "mocap")]
|
||||
Mocap,
|
||||
|
||||
#[serde(rename = "image_gen")]
|
||||
ImageGeneration,
|
||||
// Workflow
|
||||
#[serde(rename = "workflow")]
|
||||
Workflow,
|
||||
@@ -68,6 +70,7 @@ impl MediaFileOriginProductCategory {
|
||||
Self::ZeroShotVoice => "zs_voice",
|
||||
Self::VideoFilter => "video_filter",
|
||||
Self::Mocap => "mocap",
|
||||
Self::ImageGeneration => "image_gen",
|
||||
Self::Workflow => "workflow",
|
||||
}
|
||||
}
|
||||
@@ -81,6 +84,7 @@ impl MediaFileOriginProductCategory {
|
||||
"zs_voice" => Ok(Self::ZeroShotVoice),
|
||||
"video_filter" => Ok(Self::VideoFilter),
|
||||
"mocap" => Ok(Self::Mocap),
|
||||
"image_gen" => Ok(Self::ImageGeneration),
|
||||
"workflow" => Ok(Self::Workflow),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
@@ -97,6 +101,7 @@ impl MediaFileOriginProductCategory {
|
||||
Self::VoiceConversion,
|
||||
Self::ZeroShotVoice,
|
||||
Self::Mocap,
|
||||
Self::ImageGeneration,
|
||||
Self::Workflow,
|
||||
])
|
||||
}
|
||||
@@ -119,6 +124,7 @@ mod tests {
|
||||
assert_serialization(MediaFileOriginProductCategory::ZeroShotVoice, "zs_voice");
|
||||
assert_serialization(MediaFileOriginProductCategory::VideoFilter, "video_filter");
|
||||
assert_serialization(MediaFileOriginProductCategory::Mocap, "mocap");
|
||||
assert_serialization(MediaFileOriginProductCategory::ImageGeneration, "image_gen");
|
||||
assert_serialization(MediaFileOriginProductCategory::Workflow, "workflow");
|
||||
}
|
||||
|
||||
@@ -131,6 +137,7 @@ mod tests {
|
||||
assert_eq!(MediaFileOriginProductCategory::ZeroShotVoice.to_str(), "zs_voice");
|
||||
assert_eq!(MediaFileOriginProductCategory::VideoFilter.to_str(), "video_filter");
|
||||
assert_eq!(MediaFileOriginProductCategory::Mocap.to_str(), "mocap");
|
||||
assert_eq!(MediaFileOriginProductCategory::ImageGeneration.to_str(), "image_gen");
|
||||
assert_eq!(MediaFileOriginProductCategory::Workflow.to_str(), "workflow");
|
||||
}
|
||||
|
||||
@@ -143,13 +150,14 @@ mod tests {
|
||||
assert_eq!(MediaFileOriginProductCategory::from_str("zs_voice").unwrap(), MediaFileOriginProductCategory::ZeroShotVoice);
|
||||
assert_eq!(MediaFileOriginProductCategory::from_str("video_filter").unwrap(), MediaFileOriginProductCategory::VideoFilter);
|
||||
assert_eq!(MediaFileOriginProductCategory::from_str("mocap").unwrap(), MediaFileOriginProductCategory::Mocap);
|
||||
assert_eq!(MediaFileOriginProductCategory::from_str("image_gen").unwrap(),MediaFileOriginProductCategory::ImageGeneration);
|
||||
assert_eq!(MediaFileOriginProductCategory::from_str("workflow").unwrap(), MediaFileOriginProductCategory::Workflow);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
let mut variants = MediaFileOriginProductCategory::all_variants();
|
||||
assert_eq!(variants.len(), 8);
|
||||
assert_eq!(variants.len(), 9);
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::Unknown));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::FaceAnimator));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::TextToSpeech));
|
||||
@@ -157,6 +165,7 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::ZeroShotVoice));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::VideoFilter));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::Mocap));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::ImageGeneration));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileOriginProductCategory::Workflow));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use strum::EnumCount;
|
||||
use strum::EnumIter;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// Used in the `media_files` table in a `VARCHAR` field.
|
||||
/// Used in the `media_files` table in a `VARCHAR(16)` field.
|
||||
///
|
||||
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
@@ -23,7 +23,22 @@ pub enum MediaFileType {
|
||||
Video,
|
||||
|
||||
/// Mocap files: BVH, etc.
|
||||
/// NB: In actuality, this is just the BVH file type.
|
||||
/// NB: This is the old type to migrate from.
|
||||
Mocap,
|
||||
|
||||
/// BVH files (for Bevy)
|
||||
/// NB: This is the new type to migrate to.
|
||||
Bvh,
|
||||
|
||||
/// FBX files (for Bevy)
|
||||
Fbx,
|
||||
|
||||
/// glTF binary files (for Bevy)
|
||||
Glb,
|
||||
|
||||
/// glTF files (for Bevy)
|
||||
Gltf,
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
@@ -39,6 +54,10 @@ impl MediaFileType {
|
||||
Self::Image => "image",
|
||||
Self::Video => "video",
|
||||
Self::Mocap => "mocap",
|
||||
Self::Bvh => "bvh",
|
||||
Self::Fbx => "fbx",
|
||||
Self::Glb => "glb",
|
||||
Self::Gltf => "gltf",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +67,10 @@ impl MediaFileType {
|
||||
"image" => Ok(Self::Image),
|
||||
"video" => Ok(Self::Video),
|
||||
"mocap" => Ok(Self::Mocap),
|
||||
"bvh" => Ok(Self::Bvh),
|
||||
"fbx" => Ok(Self::Fbx),
|
||||
"glb" => Ok(Self::Glb),
|
||||
"gltf" => Ok(Self::Gltf),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
@@ -60,6 +83,10 @@ impl MediaFileType {
|
||||
Self::Image,
|
||||
Self::Video,
|
||||
Self::Mocap,
|
||||
Self::Bvh,
|
||||
Self::Fbx,
|
||||
Self::Glb,
|
||||
Self::Gltf,
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -78,6 +105,10 @@ mod tests {
|
||||
assert_serialization(MediaFileType::Image, "image");
|
||||
assert_serialization(MediaFileType::Video, "video");
|
||||
assert_serialization(MediaFileType::Mocap, "mocap");
|
||||
assert_serialization(MediaFileType::Bvh, "bvh");
|
||||
assert_serialization(MediaFileType::Fbx, "fbx");
|
||||
assert_serialization(MediaFileType::Glb, "glb");
|
||||
assert_serialization(MediaFileType::Gltf, "gltf");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +120,10 @@ mod tests {
|
||||
assert_eq!(MediaFileType::Audio.to_str(), "audio");
|
||||
assert_eq!(MediaFileType::Image.to_str(), "image");
|
||||
assert_eq!(MediaFileType::Video.to_str(), "video");
|
||||
assert_eq!(MediaFileType::Mocap.to_str(), "mocap");
|
||||
assert_eq!(MediaFileType::Bvh.to_str(), "bvh");
|
||||
assert_eq!(MediaFileType::Fbx.to_str(), "fbx");
|
||||
assert_eq!(MediaFileType::Glb.to_str(), "glb");
|
||||
assert_eq!(MediaFileType::Gltf.to_str(), "gltf");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -98,6 +132,10 @@ mod tests {
|
||||
assert_eq!(MediaFileType::from_str("image").unwrap(), MediaFileType::Image);
|
||||
assert_eq!(MediaFileType::from_str("video").unwrap(), MediaFileType::Video);
|
||||
assert_eq!(MediaFileType::from_str("mocap").unwrap(), MediaFileType::Mocap);
|
||||
assert_eq!(MediaFileType::from_str("bvh").unwrap(), MediaFileType::Bvh);
|
||||
assert_eq!(MediaFileType::from_str("fbx").unwrap(), MediaFileType::Fbx);
|
||||
assert_eq!(MediaFileType::from_str("glb").unwrap(), MediaFileType::Glb);
|
||||
assert_eq!(MediaFileType::from_str("gltf").unwrap(), MediaFileType::Gltf);
|
||||
assert!(MediaFileType::from_str("foo").is_err());
|
||||
}
|
||||
}
|
||||
@@ -108,11 +146,15 @@ mod tests {
|
||||
#[test]
|
||||
fn all_variants() {
|
||||
let mut variants = MediaFileType::all_variants();
|
||||
assert_eq!(variants.len(), 4);
|
||||
assert_eq!(variants.len(), 8);
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Audio));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Image));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Video));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Mocap));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Bvh));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Fbx));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Glb));
|
||||
assert_eq!(variants.pop_first(), Some(MediaFileType::Gltf));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
}
|
||||
}
|
||||
@@ -134,5 +176,15 @@ mod tests {
|
||||
assert_eq!(variant, MediaFileType::from_str(&format!("{:?}", variant)).unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serialized_length_ok_for_database() {
|
||||
const MAX_LENGTH : usize = 16;
|
||||
for variant in MediaFileType::all_variants() {
|
||||
let serialized = variant.to_str();
|
||||
assert!(serialized.len() > 0, "variant {:?} is too short", variant);
|
||||
assert!(serialized.len() <= MAX_LENGTH, "variant {:?} is too long", variant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,12 @@ use std::fmt::Debug;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::prefixes::TokenPrefix;
|
||||
|
||||
/// The primary key for the "zs_voice_datasets" table.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize, ToSchema)]
|
||||
#[sqlx(transparent)]
|
||||
pub struct ZsVoiceDatasetToken(pub String);
|
||||
|
||||
|
||||
@@ -5,14 +5,7 @@ use sqlx::mysql::MySqlPoolOptions;
|
||||
use config::shared_constants::{DEFAULT_MYSQL_CONNECTION_STRING, DEFAULT_RUST_LOG};
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use crate::bucket_clients::get_bucket_clients;
|
||||
use crate::cli_args::parse_cli_args;
|
||||
use crate::seeding::model_weights::seed_weights;
|
||||
use crate::seeding::media_files::seed_media_seedtool;
|
||||
use crate::seeding::seed_media_files::seed_media_files;
|
||||
use crate::seeding::tts_tacotron2::seed_tts_tacotron2;
|
||||
use crate::seeding::users::seed_user_accounts;
|
||||
use crate::seeding::voice_conversion::seed_voice_conversion;
|
||||
|
||||
pub mod bucket_clients;
|
||||
|
||||
@@ -33,18 +26,18 @@ pub async fn main() -> AnyhowResult<()> {
|
||||
"MYSQL_URL",
|
||||
DEFAULT_MYSQL_CONNECTION_STRING);
|
||||
|
||||
let pool = MySqlPoolOptions::new()
|
||||
let _pool = MySqlPoolOptions::new()
|
||||
.max_connections(easyenv::get_env_num("MYSQL_MAX_CONNECTIONS", 3)?)
|
||||
.connect(&db_connection_string)
|
||||
.await?;
|
||||
|
||||
let args = parse_cli_args()?;
|
||||
let _args = parse_cli_args()?;
|
||||
|
||||
let mut maybe_bucket_clients = None;
|
||||
//let mut maybe_bucket_clients = None;
|
||||
|
||||
if args.seed_cloud_bucket {
|
||||
maybe_bucket_clients = Some(get_bucket_clients()?);
|
||||
}
|
||||
//if args.seed_cloud_bucket {
|
||||
// maybe_bucket_clients = Some(get_bucket_clients()?);
|
||||
//}
|
||||
|
||||
// let mut maybe_elasticsearch = None;
|
||||
//
|
||||
@@ -52,13 +45,13 @@ pub async fn main() -> AnyhowResult<()> {
|
||||
// maybe_elasticsearch = Some(get_elasticsearch_client());
|
||||
// }
|
||||
|
||||
seed_user_accounts(&pool).await?;
|
||||
seed_media_files(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
//seed_user_accounts(&pool).await?;
|
||||
// seed_media_files(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
//seed_zero_shot_tts(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
seed_voice_conversion(&pool).await?;
|
||||
seed_weights(&pool).await?;
|
||||
seed_media_seedtool(&pool).await?;
|
||||
seed_tts_tacotron2(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
// seed_voice_conversion(&pool).await?;
|
||||
//seed_weights(&pool).await?;
|
||||
// seed_media_seedtool(&pool).await?;
|
||||
// seed_tts_tacotron2(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
|
||||
// should seed the weights with a few files for hanashi
|
||||
//seed_weights_files(&pool, maybe_bucket_clients.as_ref()).await?;
|
||||
|
||||
@@ -43,7 +43,7 @@ pub async fn seed_test_videos(mysql_pool: &Pool<MySql>, user_token: UserToken) -
|
||||
}
|
||||
|
||||
pub async fn seed_media_seedtool(mysql_pool: &Pool<MySql>) -> AnyhowResult<()> {
|
||||
info!("Seeding weights...");
|
||||
info!("Seeding media...");
|
||||
|
||||
let user_token = match get_user_token_by_username(HANASHI_USERNAME, mysql_pool).await? {
|
||||
None => {
|
||||
|
||||
@@ -41,14 +41,14 @@ pub async fn test_seed_weights_files() -> AnyhowResult<()> {
|
||||
|
||||
let bucket_details1 = RemoteCloudBucketDetails {
|
||||
object_hash: String::from("apa0ej6es8d3ss2gwtf1cghge35qn9tn"),
|
||||
prefix: String::from("sd15"),
|
||||
suffix: String::from("safetensors"),
|
||||
prefix: String::from("sd15_"),
|
||||
suffix: String::from(".safetensors"),
|
||||
};
|
||||
|
||||
let bucket_details2 = RemoteCloudBucketDetails {
|
||||
object_hash: String::from("27kz11et18fargyyxbj66ntfn621k9d3"),
|
||||
prefix: String::from("loRA"),
|
||||
suffix: String::from("safetensors"),
|
||||
prefix: String::from("loRA_"),
|
||||
suffix: String::from(".safetensors"),
|
||||
};
|
||||
|
||||
remote_cloud_file_client.download_file(bucket_details1, String::from("./checkpoint")).await?;
|
||||
@@ -331,10 +331,6 @@ pub async fn seed_weights_for_paging(mysql_pool: &Pool<MySql>, user_token: UserT
|
||||
// private_bucket_hash = format!("bucket_hash{}", i);
|
||||
private_bucket_prefix = format!("_fake");
|
||||
private_bucket_extension = format!("rvcV2");
|
||||
//cached_user_ratings_total_count = i;
|
||||
//cached_user_ratings_positive_count = i;
|
||||
//cached_user_ratings_negative_count = i;
|
||||
//cached_user_ratings_ratio = i as u32 / 100;
|
||||
version = i as i32;
|
||||
|
||||
println!("Out of range");
|
||||
@@ -346,6 +342,7 @@ pub async fn seed_weights_for_paging(mysql_pool: &Pool<MySql>, user_token: UserT
|
||||
weights_type: weights_types, // replace with actual WeightsType
|
||||
weights_category, // replace with actual WeightsCategory
|
||||
title,
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some(description),
|
||||
maybe_description_rendered_html: Some(description_rendered_html.to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -363,7 +360,7 @@ pub async fn seed_weights_for_paging(mysql_pool: &Pool<MySql>, user_token: UserT
|
||||
//cached_user_ratings_positive_count,
|
||||
//cached_user_ratings_negative_count,
|
||||
//maybe_cached_user_ratings_ratio: Some(cached_user_ratings_ratio as f32),
|
||||
version,
|
||||
version: version as u32,
|
||||
mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
};
|
||||
|
||||
@@ -615,6 +612,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
weights_type: WeightsType::StableDiffusion15, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Dragonfruit".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some(sd1_5_markdown_description.to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -623,7 +621,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
original_download_url: Some("https://civitai.com/models/41865/majicmix-fantasy".to_string()),
|
||||
original_filename: Some("majicmixFantasy_v30Vae.safetensors".to_string()),
|
||||
file_size_bytes: metadata1.file_size_bytes as i32,
|
||||
file_size_bytes: metadata1.file_size_bytes,
|
||||
file_checksum_sha2: metadata1.sha256_checksum.to_string(),
|
||||
public_bucket_hash: metadata1.bucket_details.clone().unwrap().object_hash,
|
||||
maybe_public_bucket_prefix: Some(metadata1.bucket_details.clone().unwrap().prefix),
|
||||
@@ -636,6 +634,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
token: &model_weight_token2, // replace with actual ModelWeightToken
|
||||
weights_type: WeightsType::LoRA, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
maybe_cover_image_media_file_token: None,
|
||||
title: "MIHOYO Collection 米家全家桶 (Honkai Impact 3rd | Honkai Star Rail | Genshin Impact | Zenless Zone Zero)".to_string(),
|
||||
maybe_description_markdown: Some(miyhoyo_description.to_string()),
|
||||
maybe_description_rendered_html: Some(miyhoyo_description.to_string()),
|
||||
@@ -645,7 +644,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
maybe_last_update_user_token: Some("<p> Honkai <p>".to_string()),
|
||||
original_download_url: Some("https://civitai.com/models/95243/mihoyo-collection-honkai-impact-3rd-or-honkai-star-rail-or-genshin-impact-or-zenless-zone-zero".to_string()),
|
||||
original_filename: Some("xiawolei-v100-000019.safetensors".to_string()),
|
||||
file_size_bytes: metadata2.file_size_bytes as i32,
|
||||
file_size_bytes: metadata2.file_size_bytes,
|
||||
file_checksum_sha2: metadata2.sha256_checksum.to_string(),
|
||||
public_bucket_hash: metadata2.bucket_details.clone().unwrap().object_hash.clone(),
|
||||
maybe_public_bucket_prefix: Some(metadata2.bucket_details.clone().unwrap().prefix),
|
||||
@@ -659,6 +658,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
weights_type: WeightsType::StableDiffusion15, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "z-vae".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some(sd_vae_description.to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -667,7 +667,7 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
original_download_url: Some("https://civitai.com/models/97653/z-vae".to_string()),
|
||||
original_filename: Some("zVae_v20.safetensors".to_string()),
|
||||
file_size_bytes: metadata3.file_size_bytes as i32,
|
||||
file_size_bytes: metadata3.file_size_bytes,
|
||||
file_checksum_sha2: metadata3.sha256_checksum.to_string(),
|
||||
public_bucket_hash: metadata3.bucket_details.clone().unwrap().object_hash,
|
||||
maybe_public_bucket_prefix: Some(metadata3.bucket_details.clone().unwrap().prefix),
|
||||
@@ -685,33 +685,46 @@ Noosphere by skumerz + dalcefoPainting + 饭特稀V08 by zhazhahui345 + GhostMix
|
||||
|
||||
pub async fn seed_workflows_for_testing_inference(mysql_pool: &Pool<MySql>, user_token: UserToken) -> AnyhowResult<()>{
|
||||
let model_weight_token1 = ModelWeightToken::generate_for_testing_and_dev_seeding_never_use_in_production_seriously();
|
||||
let model_weight_token2 = ModelWeightToken::generate_for_testing_and_dev_seeding_never_use_in_production_seriously();
|
||||
//let model_weight_token2 = ModelWeightToken::generate_for_testing_and_dev_seeding_never_use_in_production_seriously();
|
||||
//let model_weight_token3 = ModelWeightToken::generate_for_testing_and_dev_seeding_never_use_in_production_seriously();
|
||||
//let model_weight_token4 = ModelWeightToken::new_from_str("weight_n8sz47gmfw2zx02snrbz88ns9");
|
||||
|
||||
let mut path_to_comfy = get_seed_tool_data_root();
|
||||
path_to_comfy.push("models/workflows/comfyui/workflow_api.json");
|
||||
path_to_comfy.push("models/workflows/comfyui/yae_video_prod.json");
|
||||
let remote_cloud_file_client = RemoteCloudFileClient::get_remote_cloud_file_client().await?;
|
||||
let comfy_weights_descriptor = Box::new(WeightsWorkflowDescriptor {});
|
||||
let metadata1 = remote_cloud_file_client.upload_file(comfy_weights_descriptor, path_to_comfy.as_path().to_str().unwrap()).await?;
|
||||
|
||||
let mut path_to_comfy2 = get_seed_tool_data_root();
|
||||
path_to_comfy2.push("models/workflows/comfyui/majicmixRealistic_v7.safetensors");
|
||||
let comfy_weights_descriptor2 = Box::new(WeightsSD15Descriptor {});
|
||||
let metadata2 = remote_cloud_file_client.upload_file(comfy_weights_descriptor2, path_to_comfy2.as_path().to_str().unwrap()).await?;
|
||||
// let mut path_to_comfy2 = get_seed_tool_data_root();
|
||||
// path_to_comfy2.push("models/workflows/comfyui/majicmixRealistic_v7.safetensors");
|
||||
// let comfy_weights_descriptor2 = Box::new(WeightsSD15Descriptor {});
|
||||
// let metadata2 = remote_cloud_file_client.upload_file(comfy_weights_descriptor2, path_to_comfy2.as_path().to_str().unwrap()).await?;
|
||||
|
||||
// let mut path_to_comfy3 = get_seed_tool_data_root();
|
||||
// path_to_comfy3.push("models/workflows/comfyui/yae_video_test.json");
|
||||
// let comfy_weights_descriptor3 = Box::new(WeightsWorkflowDescriptor {});
|
||||
// let metadata3 = remote_cloud_file_client.upload_file(comfy_weights_descriptor3, path_to_comfy3.as_path().to_str().unwrap()).await?;
|
||||
|
||||
/* let mut path_to_comfy4 = get_seed_tool_data_root();
|
||||
path_to_comfy4.push("models/workflows/comfyui/v3_sd15_mm.ckpt");
|
||||
let comfy_weights_descriptor4 = Box::new(WeightsSD15CkptDescriptor {});
|
||||
let metadata4 = remote_cloud_file_client.upload_file(comfy_weights_descriptor4, path_to_comfy4.as_path().to_str().unwrap()).await?;*/
|
||||
|
||||
let weights1 = CreateModelWeightsArgs {
|
||||
token: &model_weight_token1, // replace with actual ModelWeightToken
|
||||
weights_type: WeightsType::ComfyUi, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::WorkflowConfig, // replace with actual WeightsCategory
|
||||
title: "comfy-test-workflow".to_string(),
|
||||
maybe_description_markdown: Some("Test workflow for ComfyUI".to_string()),
|
||||
title: "yae-video-prod".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("ComfyUI Workflow".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
creator_ip_address: "192.168.1.1",
|
||||
creator_set_visibility: Visibility::Public,
|
||||
maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
original_download_url: Some("https://github.com/comfyanonymous/ComfyUI".to_string()),
|
||||
original_filename: Some("test-workflow.json".to_string()),
|
||||
file_size_bytes: metadata1.file_size_bytes as i32,
|
||||
original_filename: Some("yae_video_prod.json".to_string()),
|
||||
file_size_bytes: metadata1.file_size_bytes,
|
||||
file_checksum_sha2: metadata1.sha256_checksum.to_string(),
|
||||
public_bucket_hash: metadata1.bucket_details.clone().unwrap().object_hash,
|
||||
maybe_public_bucket_prefix: Some(metadata1.bucket_details.clone().unwrap().prefix),
|
||||
@@ -719,30 +732,76 @@ pub async fn seed_workflows_for_testing_inference(mysql_pool: &Pool<MySql>, user
|
||||
version: 1,
|
||||
mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
};
|
||||
let weights2 = CreateModelWeightsArgs {
|
||||
token: &model_weight_token2, // replace with actual ModelWeightToken
|
||||
weights_type: WeightsType::ComfyUi, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::WorkflowConfig, // replace with actual WeightsCategory
|
||||
title: "v1-5-pruned-emaonly".to_string(),
|
||||
maybe_description_markdown: Some("Test model for ComfyUI".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
creator_ip_address: "192.168.1.1",
|
||||
creator_set_visibility: Visibility::Public,
|
||||
maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
original_download_url: Some("https://huggingface.co/runwayml/stable-diffusion-v1-5".to_string()),
|
||||
original_filename: Some("v1-5-pruned-emaonly.ckpt".to_string()),
|
||||
file_size_bytes: metadata2.file_size_bytes as i32,
|
||||
file_checksum_sha2: metadata2.sha256_checksum.to_string(),
|
||||
public_bucket_hash: metadata2.bucket_details.clone().unwrap().object_hash,
|
||||
maybe_public_bucket_prefix: Some(metadata2.bucket_details.clone().unwrap().prefix),
|
||||
maybe_public_bucket_extension: Some(metadata2.bucket_details.clone().unwrap().suffix),
|
||||
version: 1,
|
||||
mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
};
|
||||
// let weights2 = CreateModelWeightsArgs {
|
||||
// token: &model_weight_token2, // replace with actual ModelWeightToken
|
||||
// weights_type: WeightsType::ComfyUi, // replace with actual WeightsType
|
||||
// weights_category: WeightsCategory::WorkflowConfig, // replace with actual WeightsCategory
|
||||
// title: "v1-5-pruned-emaonly".to_string(),
|
||||
// maybe_description_markdown: Some("Test model for ComfyUI".to_string()),
|
||||
// maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
// creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
// creator_ip_address: "192.168.1.1",
|
||||
// creator_set_visibility: Visibility::Public,
|
||||
// maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
// original_download_url: Some("https://huggingface.co/runwayml/stable-diffusion-v1-5".to_string()),
|
||||
// original_filename: Some("v1-5-pruned-emaonly.ckpt".to_string()),
|
||||
// file_size_bytes: metadata2.file_size_bytes as i32,
|
||||
// file_checksum_sha2: metadata2.sha256_checksum.to_string(),
|
||||
// public_bucket_hash: metadata2.bucket_details.clone().unwrap().object_hash,
|
||||
// maybe_public_bucket_prefix: Some(metadata2.bucket_details.clone().unwrap().prefix),
|
||||
// maybe_public_bucket_extension: Some(metadata2.bucket_details.clone().unwrap().suffix),
|
||||
// version: 1,
|
||||
// mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
// };
|
||||
|
||||
// let weights3 = CreateModelWeightsArgs {
|
||||
// token: &model_weight_token3, // replace with actual ModelWeightToken
|
||||
// weights_type: WeightsType::ComfyUi, // replace with actual WeightsType
|
||||
// weights_category: WeightsCategory::WorkflowConfig, // replace with actual WeightsCategory
|
||||
// title: "yae-video-test".to_string(),
|
||||
// maybe_description_markdown: Some("Test workflow for ComfyUI".to_string()),
|
||||
// maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
// creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
// creator_ip_address: "192.168.1.1",
|
||||
// creator_set_visibility: Visibility::Public,
|
||||
// maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
// original_download_url: Some("https://github.com/comfyanonymous/ComfyUI".to_string()),
|
||||
// original_filename: Some("yae-video-test.json".to_string()),
|
||||
// file_size_bytes: metadata3.file_size_bytes as i32,
|
||||
// file_checksum_sha2: metadata3.sha256_checksum.to_string(),
|
||||
// public_bucket_hash: metadata3.bucket_details.clone().unwrap().object_hash,
|
||||
// maybe_public_bucket_prefix: Some(metadata3.bucket_details.clone().unwrap().prefix),
|
||||
// maybe_public_bucket_extension: Some(metadata3.bucket_details.clone().unwrap().suffix),
|
||||
// version: 1,
|
||||
// mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
// };
|
||||
|
||||
// let weights4 = CreateModelWeightsArgs {
|
||||
// token: &model_weight_token4, // replace with actual ModelWeightToken
|
||||
// weights_type: WeightsType::ComfyUi, // replace with actual WeightsType
|
||||
// weights_category: WeightsCategory::WorkflowConfig, // replace with actual WeightsCategory
|
||||
// title: "v3_sd15_mm".to_string(),
|
||||
// maybe_description_markdown: Some("ComfyUI motion module".to_string()),
|
||||
// maybe_description_rendered_html: Some("<p>Description</p>".to_string()),
|
||||
// creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
// creator_ip_address: "192.168.1.1",
|
||||
// creator_set_visibility: Visibility::Public,
|
||||
// maybe_last_update_user_token: Some("Last Update User Token".to_string()),
|
||||
// original_download_url: Some("https://huggingface.co/guoyww/animatediff/blob/main/v3_sd15_mm.ckpt".to_string()),
|
||||
// original_filename: Some("v3_sd15_mm.ckpt".to_string()),
|
||||
// file_size_bytes: metadata4.file_size_bytes as i32,
|
||||
// file_checksum_sha2: metadata4.sha256_checksum.to_string(),
|
||||
// public_bucket_hash: metadata4.bucket_details.clone().unwrap().object_hash,
|
||||
// maybe_public_bucket_prefix: Some(metadata4.bucket_details.clone().unwrap().prefix),
|
||||
// maybe_public_bucket_extension: Some(metadata4.bucket_details.clone().unwrap().suffix),
|
||||
// version: 1,
|
||||
// mysql_pool: &mysql_pool, // replace with actual MySqlPool
|
||||
// };
|
||||
|
||||
create_weight(weights1).await?;
|
||||
create_weight(weights2).await?;
|
||||
// create_weight(weights2).await?;
|
||||
// create_weight(weights3).await?;
|
||||
// create_weight(weights4).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -767,6 +826,7 @@ pub async fn seed_weights_for_user_token(
|
||||
weights_type: WeightsType::RvcV2, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::VoiceConversion, // replace with actual WeightsCategory
|
||||
title: "Title 1".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 1".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 1</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -778,8 +838,8 @@ pub async fn seed_weights_for_user_token(
|
||||
file_size_bytes: 1024,
|
||||
file_checksum_sha2: "checksum1".to_string(),
|
||||
public_bucket_hash: "bucket_hash1".to_string(),
|
||||
maybe_public_bucket_prefix: Some("_fake".to_string()),
|
||||
maybe_public_bucket_extension: Some("rvc".to_string()),
|
||||
maybe_public_bucket_prefix: Some("rvc_".to_string()),
|
||||
maybe_public_bucket_extension: Some(".pt".to_string()),
|
||||
//cached_user_ratings_total_count: 10,
|
||||
//cached_user_ratings_positive_count: 9,
|
||||
//cached_user_ratings_negative_count: 1,
|
||||
@@ -792,6 +852,7 @@ pub async fn seed_weights_for_user_token(
|
||||
weights_type: WeightsType::HifiganTacotron2, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::TextToSpeech, // replace with actual WeightsCategory
|
||||
title: "Title 2".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 2".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 2</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -817,6 +878,7 @@ pub async fn seed_weights_for_user_token(
|
||||
weights_type: WeightsType::StableDiffusion15, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 3".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 3".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 3</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -842,6 +904,7 @@ pub async fn seed_weights_for_user_token(
|
||||
weights_type: WeightsType::LoRA, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 4".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 4".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 4</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -867,6 +930,7 @@ pub async fn seed_weights_for_user_token(
|
||||
weights_type: WeightsType::LoRA, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 5".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 4".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 4</p>".to_string()),
|
||||
creator_user_token: Some(&user_token), // replace with actual UserToken
|
||||
@@ -918,6 +982,7 @@ pub async fn original_seed_weights(mysql_pool: &Pool<MySql>, _user_token: UserTo
|
||||
weights_type: WeightsType::RvcV2, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::VoiceConversion, // replace with actual WeightsCategory
|
||||
title: "Title 1".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 1".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 1</p>".to_string()),
|
||||
creator_user_token: Some(&creator_token1), // replace with actual UserToken
|
||||
@@ -943,6 +1008,7 @@ pub async fn original_seed_weights(mysql_pool: &Pool<MySql>, _user_token: UserTo
|
||||
weights_type: WeightsType::HifiganTacotron2, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::TextToSpeech, // replace with actual WeightsCategory
|
||||
title: "Title 2".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 2".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 2</p>".to_string()),
|
||||
creator_user_token: Some(&creator_token2), // replace with actual UserToken
|
||||
@@ -968,6 +1034,7 @@ pub async fn original_seed_weights(mysql_pool: &Pool<MySql>, _user_token: UserTo
|
||||
weights_type: WeightsType::StableDiffusion15, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 3".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 3".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 3</p>".to_string()),
|
||||
creator_user_token: Some(&creator_token3), // replace with actual UserToken
|
||||
@@ -993,6 +1060,7 @@ pub async fn original_seed_weights(mysql_pool: &Pool<MySql>, _user_token: UserTo
|
||||
weights_type: WeightsType::LoRA, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 4".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 4".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 4</p>".to_string()),
|
||||
creator_user_token: Some(&creator_token4), // replace with actual UserToken
|
||||
@@ -1018,6 +1086,7 @@ pub async fn original_seed_weights(mysql_pool: &Pool<MySql>, _user_token: UserTo
|
||||
weights_type: WeightsType::LoRA, // replace with actual WeightsType
|
||||
weights_category: WeightsCategory::ImageGeneration, // replace with actual WeightsCategory
|
||||
title: "Title 5".to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some("Description 5".to_string()),
|
||||
maybe_description_rendered_html: Some("<p>Description 5</p>".to_string()),
|
||||
creator_user_token: Some(&creator_token5), // replace with actual UserToken
|
||||
@@ -1062,8 +1131,8 @@ pub async fn seed_weights(mysql_pool: &Pool<MySql>) -> AnyhowResult<()> {
|
||||
// seed_weights_for_user_token(mysql_pool, user_token).await?;
|
||||
// seed_weights_for_paging(mysql_pool,user_token).await?;
|
||||
seed_weights_for_testing_inference(mysql_pool,user_token.clone()).await?;
|
||||
println!("TESTING DOWLOAD");
|
||||
test_seed_weights_files().await?;
|
||||
seed_workflows_for_testing_inference(mysql_pool,user_token.clone()).await?;
|
||||
// println!("TESTING DOWLOAD");
|
||||
//test_seed_weights_files().await?;
|
||||
// seed_workflows_for_testing_inference(mysql_pool,user_token.clone()).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::path::Path;
|
||||
use std::result::Result::Ok;
|
||||
|
||||
use log::info;
|
||||
use rand::Rng;
|
||||
@@ -25,7 +26,7 @@ use tokens::tokens::users::UserToken;
|
||||
|
||||
use crate::bucket_clients::BucketClients;
|
||||
use crate::seeding::users::HANASHI_USER_TOKEN;
|
||||
use std::result::Result::Ok;
|
||||
|
||||
pub async fn seed_weights_files(
|
||||
mysql_pool: &Pool<MySql>,
|
||||
maybe_bucket_clients: Option<&BucketClients>
|
||||
@@ -129,6 +130,7 @@ pub async fn seed_weights_files(
|
||||
weights_type, // Assuming weights_type is defined elsewhere
|
||||
weights_category, // Assuming weights_category is defined elsewhere
|
||||
title: title.to_string(),
|
||||
maybe_cover_image_media_file_token: None,
|
||||
maybe_description_markdown: Some(description.to_string()),
|
||||
maybe_description_rendered_html: Some(description_rendered_html.to_string()),
|
||||
creator_user_token: Some(&user_token),
|
||||
@@ -137,7 +139,7 @@ pub async fn seed_weights_files(
|
||||
maybe_last_update_user_token: None, // Assuming there is no last update user token
|
||||
original_download_url: Some(original_download_url.to_string()),
|
||||
original_filename: Some(original_filename.to_string()),
|
||||
file_size_bytes: file_size_bytes as i32, // Assuming the file size is 0
|
||||
file_size_bytes, // Assuming the file size is 0
|
||||
file_checksum_sha2: sha256_checksum.to_string(), // Assuming the file checksum is an empty string
|
||||
public_bucket_hash: bucket_hash,
|
||||
maybe_public_bucket_prefix: Some(maybe_bucket_prefix.to_string()),
|
||||
|
||||
@@ -33,7 +33,7 @@ pub enum Action {
|
||||
#[command(name="elasticsearch-cli")]
|
||||
pub struct Args {
|
||||
#[arg(name="action", long="action", help="action to take", required=true)]
|
||||
action: String,
|
||||
action: Action,
|
||||
|
||||
#[arg(name="mysql", long="mysql", help="production or development")]
|
||||
mysql: Option<String>,
|
||||
@@ -48,7 +48,7 @@ pub fn parse_cli_args() -> AnyhowResult<ParsedArgs> {
|
||||
Ok(ParsedArgs {
|
||||
mysql_environment: to_environment(args.mysql.as_deref())?,
|
||||
elasticsearch_environment: to_environment(args.elasticsearch.as_deref())?,
|
||||
action: action_from_str(&args.action)?,
|
||||
action: args.action,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ pub async fn create_all_model_weight_documents(mysql: &Pool<MySql>, elasticsearc
|
||||
async fn create_document_from_record(elasticsearch: &Elasticsearch, record: ModelWeightForElasticsearchRecord) -> AnyhowResult<()> {
|
||||
info!("Create record for {:?} - {:?}", record.token, record.title);
|
||||
|
||||
let is_deleted = record.user_deleted_at.is_some() || record.mod_deleted_at.is_some();
|
||||
|
||||
let document = ModelWeightDocument {
|
||||
token: record.token,
|
||||
|
||||
@@ -93,6 +95,8 @@ async fn create_document_from_record(elasticsearch: &Elasticsearch, record: Mode
|
||||
updated_at: record.updated_at,
|
||||
user_deleted_at: record.user_deleted_at,
|
||||
mod_deleted_at: record.mod_deleted_at,
|
||||
|
||||
is_deleted,
|
||||
};
|
||||
|
||||
let op : BulkOperation<_> = BulkOperation::index(&document)
|
||||
|
||||
@@ -36,6 +36,9 @@ impl Error for BucketClientError {}
|
||||
|
||||
|
||||
impl BucketClient {
|
||||
pub fn bucket_name(&self) -> String {
|
||||
self.bucket.name().to_string()
|
||||
}
|
||||
|
||||
pub fn create(
|
||||
access_key: &str,
|
||||
|
||||
@@ -26,7 +26,7 @@ pub struct FileBucketDirectory {
|
||||
// gets you cloud bucket path e.g weights/a/b/c/d/clould_path_entropy
|
||||
let remote_cloud_base_directory = format!("{}/{}{}", file_descriptor.remote_directory_path(), middle, entropy);
|
||||
// gets you name of the file with suffix and prefix and entropy in the centre
|
||||
let file_name = format!("{}_{}.{}", bucket_details.get_prefix(), entropy, bucket_details.get_suffix());
|
||||
let file_name = format!("{}{}{}", bucket_details.get_prefix(), entropy, bucket_details.get_suffix());
|
||||
// note: no longer optional because it's easy to know what it would be in the db explicit is better than implcit.
|
||||
// This is the full path you download from
|
||||
let full_remote_cloud_file_path = format!("{}/{}", remote_cloud_base_directory , file_name);
|
||||
@@ -46,7 +46,7 @@ pub struct FileBucketDirectory {
|
||||
// gets you cloud bucket path e.g weights/a/b/c/d/clould_path_entropy
|
||||
let remote_cloud_base_directory = format!("{}/{}{}", file_descriptor.remote_directory_path(), middle, entropy);
|
||||
// gets you name of the file with suffix and prefix and entropy in the centre
|
||||
let file_name = format!("{}_{}.{}", file_descriptor.get_prefix(), entropy, file_descriptor.get_suffix());
|
||||
let file_name = format!("{}{}{}", file_descriptor.get_prefix(), entropy, file_descriptor.get_suffix());
|
||||
// note: no longer optional because it's easy to know what it would be in the db explicit is better than implcit.
|
||||
|
||||
// This is the full path you upload to.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use crate::remote_file_manager::file_descriptor::FileDescriptor;
|
||||
|
||||
// TODO ASK BRANDON WHAT path should this be?
|
||||
const MEDIA_FILE_DIRECTORY: &str = "/media";
|
||||
|
||||
@@ -9,11 +10,11 @@ impl FileDescriptor for MediaImagePngDescriptor {
|
||||
MEDIA_FILE_DIRECTORY
|
||||
}
|
||||
fn get_suffix(&self)->String {
|
||||
"png".to_string()
|
||||
".png".to_string()
|
||||
}
|
||||
|
||||
fn get_prefix(&self)->String {
|
||||
"image".to_string()
|
||||
"image_".to_string()
|
||||
}
|
||||
|
||||
fn is_public(&self) -> bool {
|
||||
@@ -27,11 +28,29 @@ impl FileDescriptor for MediaVideoMp4Descriptor {
|
||||
MEDIA_FILE_DIRECTORY
|
||||
}
|
||||
fn get_suffix(&self)->String {
|
||||
"mp4".to_string()
|
||||
".mp4".to_string()
|
||||
}
|
||||
|
||||
fn get_prefix(&self)->String {
|
||||
"video".to_string()
|
||||
"video_".to_string()
|
||||
}
|
||||
|
||||
fn is_public(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadVideoMp4Descriptor;
|
||||
impl FileDescriptor for UploadVideoMp4Descriptor {
|
||||
fn remote_directory_path(&self) -> &str {
|
||||
MEDIA_FILE_DIRECTORY
|
||||
}
|
||||
fn get_suffix(&self)->String {
|
||||
".mp4".to_string()
|
||||
}
|
||||
|
||||
fn get_prefix(&self)->String {
|
||||
"upload_".to_string()
|
||||
}
|
||||
|
||||
fn is_public(&self) -> bool {
|
||||
|
||||
+25
-13
@@ -27,32 +27,44 @@ impl RemoteCloudBucketDetails {
|
||||
&self.suffix
|
||||
}
|
||||
|
||||
// this is not really useful for downloads remove...
|
||||
pub fn file_descriptor_from_bucket_details(&self) -> Box<dyn FileDescriptor> {
|
||||
match self.prefix.as_str() {
|
||||
// Weights
|
||||
"loRA" => Box::new(weights_descriptor::WeightsLoRADescriptor {}),
|
||||
"sd15" => Box::new(weights_descriptor::WeightsSD15Descriptor {}),
|
||||
"sdxl" => Box::new(weights_descriptor::WeightsSDXLDescriptor {}),
|
||||
"valle_prompt" => Box::new(weights_descriptor::WeightsVallePromptDescriptor {}),
|
||||
"rvc" => {
|
||||
"loRA_" => Box::new(weights_descriptor::WeightsLoRADescriptor {}),
|
||||
"sd15_" =>
|
||||
match self.suffix.as_str() {
|
||||
"safetensors" => Box::new(weights_descriptor::WeightsRVCDescriptor {}),
|
||||
"index" => Box::new(weights_descriptor::WeightsRVCIndexDescriptor {}),
|
||||
".safetensors" => Box::new(weights_descriptor::WeightsSD15Descriptor {}),
|
||||
".ckpt" => Box::new(weights_descriptor::WeightsSD15CkptDescriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
},
|
||||
"sdxl_" => Box::new(weights_descriptor::WeightsSDXLDescriptor {}),
|
||||
"valle_prompt_" => Box::new(weights_descriptor::WeightsVallePromptDescriptor {}),
|
||||
"rvc_" => {
|
||||
match self.suffix.as_str() {
|
||||
".safetensors" => Box::new(weights_descriptor::WeightsRVCDescriptor {}),
|
||||
".index" => Box::new(weights_descriptor::WeightsRVCIndexDescriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
"svc" => Box::new(weights_descriptor::WeightsSVCDescriptor {}),
|
||||
"workflow" => Box::new(weights_descriptor::WeightsWorkflowDescriptor {}),
|
||||
"svc_" => Box::new(weights_descriptor::WeightsSVCDescriptor {}),
|
||||
"workflow_" => Box::new(weights_descriptor::WeightsWorkflowDescriptor {}),
|
||||
// Media
|
||||
"image" => {
|
||||
"image_" => {
|
||||
match self.suffix.as_str() {
|
||||
"png" => Box::new(media_descriptor::MediaImagePngDescriptor {}),
|
||||
".png" => Box::new(media_descriptor::MediaImagePngDescriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
"video" => {
|
||||
"video_" => {
|
||||
match self.suffix.as_str() {
|
||||
"mp4" => Box::new(media_descriptor::MediaVideoMp4Descriptor {}),
|
||||
".mp4" => Box::new(media_descriptor::MediaVideoMp4Descriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
"upload_" => {
|
||||
match self.suffix.as_str() {
|
||||
".mp4" => Box::new(media_descriptor::UploadVideoMp4Descriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
|
||||
+16
-7
@@ -1,4 +1,5 @@
|
||||
use anyhow::anyhow;
|
||||
use buckets::public::media_files::bucket_file_path::MediaFileBucketPath;
|
||||
|
||||
use errors::AnyhowResult;
|
||||
use filesys::file_read_bytes::file_read_bytes;
|
||||
@@ -38,7 +39,7 @@ impl RemoteCloudFileClient {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Where the to_system_file_path is let sd_checkpoint_path = work_temp_dir.path().join("sd_checkpoint.safetensors"); path and file name and extension
|
||||
pub async fn download_file(&self, remote_cloud_bucket_details:RemoteCloudBucketDetails, to_system_file_path:String) -> AnyhowResult<()> {
|
||||
let file_descriptor = remote_cloud_bucket_details.file_descriptor_from_bucket_details();
|
||||
let file_bucket_directory = FileBucketDirectory::from_existing_bucket_details(remote_cloud_bucket_details);
|
||||
@@ -49,6 +50,14 @@ impl RemoteCloudFileClient {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn download_media_file(&self, media_file_path: &MediaFileBucketPath, to_system_file_path: String) -> AnyhowResult<()> {
|
||||
const IS_PUBLIC: bool = true; // NB: Media files are always public
|
||||
let full_remote_cloud_file_path = media_file_path.get_full_object_path_str().to_string();
|
||||
|
||||
self.bucket_orchestration_client.download_file_to_disk(full_remote_cloud_file_path, to_system_file_path, IS_PUBLIC).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// return error or success with meta data.
|
||||
pub async fn upload_file(&self, file_descriptor:Box<dyn FileDescriptor>, from_system_file_path:&str) -> AnyhowResult<FileMetaData> {
|
||||
|
||||
@@ -85,7 +94,7 @@ impl RemoteCloudFileClient {
|
||||
}
|
||||
|
||||
// Retrieve the metadata from the file
|
||||
fn get_file_meta_data(system_file_path:&str) -> AnyhowResult<FileMetaData> {
|
||||
pub fn get_file_meta_data(system_file_path:&str) -> AnyhowResult<FileMetaData> {
|
||||
let file_size_bytes = file_size(system_file_path.clone())?;
|
||||
let sha256_checksum = sha256_hash_file(system_file_path.clone())?;
|
||||
|
||||
@@ -153,11 +162,11 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn remote_file_manager_descriptor_test() {
|
||||
use super::*;
|
||||
let remote_cloud_bucket_details = RemoteCloudBucketDetails::new("object_hash".to_string(), "loRA".to_string(), "safetensors".to_string());
|
||||
let remote_cloud_bucket_details = RemoteCloudBucketDetails::new("object_hash".to_string(), "loRA_".to_string(), ".safetensors".to_string());
|
||||
let file_descriptor = remote_cloud_bucket_details.file_descriptor_from_bucket_details();
|
||||
|
||||
assert_eq!(file_descriptor.get_prefix(), "loRA");
|
||||
assert_eq!(file_descriptor.get_suffix(), "safetensors");
|
||||
assert_eq!(file_descriptor.get_prefix(), "loRA_");
|
||||
assert_eq!(file_descriptor.get_suffix(), ".safetensors");
|
||||
assert_eq!(file_descriptor.is_public(), true);
|
||||
|
||||
}
|
||||
@@ -178,8 +187,8 @@ mod tests {
|
||||
println!("begin upload from file_path: {:?}", file_path);
|
||||
let details = RemoteCloudBucketDetails {
|
||||
object_hash: String::from("123"),
|
||||
prefix: String::from("loRA"),
|
||||
suffix: String::from("safetensors")
|
||||
prefix: String::from("loRA_"),
|
||||
suffix: String::from(".safetensors")
|
||||
};
|
||||
let result = remote_cloud_file_manager.download_file(details,file_path.to_string()).await;
|
||||
|
||||
|
||||
+41
-17
@@ -10,13 +10,13 @@ impl FileDescriptor for WeightsLoRADescriptor {
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"safetensors".to_string()
|
||||
".safetensors".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, loRA, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"loRA".to_string()
|
||||
"loRA_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -35,13 +35,37 @@ impl FileDescriptor for WeightsSD15Descriptor {
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"safetensors".to_string()
|
||||
".safetensors".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"sd15".to_string()
|
||||
"sd15_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
fn is_public(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WeightsSD15CkptDescriptor;
|
||||
|
||||
impl FileDescriptor for WeightsSD15CkptDescriptor {
|
||||
fn remote_directory_path(&self) -> &str {
|
||||
REMOTE_FILE_DIRECTORY
|
||||
}
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
".ckpt".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"sd15_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -60,13 +84,13 @@ impl FileDescriptor for WeightsSDXLDescriptor {
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"safetensors".to_string()
|
||||
".safetensors".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"sdxl".to_string()
|
||||
"sdxl_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -84,13 +108,13 @@ impl FileDescriptor for crate::remote_file_manager::weights_descriptor::WeightsS
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"safetensors".to_string()
|
||||
".safetensors".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"svc".to_string()
|
||||
"svc_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -108,13 +132,13 @@ impl FileDescriptor for crate::remote_file_manager::weights_descriptor::WeightsR
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"pth".to_string()
|
||||
".pth".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"rvc".to_string()
|
||||
"rvc_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -132,13 +156,13 @@ impl FileDescriptor for crate::remote_file_manager::weights_descriptor::WeightsR
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"index".to_string()
|
||||
".index".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"rvc".to_string()
|
||||
"rvc_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -156,13 +180,13 @@ impl FileDescriptor for crate::remote_file_manager::weights_descriptor::WeightsV
|
||||
// this will be the type of file peroid is handled by the file formatter
|
||||
// e.g safetensors bin jpg
|
||||
fn get_suffix(&self)->String {
|
||||
"safetensors".to_string()
|
||||
".safetensors".to_string()
|
||||
}
|
||||
// This will be the prefix of the media type or the weights type.
|
||||
// name of the weights or the name of the media type
|
||||
// vall-e_prompt, SD15, sd15, sdxl when implmenting add to the end
|
||||
fn get_prefix(&self)->String {
|
||||
"valle_prompt".to_string()
|
||||
"valle_prompt_".to_string()
|
||||
}
|
||||
|
||||
// This will be ensure that the right bucket is picked
|
||||
@@ -179,14 +203,14 @@ impl FileDescriptor for WeightsWorkflowDescriptor {
|
||||
}
|
||||
|
||||
fn get_suffix(&self) -> String {
|
||||
"json".to_string()
|
||||
".json".to_string()
|
||||
}
|
||||
|
||||
fn get_prefix(&self) -> String {
|
||||
"workflow".to_string()
|
||||
"workflow_".to_string()
|
||||
}
|
||||
|
||||
fn is_public(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "thumbnail_generator"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.113"
|
||||
reqwest = "0.11.24"
|
||||
easyenv = { path = "../../easyenv" }
|
||||
log = "0.4.20"
|
||||
@@ -0,0 +1 @@
|
||||
pub mod task_client;
|
||||
@@ -0,0 +1 @@
|
||||
pub mod thumbnail_task;
|
||||
@@ -0,0 +1,155 @@
|
||||
use log::error;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ThumbnailTaskError {
|
||||
InvalidTask,
|
||||
RequestError,
|
||||
}
|
||||
|
||||
struct ThumbnailTask{
|
||||
bucket: String,
|
||||
path: String,
|
||||
source_mimetype: String,
|
||||
output_mimetype: String,
|
||||
output_extension: String,
|
||||
output_suffix: String,
|
||||
event_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ThumbnailTaskBuilder{
|
||||
bucket: Option<String>,
|
||||
path: Option<String>,
|
||||
source_mimetype: Option<String>,
|
||||
output_mimetype: Option<String>,
|
||||
output_extension: Option<String>,
|
||||
output_suffix: Option<String>,
|
||||
event_id: Option<String>,
|
||||
}
|
||||
|
||||
impl ThumbnailTaskBuilder {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
bucket: None,
|
||||
path: None,
|
||||
source_mimetype: None,
|
||||
output_mimetype: None,
|
||||
output_extension: None,
|
||||
output_suffix: None,
|
||||
event_id: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_bucket(&mut self, bucket: &str) -> &mut Self {
|
||||
self.bucket = Some(bucket.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_path(&mut self, path: &str) -> &mut Self {
|
||||
self.path = Some(path.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_source_mimetype(&mut self, source_mimetype: &str) -> &mut Self {
|
||||
self.source_mimetype = Some(source_mimetype.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_output_mimetype(&mut self, output_mimetype: &str) -> &mut Self {
|
||||
self.output_mimetype = Some(output_mimetype.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_output_extension(&mut self, output_extension: &str) -> &mut Self {
|
||||
self.output_extension = Some(output_extension.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_output_suffix(&mut self, output_suffix: &str) -> &mut Self {
|
||||
self.output_suffix = Some(output_suffix.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_event_id(&mut self, event_id: &str) -> &mut Self {
|
||||
self.event_id = Some(event_id.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
fn build(&self) -> Result<ThumbnailTask, String> {
|
||||
Ok(ThumbnailTask {
|
||||
bucket: self.bucket.clone().ok_or("bucket is required")?,
|
||||
path: self.path.clone().ok_or("path is required")?,
|
||||
source_mimetype: self.source_mimetype.clone().ok_or("source_mimetype is required")?,
|
||||
output_mimetype: self.output_mimetype.clone().ok_or("output_mimetype is required")?,
|
||||
output_extension: self.output_extension.clone().ok_or("output_extension is required")?,
|
||||
output_suffix: self.output_suffix.clone().unwrap_or("".to_string()),
|
||||
event_id: self.event_id.clone().ok_or("event_id is required")?,
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn send(&self) -> Result<(), ThumbnailTaskError> {
|
||||
match self.build() {
|
||||
Ok(task) => {
|
||||
match task.send().await {
|
||||
Ok(_) => Ok(()),
|
||||
Err(_) => Err(ThumbnailTaskError::RequestError),
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
error!("Invalid thumbnail task: {:?}", self);
|
||||
Err(ThumbnailTaskError::InvalidTask)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ThumbnailTask{
|
||||
fn request_json(&self) -> Value {
|
||||
let output_path = format!(
|
||||
"{}-{}.{}",
|
||||
self.path,
|
||||
self.output_suffix,
|
||||
self.output_extension);
|
||||
|
||||
let input = json!({
|
||||
"bucket": self.bucket,
|
||||
"path": self.path,
|
||||
"type": self.source_mimetype,
|
||||
});
|
||||
|
||||
let output = json!({
|
||||
"bucket": self.bucket,
|
||||
"path": output_path,
|
||||
"type": self.output_mimetype,
|
||||
});
|
||||
|
||||
// TODO@madhukar: add tags -> metadata for gcs objects
|
||||
let tags = json!([]);
|
||||
|
||||
json!({
|
||||
"event_id": self.event_id,
|
||||
"input": input,
|
||||
"output": output,
|
||||
"tags": tags,
|
||||
})
|
||||
}
|
||||
|
||||
async fn send(&self) -> Result<(), reqwest::Error> {
|
||||
// TODO: retries?
|
||||
// TODO: move to config
|
||||
let url = easyenv::get_env_string_or_default(
|
||||
"THUMBNAIL_GENERATOR_API_URL",
|
||||
"http://media-server.thumbnail-generator/tasks",
|
||||
);
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let task_json = self.request_json();
|
||||
client.post(url)
|
||||
.json(&task_json)
|
||||
.send()
|
||||
.await?
|
||||
.error_for_status()?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -20,4 +20,5 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
pub mod multiple_random_from_vec;
|
||||
pub mod random_from_array;
|
||||
pub mod random_from_vec;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
use rand::prelude::SliceRandom;
|
||||
|
||||
/// Return a random item from a array.
|
||||
pub fn random_from_array<T>(array: &[T]) -> Option<&T> {
|
||||
array.choose(&mut rand::thread_rng())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::random_from_array::random_from_array;
|
||||
|
||||
#[test]
|
||||
fn pulls_item_from_array() {
|
||||
let items: [&str; 3] = ["one", "two", "three"];
|
||||
let selected = random_from_array(&items).unwrap();
|
||||
assert!(items.contains(selected));
|
||||
|
||||
let items : [String; 3] = ["one".to_string(), "two".to_string(), "three".to_string()];
|
||||
|
||||
let selected = random_from_array(&items).unwrap();
|
||||
assert!(items.contains(selected));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn behavior_on_empty() {
|
||||
let items : [String; 0] = [];
|
||||
let selected = random_from_array(&items);
|
||||
assert!(selected.is_none());
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,10 @@ pub enum EnvError {
|
||||
reason: String
|
||||
},
|
||||
/// The required environment variable wasn't present.
|
||||
RequiredNotPresent,
|
||||
RequiredNotPresent {
|
||||
/// The name of the missing environment variable.
|
||||
name: String
|
||||
},
|
||||
}
|
||||
|
||||
impl Display for EnvError {
|
||||
@@ -21,7 +24,19 @@ impl Display for EnvError {
|
||||
let reason = match self {
|
||||
EnvError::NotUnicode => "EnvError::NotUnicode",
|
||||
EnvError::ParseError { .. } => "EnvError::ParseError",
|
||||
EnvError::RequiredNotPresent => "EnvError::RequiredNotPresent",
|
||||
EnvError::RequiredNotPresent { name } =>
|
||||
return write!(f, r#"
|
||||
EnvError::RequiredNotPresent: the following environment variable was not present:
|
||||
|
||||
---> {:?}
|
||||
|
||||
In development, setting it in the environment config files: .env, .env-secrets,
|
||||
cargo/service/../{{app_name}}/config/{{app_name}}.development.env, etc.
|
||||
|
||||
If it looks like it might be a secret, ask for help in our company Discord.
|
||||
|
||||
In production, make sure these environment variables are set in Kubernetes.
|
||||
"#, name),
|
||||
};
|
||||
write!(f, "{:?}", reason)
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ pub fn get_env_bool_required(env_name: &str) -> Result<bool, EnvError> {
|
||||
.and_then(|maybe| match maybe {
|
||||
None => {
|
||||
warn!("Env var '{}' not supplied.", env_name);
|
||||
Err(EnvError::RequiredNotPresent)
|
||||
Err(EnvError::RequiredNotPresent { name: env_name.to_string() })
|
||||
},
|
||||
Some(val) => Ok(val),
|
||||
})
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn get_env_duration_seconds_required(env_name: &str) -> Result<Duration, Env
|
||||
.and_then(|maybe| match maybe {
|
||||
None => {
|
||||
warn!("Env var '{}' not supplied.", env_name);
|
||||
Err(EnvError::RequiredNotPresent)
|
||||
Err(EnvError::RequiredNotPresent { name: env_name.to_string() })
|
||||
},
|
||||
Some(val) => Ok(val),
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@ pub fn get_env_pathbuf_required(env_name: &str) -> Result<PathBuf, EnvError> {
|
||||
.and_then(|maybe| match maybe {
|
||||
None => {
|
||||
warn!("Env var '{}' not supplied.", env_name);
|
||||
Err(EnvError::RequiredNotPresent)
|
||||
Err(EnvError::RequiredNotPresent { name: env_name.to_string() })
|
||||
},
|
||||
Some(val) => Ok(val),
|
||||
})
|
||||
|
||||
@@ -32,7 +32,7 @@ pub fn get_env_string_required(env_name: &str) -> Result<String, EnvError> {
|
||||
Some(s) => Ok(s.to_string()),
|
||||
None => {
|
||||
warn!("Required env var '{}' not supplied.", env_name);
|
||||
Err(EnvError::RequiredNotPresent)
|
||||
Err(EnvError::RequiredNotPresent { name: env_name.to_string() })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,9 @@ pub struct ModelWeightDocument {
|
||||
pub updated_at: DateTime<Utc>,
|
||||
pub user_deleted_at: Option<DateTime<Utc>>,
|
||||
pub mod_deleted_at: Option<DateTime<Utc>>,
|
||||
|
||||
/// Calculated as "either user or mod deleted"
|
||||
pub is_deleted: bool,
|
||||
}
|
||||
|
||||
impl Document for ModelWeightDocument {
|
||||
|
||||
@@ -123,6 +123,7 @@ pub async fn search_model_weights(
|
||||
let search_response = client
|
||||
.search(SearchParts::Index(&[MODEL_WEIGHT_INDEX]))
|
||||
.body(search_json)
|
||||
.size(30)
|
||||
.allow_no_indices(true)
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
+17
-8
@@ -55,9 +55,13 @@ pub enum InferenceCategoryAbbreviated {
|
||||
#[serde(alias = "workflow")]
|
||||
Workflow,
|
||||
|
||||
#[serde(rename = "fg")] // NB: DO NOT CHANGE. It could break live jobs. Renamed to be fewer bytes.
|
||||
#[serde(alias = "convert_fbx_gltf")]
|
||||
ConvertFbxToGltf,
|
||||
#[serde(rename = "fc")] // NB: DO NOT CHANGE. It could break live jobs. Renamed to be fewer bytes.
|
||||
#[serde(alias = "format_conversion")]
|
||||
FormatConversion,
|
||||
|
||||
#[serde(rename = "bw")] // NB: DO NOT CHANGE. It could break live jobs. Renamed to be fewer bytes.
|
||||
#[serde(alias = "convert_bvh_to_workflow")]
|
||||
ConvertBvhToWorkflow,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, Debug)]
|
||||
@@ -142,7 +146,8 @@ impl InferenceCategoryAbbreviated {
|
||||
InferenceCategory::ImageGeneration => Self::ImageGeneration,
|
||||
InferenceCategory::Mocap => Self::Mocap,
|
||||
InferenceCategory::Workflow => Self::Workflow,
|
||||
InferenceCategory::ConvertFbxToGltf => Self::ConvertFbxToGltf,
|
||||
InferenceCategory::FormatConversion => Self::FormatConversion,
|
||||
InferenceCategory::ConvertBvhToWorkflow => Self::ConvertBvhToWorkflow,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +160,8 @@ impl InferenceCategoryAbbreviated {
|
||||
Self::ImageGeneration =>InferenceCategory::ImageGeneration,
|
||||
Self::Mocap => InferenceCategory::Mocap,
|
||||
Self::Workflow => InferenceCategory::Workflow,
|
||||
Self::ConvertFbxToGltf => InferenceCategory::ConvertFbxToGltf,
|
||||
Self::FormatConversion => InferenceCategory::FormatConversion,
|
||||
Self::ConvertBvhToWorkflow => InferenceCategory::ConvertBvhToWorkflow,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,6 +236,8 @@ mod tests {
|
||||
let lora_upload_path = "lora_upload_path".to_string();
|
||||
let checkpoint = "checkpoint".to_string();
|
||||
let type_of_inference = "type_of_inference".to_string();
|
||||
let version: u32 = 0;
|
||||
|
||||
let args = GenericInferenceArgs {
|
||||
inference_category: Some(InferenceCategoryAbbreviated::ImageGeneration),
|
||||
args: Some(PolymorphicInferenceArgs::Ig(StableDiffusionArgs {
|
||||
@@ -247,13 +255,14 @@ mod tests {
|
||||
maybe_upload_path: Some(upload_path),
|
||||
maybe_lora_upload_path: Some(lora_upload_path),
|
||||
type_of_inference,
|
||||
description: Some("Option".to_string()),
|
||||
name: Some("Model Name".to_string())
|
||||
maybe_description: Some("Option".to_string()),
|
||||
maybe_name: Some("Model Name".to_string()),
|
||||
maybe_version: Some(version),
|
||||
})),
|
||||
};
|
||||
|
||||
let json = serde_json::ser::to_string(&args).unwrap();
|
||||
assert_eq!(json, r#"{"cat":"ig","args":{"Ig":{"sd":"sd_model_token","lm":"lora_model_token","w":512,"h":512,"s":"sampler","p":"prompt","np":"n_prompt","se":1,"mu":"upload_path","cf":7,"lu":"lora_upload_path","sa":25,"bc":1,"t":"type_of_inference","de":"Option","na":"Model Name"}}}"#.to_string());
|
||||
assert_eq!(json, r#"{"cat":"ig","args":{"Ig":{"sd":"sd_model_token","lm":"lora_model_token","w":512,"h":512,"s":"sampler","p":"prompt","np":"n_prompt","se":1,"mu":"upload_path","cf":7,"lu":"lora_upload_path","sa":25,"bc":1,"t":"type_of_inference","de":"Option","na":"Model Name","ve":0}}}"#.to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
+11
-7
@@ -31,11 +31,11 @@ pub struct StableDiffusionArgs {
|
||||
|
||||
#[serde(rename = "w")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_width: Option<i32>,
|
||||
pub maybe_width: Option<u32>,
|
||||
|
||||
#[serde(rename = "h")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_height: Option<i32>,
|
||||
pub maybe_height: Option<u32>,
|
||||
|
||||
#[serde(rename = "s")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -59,7 +59,7 @@ pub struct StableDiffusionArgs {
|
||||
|
||||
#[serde(rename = "cf")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_cfg_scale: Option<i32>,
|
||||
pub maybe_cfg_scale: Option<u32>,
|
||||
|
||||
#[serde(rename = "lu")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -67,10 +67,10 @@ pub struct StableDiffusionArgs {
|
||||
|
||||
#[serde(rename = "sa")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_number_of_samples: Option<i32>,
|
||||
pub maybe_number_of_samples: Option<u32>,
|
||||
|
||||
#[serde(rename = "bc")]
|
||||
pub maybe_batch_count: Option<i32>,
|
||||
pub maybe_batch_count: Option<u32>,
|
||||
|
||||
#[serde(rename = "t")]
|
||||
pub type_of_inference: String,
|
||||
@@ -78,11 +78,15 @@ pub struct StableDiffusionArgs {
|
||||
// loRA / checkpoint description
|
||||
#[serde(rename = "de")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
pub maybe_description: Option<String>,
|
||||
// loRA / checkpoint name and description
|
||||
#[serde(rename = "na")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>
|
||||
pub maybe_name: Option<String>,
|
||||
|
||||
#[serde(rename = "ve")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_version: Option<u32>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::tokens::model_weights::ModelWeightToken;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
@@ -27,4 +28,17 @@ pub struct WorkflowArgs {
|
||||
#[serde(rename = "json_modifications")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_json_modifications: Option<HashMap<String, NewValue>>,
|
||||
|
||||
#[serde(rename = "in")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_input_file: Option<MediaFileToken>,
|
||||
|
||||
#[serde(rename = "out")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_output_path: Option<String>,
|
||||
|
||||
// google drive link for uploads
|
||||
#[serde(rename = "gd")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub maybe_google_drive_link: Option<String>
|
||||
}
|
||||
|
||||
+7
-1
@@ -13,6 +13,7 @@ pub struct BatchEntry {
|
||||
|
||||
pub struct InsertBatchArgs<'a, 'b> {
|
||||
pub entries: Vec<BatchGenerationEntity>,
|
||||
pub maybe_existing_batch_token: Option<&'a BatchGenerationToken>,
|
||||
pub transaction: &'a mut Transaction<'b, MySql>,
|
||||
}
|
||||
|
||||
@@ -21,7 +22,11 @@ pub struct InsertBatchArgs<'a, 'b> {
|
||||
///
|
||||
/// NB: Calling code is responsible for rolling back the transaction if this fails.
|
||||
pub async fn insert_batch_generation_records<'a, 'b>(args: InsertBatchArgs<'a, 'b>) -> AnyhowResult<BatchGenerationToken> {
|
||||
let batch_token = BatchGenerationToken::generate();
|
||||
|
||||
let batch_token = match args.maybe_existing_batch_token {
|
||||
Some(existing_token) => existing_token.clone(),
|
||||
None => BatchGenerationToken::generate(),
|
||||
};
|
||||
|
||||
let mut query_builder = QueryBuilder::new(r#"
|
||||
INSERT INTO batch_generations (token, entity_type, entity_token) VALUES
|
||||
@@ -91,6 +96,7 @@ mod tests {
|
||||
|
||||
let r = insert_batch_generation_records(InsertBatchArgs {
|
||||
entries,
|
||||
maybe_existing_batch_token: None,
|
||||
transaction: &mut transaction,
|
||||
}).await;
|
||||
|
||||
|
||||
+10
@@ -10,6 +10,7 @@ use enums::common::job_status_plus::JobStatusPlus;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::generic_inference_jobs::InferenceJobToken;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
|
||||
use crate::helpers::boolean_converters::i8_to_bool;
|
||||
use crate::payloads::generic_inference_args::generic_inference_args::GenericInferenceArgs;
|
||||
@@ -36,6 +37,9 @@ pub struct AvailableInferenceJob {
|
||||
pub maybe_inference_args: Option<GenericInferenceArgs>,
|
||||
pub maybe_raw_inference_text: Option<String>,
|
||||
|
||||
// For model uploads, a possible cover image
|
||||
pub maybe_cover_image_media_file_token: Option<MediaFileToken>,
|
||||
|
||||
// User information to propagate downstream
|
||||
pub maybe_creator_user_token: Option<String>,
|
||||
pub maybe_creator_anonymous_visitor_token: Option<String>,
|
||||
@@ -105,6 +109,8 @@ pub async fn list_available_generic_inference_jobs(
|
||||
creator_ip_address: record.creator_ip_address,
|
||||
maybe_creator_user_token: record.maybe_creator_user_token,
|
||||
maybe_creator_anonymous_visitor_token: record.maybe_creator_anonymous_visitor_token,
|
||||
maybe_cover_image_media_file_token: record.maybe_cover_image_media_file_token
|
||||
.map(|s| MediaFileToken::new_from_str(&s)),
|
||||
creator_set_visibility: Visibility::from_str(&record.creator_set_visibility)
|
||||
.map_err(|e| anyhow!("error: {:?}", e))?, // TODO/FIXME: This is a gross fix.
|
||||
inference_category: InferenceCategory::from_str(&record.inference_category)
|
||||
@@ -195,6 +201,8 @@ SELECT
|
||||
maybe_model_type,
|
||||
maybe_model_token,
|
||||
|
||||
maybe_cover_image_media_file_token,
|
||||
|
||||
maybe_input_source_token,
|
||||
maybe_input_source_token_type,
|
||||
|
||||
@@ -288,6 +296,8 @@ struct AvailableInferenceJobRawInternal {
|
||||
pub maybe_inference_args: Option<String>,
|
||||
pub maybe_raw_inference_text: Option<String>,
|
||||
|
||||
pub maybe_cover_image_media_file_token: Option<String>,
|
||||
|
||||
// User information to propagate downstream
|
||||
pub maybe_creator_user_token: Option<String>,
|
||||
pub maybe_creator_anonymous_visitor_token: Option<String>,
|
||||
|
||||
+24
-11
@@ -121,6 +121,7 @@ SELECT
|
||||
jobs.on_success_result_entity_type as maybe_result_entity_type,
|
||||
jobs.on_success_result_entity_token as maybe_result_entity_token,
|
||||
|
||||
model_weights.title as maybe_model_weights_title,
|
||||
tts_models.title as maybe_tts_model_title,
|
||||
voice_conversion_models.title as maybe_voice_conversion_model_title,
|
||||
|
||||
@@ -144,6 +145,7 @@ SELECT
|
||||
|
||||
FROM generic_inference_jobs as jobs
|
||||
|
||||
LEFT OUTER JOIN model_weights ON jobs.maybe_model_token = model_weights.token
|
||||
LEFT OUTER JOIN tts_models ON jobs.maybe_model_token = tts_models.token
|
||||
LEFT OUTER JOIN voice_conversion_models ON jobs.maybe_model_token = voice_conversion_models.token
|
||||
|
||||
@@ -174,16 +176,25 @@ WHERE jobs.token = ?
|
||||
|
||||
/// Map the internal record type (since we query over several result tables)
|
||||
fn raw_record_to_public_result(record: RawGenericInferenceJobStatus) -> GenericInferenceJobStatus {
|
||||
let maybe_model_title = match record.inference_category {
|
||||
InferenceCategory::LipsyncAnimation => Some("lipsync animation"),
|
||||
InferenceCategory::TextToSpeech => record.maybe_tts_model_title.as_deref(),
|
||||
InferenceCategory::VoiceConversion => record.maybe_voice_conversion_model_title.as_deref(),
|
||||
InferenceCategory::VideoFilter => Some("Video Filter"),
|
||||
InferenceCategory::ImageGeneration => Some("Image Generation"),
|
||||
InferenceCategory::Mocap => Some("Mocap"),
|
||||
InferenceCategory::Workflow => Some("Workflow"),
|
||||
InferenceCategory::ConvertFbxToGltf => Some("FBX to GLTF"),
|
||||
};
|
||||
let mut maybe_model_title = None;
|
||||
|
||||
if let Some(title) = record.maybe_model_weights_title.as_deref() {
|
||||
maybe_model_title = Some(title);
|
||||
}
|
||||
|
||||
if maybe_model_title.is_none() {
|
||||
maybe_model_title = match record.inference_category {
|
||||
InferenceCategory::LipsyncAnimation => Some("lipsync animation"),
|
||||
InferenceCategory::TextToSpeech => record.maybe_tts_model_title.as_deref(),
|
||||
InferenceCategory::VoiceConversion => record.maybe_voice_conversion_model_title.as_deref(),
|
||||
InferenceCategory::VideoFilter => Some("Video Filter"),
|
||||
InferenceCategory::ImageGeneration => Some("Image Generation"),
|
||||
InferenceCategory::Mocap => Some("Mocap"),
|
||||
InferenceCategory::Workflow => Some("Workflow"),
|
||||
InferenceCategory::FormatConversion => Some("format conversion"),
|
||||
InferenceCategory::ConvertBvhToWorkflow => Some("BVH to Workflow"),
|
||||
};
|
||||
}
|
||||
|
||||
// NB: A bit of a hack. We store TTS results with a full path.
|
||||
// Going forward, all other record types will store a hash.
|
||||
@@ -195,7 +206,8 @@ fn raw_record_to_public_result(record: RawGenericInferenceJobStatus) -> GenericI
|
||||
InferenceCategory::ImageGeneration => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
InferenceCategory::Mocap => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
InferenceCategory::Workflow => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
InferenceCategory::ConvertFbxToGltf => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
InferenceCategory::FormatConversion => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
InferenceCategory::ConvertBvhToWorkflow => (true, record.maybe_media_file_public_bucket_directory_hash.as_deref()),
|
||||
};
|
||||
|
||||
// NB: We've moved voice conversion out of their own table and into media_files
|
||||
@@ -275,6 +287,7 @@ struct RawGenericInferenceJobStatus {
|
||||
pub maybe_result_entity_type: Option<String>,
|
||||
pub maybe_result_entity_token: Option<String>,
|
||||
|
||||
pub maybe_model_weights_title: Option<String>,
|
||||
pub maybe_tts_model_title: Option<String>,
|
||||
pub maybe_voice_conversion_model_title: Option<String>,
|
||||
|
||||
|
||||
+26
@@ -3,11 +3,13 @@ use sqlx::MySqlPool;
|
||||
|
||||
use enums::by_table::generic_inference_jobs::inference_category::InferenceCategory;
|
||||
use enums::by_table::generic_inference_jobs::inference_input_source_token_type::InferenceInputSourceTokenType;
|
||||
use enums::by_table::generic_inference_jobs::inference_job_type::InferenceJobType;
|
||||
use enums::by_table::generic_inference_jobs::inference_model_type::InferenceModelType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken;
|
||||
use tokens::tokens::generic_inference_jobs::InferenceJobToken;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
use tokens::tokens::users::UserToken;
|
||||
|
||||
use crate::payloads::generic_inference_args::generic_inference_args::GenericInferenceArgs;
|
||||
@@ -15,6 +17,11 @@ use crate::payloads::generic_inference_args::generic_inference_args::GenericInfe
|
||||
pub struct InsertGenericInferenceArgs<'a> {
|
||||
pub uuid_idempotency_token: &'a str,
|
||||
|
||||
// NB: This will eventually take the place of "inference category" and "maybe model type", since the latter two are
|
||||
// used entirely inconsistently for job dispatching (especially "inference category"). This should always be 1:1 with
|
||||
// a concrete job type.
|
||||
pub job_type: InferenceJobType,
|
||||
|
||||
pub inference_category: InferenceCategory,
|
||||
pub maybe_model_type: Option<InferenceModelType>,
|
||||
pub maybe_model_token: Option<&'a str>,
|
||||
@@ -22,6 +29,15 @@ pub struct InsertGenericInferenceArgs<'a> {
|
||||
pub maybe_input_source_token: Option<&'a str>,
|
||||
pub maybe_input_source_token_type: Option<InferenceInputSourceTokenType>,
|
||||
|
||||
// For jobs that perform "downloads", this is the URL to download.
|
||||
// NB: Some jobs aren't using this field yet and will pack the URL inside of
|
||||
// the "GenericInferenceArgs" field. The goal is to migrate them to this
|
||||
// top-level field eventually.
|
||||
pub maybe_download_url: Option<&'a str>,
|
||||
|
||||
// For jobs that perform "downloads", this is a possible cover image for the new model.
|
||||
pub maybe_cover_image_media_file_token: Option<&'a MediaFileToken>,
|
||||
|
||||
pub maybe_raw_inference_text: Option<&'a str>,
|
||||
|
||||
pub maybe_max_duration_seconds: Option<i32>,
|
||||
@@ -68,6 +84,8 @@ SET
|
||||
token = ?,
|
||||
uuid_idempotency_token = ?,
|
||||
|
||||
job_type = ?,
|
||||
|
||||
inference_category = ?,
|
||||
maybe_model_type = ?,
|
||||
maybe_model_token = ?,
|
||||
@@ -75,6 +93,9 @@ SET
|
||||
maybe_input_source_token = ?,
|
||||
maybe_input_source_token_type = ?,
|
||||
|
||||
maybe_download_url = ?,
|
||||
maybe_cover_image_media_file_token = ?,
|
||||
|
||||
maybe_raw_inference_text = ?,
|
||||
|
||||
maybe_inference_args = ?,
|
||||
@@ -97,6 +118,8 @@ SET
|
||||
job_token.as_str(),
|
||||
args.uuid_idempotency_token,
|
||||
|
||||
args.job_type.to_str(),
|
||||
|
||||
args.inference_category.to_str(),
|
||||
|
||||
args.maybe_model_type.map(|t| t.to_str()),
|
||||
@@ -105,6 +128,9 @@ SET
|
||||
args.maybe_input_source_token,
|
||||
args.maybe_input_source_token_type,
|
||||
|
||||
args.maybe_download_url,
|
||||
args.maybe_cover_image_media_file_token.map(|t| t.as_str()),
|
||||
|
||||
args.maybe_raw_inference_text,
|
||||
|
||||
serialized_args_payload,
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
use anyhow::anyhow;
|
||||
use log::error;
|
||||
use sqlx::{Executor, MySql};
|
||||
use sqlx::Error::Database;
|
||||
|
||||
use errors::AnyhowResult;
|
||||
|
||||
/// Insert an idempotency token (typically a UUID generated by the frontend) to make sure the
|
||||
/// frontend doesn't retry the same request by mistake. There's a unique index on idempotency
|
||||
/// tokens, so any retries with the same value will fail.
|
||||
pub async fn insert_idempotency_token<'e, 'c, E>(
|
||||
idempotency_token: &'e str,
|
||||
mysql_executor: E,
|
||||
) -> AnyhowResult<()>
|
||||
where E: 'e + Executor<'c, Database=MySql>
|
||||
{
|
||||
let query = sqlx::query!(
|
||||
r#"INSERT INTO idempotency_tokens SET idempotency_value = ?"#,
|
||||
idempotency_token);
|
||||
|
||||
let query_result = query.execute(mysql_executor).await;
|
||||
|
||||
match query_result {
|
||||
Ok(_res) => Ok(()),
|
||||
Err(err) => {
|
||||
error!("error inserting idempotency token: {:?}", err);
|
||||
// NB: SQLSTATE[23000]: Integrity constraint violation
|
||||
// NB: MySQL Error Code 1062: Duplicate key insertion (this is harder to access)
|
||||
match err {
|
||||
Database(ref err) => {
|
||||
let _maybe_code = err.code().map(|c| c.into_owned());
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
Err(anyhow!("error inserting idempotency token: {:?}", err))
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user