Compare commits

...
Author SHA1 Message Date
Brandon Thomas ad5fdc5c8c Framerate on video files 2024-02-26 16:02:18 -05:00
Brandon Thomas 9476589fc0 reorganize (about to add more handlers) 2024-02-26 01:30:04 -05:00
Brandon Thomas 00102793dc comma-separated query param for media type selector 2024-02-26 01:02:41 -05:00
salt 9a7d369828 remove redundant check 2024-02-25 21:58:08 -08:00
salt c932b26b29 new comfyUI dependency 2024-02-25 16:32:41 -08:00
Brandon Thomas 3b13603f1f scope user media files by *multiple* types 2024-02-25 18:02:36 -05:00
salt 6b054d3b37 download lora to correct folder 2024-02-24 23:20:54 -08:00
Brandon Thomas 55db590e73 rename package 2024-02-24 02:33:10 -05:00
Brandon Thomas 2dd02272f9 tool to soft delete anonymous user images
- We'll need to go back and clean up the buckets for some of these
- Some of these are probably just for face animator and could help with
  training a better face detection model
2024-02-24 02:26:25 -05:00
Brandon Thomas 6c6debe64b additional safety features 2024-02-24 00:35:26 -05:00
Brandon Thomas 814209949e fix storyteller engine cors 2024-02-23 22:21:39 -05:00
Brandon Thomas 4fbb8ef335 fix endpoint 2024-02-23 00:16:25 -05:00
Brandon Thomas 25b512c7d8 codegen db 2024-02-22 23:54:43 -05:00
Brandon Thomas d3ae68dc14 get prompt API 2024-02-22 23:53:02 -05:00
Brandon Thomas 203ae33adb actually, we don't need that table anymore 2024-02-22 23:12:08 -05:00
Brandon Thomas d543ac3a33 forgot to commit the transaction 🤦 2024-02-22 23:10:37 -05:00
Brandon Thomas cd132b694c codegen 2024-02-22 21:37:42 -05:00
Brandon Thomas be7315b28d insert prompt records in SD inference job 2024-02-22 21:36:43 -05:00
Brandon Thomas 14fbb2e29c Queries for insert and get prompt 2024-02-22 19:37:49 -05:00
Brandon Thomas ef2f827fed add extra localhost port to cors (storyteller studio) 2024-02-22 18:29:40 -05:00
Brandon Thomas 172de887b7 squashed migrations for docs 2024-02-22 18:15:22 -05:00
Brandon Thomas 896fae0ef5 Bevy-specific "create scene" upload endpoint 2024-02-22 16:58:30 -05:00
salt 7cad80ad05 dont crash if workflow doesnt exist 2024-02-22 13:31:07 -08:00
Brandon Thomas e1fd39d003 fix lints 2024-02-22 04:57:00 -05:00
Brandon Thomas ea3df73e0f prompt token in media_files, enums, tokens 2024-02-22 04:21:26 -05:00
ArEnSc 8b3c139704 Merge pull request #307 from storytold/feature/properties-prompt
Adding properties to prompts
2024-02-22 02:35:40 -05:00
Brandon Thomas a1c01a2f3c new tables for usages and prompts 2024-02-21 22:54:07 -05:00
arensc 29a137e4fe Adding properties to prompts 2024-02-21 20:40:48 -05:00
Brandon Thomas b8270b0235 fix lints 2024-02-21 17:48:14 -05:00
Brandon Thomas 7dbae4c166 fix build error 2024-02-21 17:30:47 -05:00
Brandon Thomas 170c0afef5 analytics query 2024-02-21 17:24:06 -05:00
saltacc 4af67113b2 Merge pull request #306 from storytold/feature/upload-workflow
Feature/upload workflow
2024-02-21 14:07:22 -08:00
salt 0cb11fbf7e move route 2024-02-21 14:06:53 -08:00
salt 83b21f8965 fix errors 2024-02-21 13:29:09 -08:00
arensc dc139a6199 renamed a function 2024-02-21 14:21:58 -05:00
Brandon Thomas c6555b88d5 one or two more terms 2024-02-21 05:14:32 -05:00
arensc c71a7de5be Ok download code should work 2024-02-21 03:08:42 -05:00
arensc 559a9e1f4d Ok builds now doing the actual download 2024-02-20 23:48:49 -05:00
Brandon Thomas ce4c9a1d42 doc 2024-02-20 23:36:04 -05:00
Brandon Thomas d85fe3fb3d CLI tool to delete users' files 2024-02-20 23:19:08 -05:00
Brandon Thomas d601164b5b rename two cli apps 2024-02-20 22:12:11 -05:00
Brandon Thomas 73b6b6585e refactor CLI tools 2024-02-20 22:10:18 -05:00
Brandon Thomas 368c216c07 rename CLI binary 2024-02-20 21:57:26 -05:00
Brandon Thomas d31eb74344 named number classifier 2024-02-20 21:46:35 -05:00
Brandon Thomas 2dab930226 additional test cases for italian 2024-02-20 21:40:08 -05:00
Brandon Thomas 9fc6e4adf6 split up tests 2024-02-20 21:28:23 -05:00
arensc ea8a911ba3 Need to save prompt now 2024-02-20 21:08:01 -05:00
arensc ce28899e4c Initial commit for storyteller web, going to work on inference job 2024-02-20 20:27:11 -05:00
Brandon Thomas 77c22336e6 codegen db 2024-02-20 20:27:09 -05:00
Brandon Thomas 4ae7e61b7e additional safety 2024-02-20 19:26:21 -05:00
Brandon Thomas 16a3f74105 "1girl" is a false positive and used frequently in safe contexts 2024-02-20 19:09:03 -05:00
Brandon Thomas 4ad90b31df stop racism too 2024-02-20 18:56:24 -05:00
Brandon Thomas 5cc90d1001 better classifier 2024-02-20 18:49:20 -05:00
Brandon Thomas c6a5f0694f spanish + tests 2024-02-20 18:43:12 -05:00
Brandon Thomas 688efffcb8 improve classifier 2024-02-20 18:37:01 -05:00
Brandon Thomas 767191871d improved filter 2024-02-20 18:28:21 -05:00
Brandon Thomas 7d963deb38 move text classification to own crate (about to build out more) 2024-02-20 16:14:47 -05:00
saltacc 501eb24cd8 Merge pull request #303 from storytold/feature/comfy-replication
save job args to file modification info
2024-02-20 08:32:51 -08:00
salt 07d8125de9 remove excess message 2024-02-20 07:42:27 -08:00
salt aa9e1c2fe4 new dependencies + download workflow from weight token 2024-02-20 07:41:05 -08:00
Kasisnu 3d64537e87 Merge pull request #305 from storytold/feb-19-mithoo
more labels on inference job metrics, thumbnails for face animator
2024-02-20 18:41:39 +05:30
Kasisnu 9c674b1579 send thumbnail task requests from face animator 2024-02-20 18:35:43 +05:30
Kasisnu c6c94cfe56 slightly better instrumentation w/labels 2024-02-20 18:35:41 +05:30
Brandon Thomas 835bbe35c6 generate 4 images in a batch minimum 2024-02-20 03:37:51 -05:00
Brandon Thomas 029e29bf9a last test cases for the night 2024-02-20 03:13:54 -05:00
Brandon Thomas 57956c8124 fix failing lints and tests 2024-02-20 02:44:43 -05:00
Brandon Thomas ea269459e6 more prompt tests 2024-02-20 01:49:03 -05:00
Brandon Thomas 716589f62c more safety + tests 2024-02-19 19:55:06 -05:00
Brandon Thomas 2d5188ba91 more dictionary terms and test cases 2024-02-19 19:37:03 -05:00
Brandon Thomas d5205e764e more prompt tests, better regex split 2024-02-19 18:54:13 -05:00
Brandon Thomas 3d8c01f8fe remove sex from non-sex prompts 2024-02-19 17:49:04 -05:00
Brandon Thomas f0a328c059 prompt engineering - replace bad prompts 2024-02-19 17:27:35 -05:00
Brandon Thomas c87b1ba20d filter more bad prompts 2024-02-19 12:55:01 -05:00
Kasisnu d8f8735eca Merge pull request #304 from storytold/feb-19-mithoo
add error handler for OTEL
2024-02-19 21:10:35 +05:30
Kasisnu a2098b52d1 add error handler for OTEL 2024-02-19 21:09:54 +05:30
Kasisnu b8ccb9f6e0 Merge pull request #302 from storytold/feb-16-mithoo
slightly tweakier instrumentation
2024-02-19 18:47:21 +05:30
Brandon Thomas 8dc3d29daf Block basic absuive SD prompts 2024-02-19 02:31:07 -05:00
Brandon Thomas 42dfa3aa51 don't require user account for sd inference 2024-02-18 23:12:00 -05:00
Brandon Thomas 9ca42b370e report sd queue stats 2024-02-18 03:46:48 -05:00
Brandon Thomas ef9cc7de72 codegen db 2024-02-18 03:21:27 -05:00
Brandon Thomas e7367bdfe7 return batch tokens in GET media file endpoint 2024-02-18 03:19:43 -05:00
Brandon Thomas 467d849121 list media files by batch token handler 2024-02-18 03:13:57 -05:00
Brandon Thomas e98091c406 Insert batch token in media_file records 2024-02-18 02:40:15 -05:00
Brandon Thomas c9c4fd59d9 stubs for engine persistence endpoints 2024-02-17 23:22:13 -05:00
salt 48b1f6306b save job args to file modification info 2024-02-17 06:21:51 -08:00
Brandon Thomas 98c087116b default to 3 images 2024-02-16 16:48:57 -05:00
Kasisnu f13458a4e7 slightly tweakier instrumentation 2024-02-16 14:38:35 +05:30
Kasisnu 9903a31530 Merge pull request #299 from storytold/integrate-thumbnails-comfyui
Integrate thumbnails for comfyui outputs
2024-02-16 12:53:02 +05:30
Kasisnu 130326e7de thumbnails builder for reuse 2024-02-16 12:51:54 +05:30
Brandon Thomas d7295d79a1 ES search size: 30 2024-02-15 23:12:26 -05:00
Brandon Thomas c00e0c59f3 fix cover image attachment 2024-02-15 22:45:20 -05:00
Brandon Thomas 3dc271bb84 accept cover image in API 2024-02-15 21:10:50 -05:00
Brandon Thomas 7bac45cad1 add migration for cover images in generic inference jobs (uploads) 2024-02-15 19:30:32 -05:00
Brandon Thomas 3cc0da13de transcripts on list endpoints 2024-02-15 10:39:33 -05:00
Brandon Thomas 1aa7914eee text transcripts on get media file 2024-02-15 10:29:08 -05:00
Brandon Thomas d4bda54911 Merge pull request #301 from storytold/feb-14-mithoo
bvh result type is video; mime type/extension is set correctly
2024-02-14 19:12:18 -05:00
Brandon Thomas 30cef2bc57 validate compositor http request 2024-02-14 18:52:45 -05:00
Brandon Thomas e462f0c08a Store download URL in top-level job info 2024-02-14 18:24:58 -05:00
Brandon Thomas 04c0e09d6f styletts include text transcript 2024-02-14 17:41:06 -05:00
Brandon Thomas 319a8f0ba8 add text transcripts to tts inference jobs 2024-02-14 17:34:04 -05:00
Brandon Thomas 4fa4a0a4e1 post-migration widening of file_size_bytes 2024-02-14 11:06:31 -05:00
Kasisnu 89099a4ef8 bvh result type is video; mime type/extension is set correctly 2024-02-14 15:57:32 +05:30
Brandon Thomas 53b2aedbb0 Five new schema migrations 2024-02-14 05:27:01 -05:00
Madhukar Mishra 5936ef87f4 fix - add gif to mimetype to ext 2024-02-14 12:15:35 +05:30
Brandon Thomas 00abb6230b inference status - get model_weights title 2024-02-13 20:48:15 -05:00
Brandon Thomas fa21d8251e document job status endpoints 2024-02-13 20:31:59 -05:00
Brandon Thomas 17b38a62cf add more staff accounts 2024-02-13 19:36:38 -05:00
Brandon Thomas 132230bbbe enums got mixed up. we should rename these 2024-02-13 15:30:53 -05:00
Madhukar Mishra be49dbd11e fix extension for thumbnail output 2024-02-13 23:21:33 +05:30
Kasisnu 1b97d638a8 Merge pull request #300 from storytold/feb-13-mithoo
return errors from conversion endpoints when media file isnt sent
2024-02-13 21:57:13 +05:30
Kasisnu bd653c70d8 return errors from conversion endpoints when media file isnt sent 2024-02-13 21:56:36 +05:30
Madhukar Mishra dc31723f63 fixup 2024-02-13 18:50:32 +05:30
Madhukar Mishra 6b03981ef9 generate thumbnails in comfyui workflow 2024-02-13 18:50:32 +05:30
Brandon Thomas d4a4ac4077 more users for the rollout 2024-02-12 12:34:51 -05:00
Brandon Thomas 32acf33eeb after sd job, return the first media file token 2024-02-12 05:19:14 -05:00
Brandon Thomas c9060d973f feature flag more endpoints; don't return certain results in user list 2024-02-12 04:38:56 -05:00
Brandon Thomas a64990230e cleanup sd enqueue endpoint, remove flag check 2024-02-12 04:23:49 -05:00
Brandon Thomas a3c6cc5b03 cache SD model weights in a cache directory 2024-02-11 07:19:41 -05:00
Brandon Thomas f16ca22110 log downloads 2024-02-10 17:10:33 -05:00
Brandon Thomas 5fa8bb93ce sensible default development configs (wip) 2024-02-10 16:53:08 -05:00
Brandon Thomas 91e8a51216 setup SD to use a predefined SD weight from our bucket 2024-02-10 16:47:21 -05:00
Brandon Thomas 7bd95d2078 split up sd job into three functions 2024-02-10 16:39:56 -05:00
Brandon Thomas e0f141fa74 enable michael's account 2024-02-10 16:14:45 -05:00
Brandon Thomas 029798e665 codegen db - field widened? 2024-02-09 22:48:36 -05:00
Brandon Thomas 850e1b3c10 add UserDetailsLight + avatar to /v1/session endpoint + schema docs 2024-02-09 22:43:28 -05:00
Brandon Thomas e1ea2cdf67 format api annotations 2024-02-09 22:02:43 -05:00
Brandon Thomas 74ed7f365b UserDetailsLight refactor - consolidate, fix bug, get ready for reuse 2024-02-09 21:44:13 -05:00
Brandon Thomas e327a8648c simplify cli tool args 2024-02-09 01:04:15 -05:00
Kasisnu 88c68ccf9b Merge pull request #293 from storytold/jan-31-mithoo
scaffold for bvh -> workflow job
2024-02-09 00:06:05 +05:30
Kasisnu 2e5fdd91d3 scaffold for bvh -> workflow job 2024-02-08 23:46:22 +05:30
Brandon Thomas 44135d8d10 enroll users in studio 2024-02-07 22:27:03 -05:00
Brandon Thomas 0d7afb10c2 codegen queries 2024-02-07 00:42:48 -05:00
Brandon Thomas dd76a6fea1 flag to session endpoint 2024-02-06 23:41:26 -05:00
Brandon Thomas 1886f40a9b handle flag check for dynamic user session types 2024-02-06 23:30:05 -05:00
Brandon Thomas f54ddb0acb feature flag off certain endpoints 2024-02-06 23:20:14 -05:00
Brandon Thomas a7b5cc9fc3 add is_deleted flag to es 2024-02-06 23:20:14 -05:00
Brandon Thomas 0e24e38576 rollout column for studio access 2024-02-06 23:20:14 -05:00
Kasisnu 6bc6bf0c24 Merge pull request #271 from storytold/otel-instrumentation
Otel instrumentation - first pass
2024-02-06 09:58:59 +05:30
ArEnSc fb2b5c9735 Merge pull request #297 from storytold/feature/downloader_fix
made extension and suffix changes.
2024-02-05 21:13:23 -05:00
ArEnSc 3d04302de1 Ok tested seems like the data is added correctly. 2024-02-05 21:09:05 -05:00
ArEnSc 7e169e3b51 Testing 2024-02-05 20:45:07 -05:00
ArEnSc 5ba8d876f0 made extension and suggix changes. 2024-02-05 18:51:09 -05:00
Kasisnu 44845ad54e otel: some stats we were already logging to stdout 2024-02-05 20:59:40 +05:30
Madhukar Mishra 6ca7cbee31 remove job.inference_job_token as a label for a metric 2024-02-05 18:18:16 +05:30
Madhukar Mishra 2cf821d450 fix - add scheme and port to otel collector endpoint 2024-02-05 18:18:16 +05:30
Madhukar Mishra d5ef9c0b78 use a sync instrument - histogram 2024-02-05 18:18:16 +05:30
Madhukar Mishra 6284b2a32f update Cargo.lock 2024-02-05 18:18:16 +05:30
Madhukar Mishra a104ae37aa init metrics provider 2024-02-05 18:18:16 +05:30
Madhukar Mishra fa3f506f27 fixup 2024-02-05 18:18:16 +05:30
Madhukar Mishra eb4f06179e fixup 2024-02-05 18:18:16 +05:30
Madhukar Mishra 6c86764798 fixup 2024-02-05 18:18:16 +05:30
Madhukar Mishra cfa9558a33 add a metric to try otel 2024-02-05 18:18:14 +05:30
Madhukar Mishra 2cadfb105b update .gitignore 2024-02-05 18:17:31 +05:30
Madhukar Mishra 97560cb1f7 add otel crate 2024-02-05 18:17:28 +05:30
Brandon Thomas 7450dd1525 whoops 2024-02-05 05:00:37 -05:00
Brandon Thomas d8e066dc23 codegen db 2024-02-05 04:50:46 -05:00
Brandon Thomas fdae854e3f build es-update-job in docker 2024-02-05 04:48:51 -05:00
Brandon Thomas 541695f028 Merge pull request #296 from storytold/brandon-es-job
elasticsearch update job
2024-02-05 04:40:36 -05:00
Brandon Thomas 0719a929f8 pause on no updates 2024-02-05 04:37:04 -05:00
Brandon Thomas c0c86c90b8 dev secrets 2024-02-05 04:11:49 -05:00
Brandon Thomas a5c8f5fdc6 cleanup 2024-02-05 04:06:59 -05:00
Brandon Thomas 58210f0c25 job almost done 2024-02-05 04:00:37 -05:00
Brandon Thomas ccf910e456 wip elasticsearch job 2024-02-04 21:57:27 -05:00
Brandon Thomas d9197d2fd9 codegen db 2024-02-04 21:57:10 -05:00
Brandon Thomas 61d32a1790 more idempotency on more endpoints 2024-02-04 21:54:02 -05:00
Brandon Thomas 361b0e0894 generic idempotency token query; add to media file uploads 2024-02-04 21:45:21 -05:00
Brandon Thomas 12070bc399 indices on temporal columns in model_weights 2024-02-04 21:26:15 -05:00
Brandon Thomas a49b8b4b74 logging 2024-02-04 02:58:03 -05:00
Brandon Thomas 2422f6d0aa input.mp4 hardcoded 2024-02-04 02:21:52 -05:00
Brandon Thomas a1fc56ecee prompt argument for comfy 2024-02-04 01:48:05 -05:00
Brandon Thomas 05025d8817 maybe fix pathing 2024-02-04 01:04:43 -05:00
Brandon Thomas bcea80c39b get comfyui media downloads working 2024-02-04 00:43:46 -05:00
Brandon Thomas cf59c8e2fc extra logging 2024-02-03 23:49:51 -05:00
Brandon Thomas 5528993768 config for comfyui workflow 2024-02-03 23:44:21 -05:00
Brandon Thomas da9e03e3ae api for delete 2024-02-03 02:07:44 -05:00
Brandon Thomas 76b8b07d8a 6 sd batch size 2024-02-03 01:25:16 -05:00
Brandon Thomas 14cba8b8ed fix sd inference pathing 2024-02-03 01:15:03 -05:00
Brandon Thomas 55805c2d75 safetensors -> pt x2 2024-02-03 00:42:16 -05:00
ArEnSc ae80de8508 Merge pull request #295 from storytold/feature/comfyui
support docker container & more comfyui dependencies
2024-02-03 00:37:05 -05:00
Brandon Thomas b965bfb602 file_size_bytes needs to be BIGINT 2024-02-03 00:20:08 -05:00
saltacc f08cc3fd4a support docker container & more requirements 2024-02-02 21:06:25 -08:00
Brandon Thomas b7853b8914 debugging, safetensors -> pt 2024-02-02 23:57:39 -05:00
Brandon Thomas 26d5d6d272 sd: don't redirect stdout 2024-02-02 23:37:16 -05:00
Brandon Thomas 4e20f63f87 output stderr on failure 2024-02-02 23:28:43 -05:00
Brandon Thomas c8fa722b3d parameter for predefined SD weights 2024-02-02 23:17:12 -05:00
Brandon Thomas 0540d2caba hack for VAE SD support 2024-02-02 22:58:28 -05:00
Brandon Thomas 449c29e824 process and upload glb instead of gltf+bin 2024-02-01 21:09:21 -05:00
Brandon Thomas bf4bd8f21c re-codegen 2024-02-01 20:37:53 -05:00
Brandon Thomas 59bcf8b040 also upload gltf binary companion file 2024-02-01 20:33:52 -05:00
Brandon Thomas 9785f3292d Add GLB 2024-02-01 20:09:40 -05:00
Brandon Thomas 6f7262d0e8 Wrong index type for job_type. Hopefully nobody ran this. 2024-02-01 19:35:48 -05:00
Brandon Thomas ec0b475457 other job types 2024-02-01 03:25:25 -05:00
Brandon Thomas 47db5d0f3d InferenceJobType 2024-01-31 23:26:02 -05:00
Brandon Thomas e9de700f2c Migration to add job_type - we'll need to start populating this. 2024-01-31 23:10:16 -05:00
ArEnSc f365f1a02f Merge pull request #294 from storytold/feature/comfyui
Feature/comfyui
2024-01-31 21:49:33 -05:00
saltacc bfebf60289 properly handle invalid jsonpaths 2024-01-31 17:38:56 -08:00
saltacc f0f2788e1b make things work with new stuff :/ 2024-01-31 17:17:13 -08:00
saltacc 33b66f388f Merge remote-tracking branch 'origin/master' into feature/comfyui
# Conflicts:
#	crates/cli/dev-database-seed/src/seeding/model_weights.rs
2024-01-31 17:07:25 -08:00
Brandon Thomas 387cb22e65 more takedown requests 2024-01-31 02:37:07 -05:00
Brandon Thomas 7248425f30 takedown requests 2024-01-30 17:37:44 -05:00
saltacc cc0e3a2f01 Merge remote-tracking branch 'origin/master' into feature/comfyui 2024-01-30 11:55:59 -08:00
saltacc aa719ba56f download requirements, fixes 2024-01-30 11:55:30 -08:00
Brandon Thomas 1da489a177 fix fbx2gltf script 2024-01-30 04:02:43 -05:00
Brandon Thomas e777d996bc document endpoint 2024-01-29 22:42:46 -05:00
Brandon Thomas eeb6d486e1 enqueue fbx to gltf 2024-01-29 22:23:18 -05:00
Brandon Thomas 57ca10f23d fix test/lint failures 2024-01-29 21:15:17 -05:00
Brandon Thomas 7b97c3bfd2 gltf upload hack 2024-01-28 07:17:11 -05:00
Brandon Thomas 111383a0ae codegen db 2024-01-28 06:56:05 -05:00
Brandon Thomas 542a7c7116 upload fbx 2024-01-28 06:44:29 -05:00
Brandon Thomas c6dc35eccb cleanup; upload fbx 2024-01-28 06:30:22 -05:00
Brandon Thomas d8fbc09867 fbx2gltf should work - just needs endpoint 2024-01-28 05:29:57 -05:00
Brandon Thomas 2b0ebd5350 env vars for development fbx2gltf 2024-01-28 03:39:45 -05:00
Brandon Thomas 8d22697855 better environment variable errors 2024-01-28 03:36:17 -05:00
Brandon Thomas 6cdbe9ea00 configuration for fbx2gltf 2024-01-28 02:21:44 -05:00
Brandon Thomas 15db937039 tests on command runner 2024-01-28 01:35:24 -05:00
Brandon Thomas a01bde2a4b env var policy 2024-01-28 01:08:01 -05:00
Brandon Thomas 98bf91fa17 Merge pull request #292 from storytold/bt-fbx-to-gltf
fbx to gltf (wip)
2024-01-27 23:54:41 -05:00
Brandon Thomas 6f4fe5c542 create command_adapter WIP 2024-01-27 23:54:09 -05:00
Brandon Thomas ebae1dbc9f fbx to gltf 2024-01-27 20:51:36 -05:00
ArEnSc 39a07b25f5 Merge pull request #291 from storytold/feature/sd_finalstand
Fixed GDrive download check.
2024-01-27 01:38:02 -05:00
ArEnSc 168afd72cd Fixed GDrive download check. 2024-01-27 01:29:57 -05:00
Brandon Thomas 8ba103fd2b fix test 2024-01-27 00:07:01 -05:00
Brandon Thomas ef53d96a27 fix tests 2024-01-26 23:58:51 -05:00
Brandon Thomas ebc6834128 fix test lints 2024-01-26 23:51:46 -05:00
ArEnSc ea1090b8ef Merge pull request #290 from storytold/feature/sd_finalstand
Feature/sd finalstand
2024-01-26 04:32:40 -05:00
ArEnSc 3415ad4e80 loRA's work 2024-01-26 04:01:37 -05:00
Brandon Thomas 9c9c2b4fff codegen db, fix compile error 2024-01-25 23:01:53 -05:00
Brandon Thomas 7bea2ed724 Inference job stub for format conversion (fbx2gltf) 2024-01-25 22:48:34 -05:00
Brandon Thomas e7f2aed1ef new inference category for fbx -> gltf 2024-01-25 20:26:46 -05:00
Brandon Thomas 13573437fb de-duplication of query logic 2024-01-25 20:17:49 -05:00
Brandon Thomas 215e958405 improve inference-job selection predicates 2024-01-25 20:12:19 -05:00
ArEnSc 1238f95af8 Merge branch 'master' into feature/sd_finalstand 2024-01-25 16:31:25 -05:00
ArEnSc 69e6a73ef4 Fixing issues and testing. 2024-01-25 13:46:30 -05:00
ArEnSc 51ce0c29cb It should work kasisnu will help 2024-01-25 05:59:14 -05:00
ArEnSc e45ee58cdf Uploads should work testing required... 2024-01-25 05:12:11 -05:00
Brandon Thomas d80b883ce7 a few more clippylints 2024-01-24 23:16:36 -05:00
Brandon Thomas 0743684f0d cookie samesite policy for netlify branch deploys 2024-01-23 22:37:04 -05:00
Brandon Thomas 2a2b08d711 moderators don't want to see deleted files 2024-01-23 21:57:20 -05:00
ArEnSc 06feb58d83 commiting env as well to fix problem with the local dev env 2024-01-23 16:05:40 -05:00
ArEnSc e91f57944e fixed bugs in sql mapping and loRA pathing. 2024-01-23 16:05:20 -05:00
saltacc 84a2aa6108 use input file, fix ext and prefix 2024-01-23 12:58:09 -08:00
Brandon Thomas 126ed66232 enqueue tts - work with model_weights 2024-01-23 14:19:48 -05:00
Brandon Thomas af8fb02078 comments 2024-01-23 12:50:06 -05:00
ArEnSc 968af24ccc builds again adding the metadata. 2024-01-22 21:41:51 -05:00
Brandon Thomas 2c8e9ff823 fix lint issues 2024-01-22 21:01:06 -05:00
Brandon Thomas 403529c83d codegen db 2024-01-22 20:55:05 -05:00
Brandon Thomas ea85dbc6e6 rename types to be better self-documenting 2024-01-22 20:54:19 -05:00
Brandon Thomas 0ee62b64fe Merge pull request #289 from storytold/brandon-migrate-tts-inference
migrate TTS inference to weights
2024-01-22 20:45:25 -05:00
Brandon Thomas d2d295c12f migrate TTS inference to weights 2024-01-22 20:44:38 -05:00
ArEnSc edb2a7f95a It builds again. 2024-01-22 19:18:27 -05:00
saltacc aff8d5d310 Merge remote-tracking branch 'origin/master' into feature/comfyui
# Conflicts:
#	crates/lib/api_clients/cloud_storage/src/remote_file_manager/media_descriptor.rs
#	crates/lib/api_clients/cloud_storage/src/remote_file_manager/remote_cloud_bucket_details.rs
2024-01-22 13:31:40 -08:00
ArEnSc f37c04ee07 Merge pull request #287 from storytold/feature/media-seed-tool
make seed tool for media uploads
2024-01-22 15:07:45 -05:00
saltacc 93f8a95298 make seed tool for media uploads 2024-01-22 12:01:45 -08:00
saltacc 55367e8723 Resolved merge conflict by keeping my changes in process_job.rs 2024-01-22 10:37:19 -08:00
ArEnSc 957b68f679 Fixed insert generic. 2024-01-21 23:47:50 -05:00
Brandon Thomas cb6feaaa46 disable tts edit/delete when migrated 2024-01-21 03:21:00 -05:00
Brandon Thomas c7bc5e3686 fix import errors; codegen db 2024-01-21 01:16:09 -05:00
Brandon Thomas 0811e12c0b port legacy GET TTS endpoint to model weights 2024-01-21 01:10:20 -05:00
Brandon Thomas 65c5138533 document index 2024-01-20 21:30:51 -05:00
Brandon Thomas 20ced958e6 Merge pull request #286 from storytold/brandon-port-tts-queries
port TTS enqueue to weights
2024-01-20 19:58:30 -05:00
Brandon Thomas 22026977d9 port TTS enqueue to weights 2024-01-20 19:56:26 -05:00
Brandon Thomas f812fbb4e6 rust lint: unused mut 2024-01-20 18:40:15 -05:00
ArEnSc 20832a9af9 Almost there need to test that one endpoint 2024-01-20 09:15:25 -05:00
Brandon Thomas 7558a4edc9 fix lint and test failures 2024-01-19 21:00:21 -05:00
ArEnSc 59745551ce Merge pull request #285 from storytold/feature/comfyui
ComfyUI Support
2024-01-19 16:27:46 -05:00
saltacc 3e875fb6fa uncomment 2024-01-19 13:08:58 -08:00
saltacc da2ea13524 Merge remote-tracking branch 'origin/master' into feature/comfyui 2024-01-19 12:41:56 -08:00
saltacc 550a11c493 make it work 🔥 2024-01-19 12:40:19 -08:00
Brandon Thomas a4b549af19 allow larger file uploads 2024-01-19 02:56:46 -05:00
ArEnSc 7eb93c7600 Builds on inference for batch creation of entries. 2024-01-19 00:17:53 -05:00
Brandon Thomas c44cc5671f ES cleanup, additional param 2024-01-18 22:53:17 -05:00
Brandon Thomas 380933d1aa much cleaner queries 2024-01-18 22:36:04 -05:00
ArEnSc 5298c028e0 Fix small bug. 2024-01-18 20:50:16 -05:00
ArEnSc ad32bdb119 Fixing routing for inference jobs to support uploads properly. 2024-01-18 20:26:19 -05:00
Brandon Thomas 3318067cb5 hide deleted files from mods/admins - it's just clutter 2024-01-18 19:24:39 -05:00
Brandon Thomas c15360ddb3 ElasticSearch test 2024-01-18 18:17:21 -05:00
saltacc e741951630 update 2024-01-18 09:22:30 -08:00
Brandon Thomas c91f548878 hack elasticsearch options 2024-01-18 01:58:36 -05:00
Brandon Thomas 35231e5f82 fix last test failures 2024-01-17 23:13:47 -05:00
saltacc 7f1173956a comfyui 2024-01-17 17:39:31 -08:00
Brandon Thomas f6da4f3247 fix lints 2024-01-17 20:34:13 -05:00
Brandon Thomas 8dc7c81a78 fix tests 2024-01-17 19:48:03 -05:00
ArEnSc 387dbbeed9 Merge pull request #266 from storytold/feature/image_generation
Feature/image generation
2024-01-17 19:27:23 -05:00
ArEnSc cecd3dd6df Update .env 2024-01-17 18:03:20 -05:00
ArEnSc 7b90b11ce6 Fixed build issues ready to merge to master after review. 2024-01-17 17:33:55 -05:00
ArEnSc fc154c4a31 Merge branch 'master' into feature/image_generation 2024-01-17 15:22:53 -05:00
ArEnSc 24818f8ecf Ok this builds inference job. Fixes still needed 2024-01-17 03:06:09 -05:00
Brandon Thomas 2d91504eb5 test to show usage 2024-01-17 02:21:23 -05:00
Brandon Thomas 67a8bb739b Merge pull request #279 from storytold/brandon-insert-batch-generations
insert batch generation records
2024-01-16 23:01:10 -05:00
ArEnSc eebedbce07 Runs inference but the checkpoint is corrupt? 2024-01-14 18:39:33 -05:00
ArEnSc f4497a4aee Fixed build errors inference job should be good to run now. 2024-01-13 02:27:12 -05:00
ArEnSc 447a457dff image gen should build. 2024-01-13 00:26:51 -05:00
ArEnSc 7f65014d6d Almost done inference. 2024-01-12 02:33:36 -05:00
ArEnSc c4681937b3 Image generation on it's way... 2024-01-12 00:19:09 -05:00
ArEnSc 2d52ac0fa9 Removed some components,
also added the command env variables, now going to run inference.
2024-01-11 21:24:38 -05:00
ArEnSc 8709fa9c8a enqueue is there. testing inference side. 2024-01-11 16:43:04 -05:00
ArEnSc 4250469fd3 enqueue_image_generation
fixes added checks and changes to the interface.
Will document the api as well.
2024-01-10 20:35:53 -05:00
ArEnSc e5ed4d986f downloading works. 2024-01-05 17:20:21 -05:00
ArEnSc ea84b009a8 Fix compile issues 2024-01-05 16:01:42 -05:00
ArEnSc aa202172a2 uploading models and then reseed. 2024-01-04 21:46:25 -05:00
ArEnSc 1b4e3cccb5 Fixed over sight in the cloud file remote_file_manager,
where the metadata didn't include the bucket path for the file.
Then we didn't pass the correct upload path with the file name
2024-01-04 17:28:00 -05:00
ArEnSc 796e8b5aee Compile fix switching to rust rover since less mapping is required now. 2024-01-04 09:57:45 -05:00
ArEnSc 1614cba2f8 properties added 2024-01-03 23:16:00 -05:00
ArEnSc dbe989c5a1 rebuilds on the routes in storyteller web. 2024-01-03 22:32:25 -05:00
ArEnSc a2cad0b289 getting the args for inference working. 2024-01-03 14:57:49 -05:00
ArEnSc 74db1683b1 unwraped the args 2024-01-03 11:01:37 -05:00
ArEnSc 6e5e326d0e Ok it builds time to fillout the inference command. 2024-01-02 23:06:12 -05:00
ArEnSc bcd806e7f0 Some boilerplate done. 2024-01-02 17:50:22 -05:00
ArEnSc 20b95c090e Now testing the end point. 2024-01-02 16:16:51 -05:00
ArEnSc 87b2f4a113 Args are tested 2024-01-02 12:55:34 -05:00
ArEnSc a7799be70e Merge branch 'master' into feature/image_generation 2024-01-02 12:36:18 -05:00
ArEnSc 7d858d2c19 Payload almost ready need to migrate the db and write unit tests. 2024-01-02 12:24:13 -05:00
ArEnSc 733c24aebb Working on enqueuing image generation 2024-01-02 10:50:24 -05:00
454 changed files with 21062 additions and 1529 deletions
+3
View File
@@ -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.
+1
View File
@@ -17,6 +17,7 @@ production_database_voice_clone_report_download.sh
secrets.toml
secrets.yaml
twitch_secrets.toml
.DS_Store
# Old env secrets
.*-secrets
+2
View File
@@ -9,6 +9,7 @@
<w>cheermote</w>
<w>cidrs</w>
<w>crockford</w>
<w>csam</w>
<w>culted</w>
<w>dalle</w>
<w>demuxer</w>
@@ -26,6 +27,7 @@
<w>hparams</w>
<w>huggingface</w>
<w>lipsync</w>
<w>mocap</w>
<w>mochi</w>
<w>nestedness</w>
<w>pathbuf</w>
@@ -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
}
@@ -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"
}
@@ -0,0 +1,12 @@
{
"db_name": "MySQL",
"query": "\nINSERT INTO prompts\nSET\n token = ?,\n prompt_type = ?,\n\n maybe_creator_user_token = ?,\n\n maybe_positive_prompt = ?,\n maybe_negative_prompt = ?,\n maybe_other_args = ?,\n\n creator_ip_address = ?\n ",
"describe": {
"columns": [],
"parameters": {
"Right": 7
},
"nullable": []
},
"hash": "13ca06bcbb4a576f8a2229a8554b7488d379baa381d8d5cb60972750e81b2173"
}
@@ -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"
}
@@ -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 maybe_prompt_token = ?,\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": 32
},
"nullable": []
},
"hash": "23061975280d3357a453705c90824001ff5023031a69425b8ec9b6ccff57aa8c"
}
@@ -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.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\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,36 @@
},
{
"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": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
"type_info": {
"type": "VarString",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 9,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
@@ -74,7 +104,7 @@
}
},
{
"ordinal": 7,
"ordinal": 10,
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
"type_info": {
"type": "VarString",
@@ -84,7 +114,7 @@
}
},
{
"ordinal": 8,
"ordinal": 11,
"name": "maybe_model_weights_title",
"type_info": {
"type": "VarString",
@@ -94,7 +124,7 @@
}
},
{
"ordinal": 9,
"ordinal": 12,
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
"type_info": {
"type": "VarString",
@@ -104,7 +134,7 @@
}
},
{
"ordinal": 10,
"ordinal": 13,
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
@@ -114,7 +144,7 @@
}
},
{
"ordinal": 11,
"ordinal": 14,
"name": "maybe_model_cover_image_public_bucket_hash",
"type_info": {
"type": "VarString",
@@ -124,7 +154,7 @@
}
},
{
"ordinal": 12,
"ordinal": 15,
"name": "maybe_model_cover_image_public_bucket_prefix",
"type_info": {
"type": "VarString",
@@ -134,7 +164,7 @@
}
},
{
"ordinal": 13,
"ordinal": 16,
"name": "maybe_model_cover_image_public_bucket_extension",
"type_info": {
"type": "VarString",
@@ -144,7 +174,7 @@
}
},
{
"ordinal": 14,
"ordinal": 17,
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
@@ -154,7 +184,7 @@
}
},
{
"ordinal": 15,
"ordinal": 18,
"name": "maybe_model_weight_creator_username",
"type_info": {
"type": "VarString",
@@ -164,7 +194,7 @@
}
},
{
"ordinal": 16,
"ordinal": 19,
"name": "maybe_model_weight_creator_display_name",
"type_info": {
"type": "VarString",
@@ -174,7 +204,7 @@
}
},
{
"ordinal": 17,
"ordinal": 20,
"name": "maybe_model_weight_creator_gravatar_hash",
"type_info": {
"type": "String",
@@ -184,7 +214,7 @@
}
},
{
"ordinal": 18,
"ordinal": 21,
"name": "public_bucket_directory_hash",
"type_info": {
"type": "VarString",
@@ -194,7 +224,7 @@
}
},
{
"ordinal": 19,
"ordinal": 22,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
@@ -204,7 +234,7 @@
}
},
{
"ordinal": 20,
"ordinal": 23,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
@@ -214,7 +244,7 @@
}
},
{
"ordinal": 21,
"ordinal": 24,
"name": "maybe_ratings_positive_count",
"type_info": {
"type": "Long",
@@ -224,7 +254,7 @@
}
},
{
"ordinal": 22,
"ordinal": 25,
"name": "maybe_ratings_negative_count",
"type_info": {
"type": "Long",
@@ -234,7 +264,7 @@
}
},
{
"ordinal": 23,
"ordinal": 26,
"name": "maybe_bookmark_count",
"type_info": {
"type": "Long",
@@ -244,7 +274,7 @@
}
},
{
"ordinal": 24,
"ordinal": 27,
"name": "created_at",
"type_info": {
"type": "Timestamp",
@@ -254,7 +284,7 @@
}
},
{
"ordinal": 25,
"ordinal": 28,
"name": "updated_at",
"type_info": {
"type": "Timestamp",
@@ -274,6 +304,9 @@
true,
true,
true,
true,
true,
true,
false,
true,
true,
@@ -296,5 +329,5 @@
false
]
},
"hash": "c2de3b6de37dbbb5b6afd91af08aae2739cda97ef8ebb8f9b4ee967969ce43be"
"hash": "2c5083331bf226ef10c419f6a2b6dee6ee776a3d41eea06de1eafd1d1bd41791"
}
@@ -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"
}
@@ -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
}
@@ -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"
}
@@ -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
}
@@ -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"
}
@@ -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"
}
@@ -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
}
@@ -0,0 +1,102 @@
{
"db_name": "MySQL",
"query": "\nSELECT\n p.token as `token: tokens::tokens::prompts::PromptToken`,\n\n p.prompt_type as `prompt_type: enums::by_table::prompts::prompt_type::PromptType`,\n\n p.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n\n p.maybe_positive_prompt,\n p.maybe_negative_prompt,\n p.maybe_other_args,\n\n p.creator_ip_address,\n p.created_at\n\nFROM prompts as p\nWHERE\n p.token = ?\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token: tokens::tokens::prompts::PromptToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 1,
"name": "prompt_type: enums::by_table::prompts::prompt_type::PromptType",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 2,
"name": "maybe_creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 3,
"name": "maybe_positive_prompt",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 4,
"name": "maybe_negative_prompt",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 5,
"name": "maybe_other_args",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 6,
"name": "creator_ip_address",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 160
}
},
{
"ordinal": 7,
"name": "created_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
true,
true,
true,
true,
false,
false
]
},
"hash": "61744bbf83f7cf00348bcc21e868d9c506fec46da4a33ac50d63c6d9e00c0cec"
}
@@ -0,0 +1,465 @@
{
"db_name": "MySQL",
"query": "\n SELECT\n wt.token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n wt.title,\n wt.weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n wt.weights_category as `weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n wt.maybe_description_markdown,\n wt.maybe_description_rendered_html,\n\n wt.creator_user_token as `creator_user_token: tokens::tokens::users::UserToken`,\n users.username as creator_username,\n users.display_name as creator_display_name,\n users.email_gravatar_hash AS creator_gravatar_hash,\n\n wt.creator_ip_address,\n wt.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n wt.maybe_last_update_user_token as `maybe_last_update_user_token: tokens::tokens::users::UserToken`,\n wt.original_download_url,\n wt.original_filename,\n wt.file_size_bytes,\n wt.file_checksum_sha2,\n\n wt.public_bucket_hash,\n wt.maybe_public_bucket_prefix,\n wt.maybe_public_bucket_extension,\n\n cover_image.public_bucket_directory_hash as maybe_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_cover_image_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 w_extension.ietf_language_tag as maybe_ietf_language_tag,\n w_extension.ietf_primary_language_subtag as maybe_ietf_primary_language_subtag,\n w_extension.maybe_default_pretrained_vocoder,\n w_extension.text_pipeline_type as maybe_text_pipeline_type,\n w_extension.use_default_mel_multiply_factor,\n w_extension.maybe_custom_mel_multiply_factor,\n\n w_extension.maybe_custom_vocoder_token,\n\n vocoder.vocoder_type as `maybe_custom_vocoder_type: enums::common::vocoder_type::VocoderType`,\n vocoder.title as maybe_custom_vocoder_title,\n vocoder.private_bucket_hash as maybe_custom_vocoder_private_bucket_hash,\n\n wt.version,\n wt.created_at,\n wt.updated_at,\n wt.user_deleted_at,\n wt.mod_deleted_at\n\n FROM model_weights as wt\n JOIN users\n ON users.token = wt.creator_user_token\n LEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = wt.maybe_cover_image_media_file_token\n LEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"model_weight\"\n AND entity_stats.entity_token = wt.token\n\n LEFT OUTER JOIN model_weights_extension_tts_details as w_extension\n ON w_extension.model_weights_token = wt.token\n\n LEFT OUTER JOIN vocoder_models AS vocoder\n ON vocoder.token = w_extension.maybe_custom_vocoder_token\n\n WHERE\n wt.token = ?\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": "title",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 2,
"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": 3,
"name": "weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 4,
"name": "maybe_description_markdown",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 5,
"name": "maybe_description_rendered_html",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 6,
"name": "creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 7,
"name": "creator_username",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 8,
"name": "creator_display_name",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 9,
"name": "creator_gravatar_hash",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 10,
"name": "creator_ip_address",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 160
}
},
{
"ordinal": 11,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 12,
"name": "maybe_last_update_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 13,
"name": "original_download_url",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 2048
}
},
{
"ordinal": 14,
"name": "original_filename",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 15,
"name": "file_size_bytes",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 16,
"name": "file_checksum_sha2",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 17,
"name": "public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 18,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 19,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 20,
"name": "maybe_cover_image_public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 21,
"name": "maybe_cover_image_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 22,
"name": "maybe_cover_image_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 23,
"name": "maybe_ratings_positive_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 24,
"name": "maybe_ratings_negative_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 25,
"name": "maybe_bookmark_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 26,
"name": "maybe_ietf_language_tag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 27,
"name": "maybe_ietf_primary_language_subtag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 48
}
},
{
"ordinal": 28,
"name": "maybe_default_pretrained_vocoder",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 29,
"name": "maybe_text_pipeline_type",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 30,
"name": "use_default_mel_multiply_factor",
"type_info": {
"type": "Tiny",
"flags": "",
"char_set": 63,
"max_size": 1
}
},
{
"ordinal": 31,
"name": "maybe_custom_mel_multiply_factor",
"type_info": {
"type": "Double",
"flags": "",
"char_set": 63,
"max_size": 22
}
},
{
"ordinal": 32,
"name": "maybe_custom_vocoder_token",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 33,
"name": "maybe_custom_vocoder_type: enums::common::vocoder_type::VocoderType",
"type_info": {
"type": "VarString",
"flags": "BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 34,
"name": "maybe_custom_vocoder_title",
"type_info": {
"type": "VarString",
"flags": "BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 35,
"name": "maybe_custom_vocoder_private_bucket_hash",
"type_info": {
"type": "String",
"flags": "MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 36,
"name": "version",
"type_info": {
"type": "Long",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 11
}
},
{
"ordinal": 37,
"name": "created_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | BINARY | TIMESTAMP",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 38,
"name": "updated_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 39,
"name": "user_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 40,
"name": "mod_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
true,
true,
true,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
true,
true
]
},
"hash": "6c0a2cb31a3241fc6cd0b6738901a31bd91298f131d3b87744c698e92eaec34b"
}
@@ -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.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\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,36 @@
},
{
"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": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
"type_info": {
"type": "VarString",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 9,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
@@ -74,7 +104,7 @@
}
},
{
"ordinal": 7,
"ordinal": 10,
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
"type_info": {
"type": "VarString",
@@ -84,7 +114,7 @@
}
},
{
"ordinal": 8,
"ordinal": 11,
"name": "maybe_model_weights_title",
"type_info": {
"type": "VarString",
@@ -94,7 +124,7 @@
}
},
{
"ordinal": 9,
"ordinal": 12,
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
"type_info": {
"type": "VarString",
@@ -104,7 +134,7 @@
}
},
{
"ordinal": 10,
"ordinal": 13,
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
@@ -114,7 +144,7 @@
}
},
{
"ordinal": 11,
"ordinal": 14,
"name": "maybe_model_cover_image_public_bucket_hash",
"type_info": {
"type": "VarString",
@@ -124,7 +154,7 @@
}
},
{
"ordinal": 12,
"ordinal": 15,
"name": "maybe_model_cover_image_public_bucket_prefix",
"type_info": {
"type": "VarString",
@@ -134,7 +164,7 @@
}
},
{
"ordinal": 13,
"ordinal": 16,
"name": "maybe_model_cover_image_public_bucket_extension",
"type_info": {
"type": "VarString",
@@ -144,7 +174,7 @@
}
},
{
"ordinal": 14,
"ordinal": 17,
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
@@ -154,7 +184,7 @@
}
},
{
"ordinal": 15,
"ordinal": 18,
"name": "maybe_model_weight_creator_username",
"type_info": {
"type": "VarString",
@@ -164,7 +194,7 @@
}
},
{
"ordinal": 16,
"ordinal": 19,
"name": "maybe_model_weight_creator_display_name",
"type_info": {
"type": "VarString",
@@ -174,7 +204,7 @@
}
},
{
"ordinal": 17,
"ordinal": 20,
"name": "maybe_model_weight_creator_gravatar_hash",
"type_info": {
"type": "String",
@@ -184,7 +214,7 @@
}
},
{
"ordinal": 18,
"ordinal": 21,
"name": "public_bucket_directory_hash",
"type_info": {
"type": "VarString",
@@ -194,7 +224,7 @@
}
},
{
"ordinal": 19,
"ordinal": 22,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
@@ -204,7 +234,7 @@
}
},
{
"ordinal": 20,
"ordinal": 23,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
@@ -214,7 +244,7 @@
}
},
{
"ordinal": 21,
"ordinal": 24,
"name": "maybe_ratings_positive_count",
"type_info": {
"type": "Long",
@@ -224,7 +254,7 @@
}
},
{
"ordinal": 22,
"ordinal": 25,
"name": "maybe_ratings_negative_count",
"type_info": {
"type": "Long",
@@ -234,7 +264,7 @@
}
},
{
"ordinal": 23,
"ordinal": 26,
"name": "maybe_bookmark_count",
"type_info": {
"type": "Long",
@@ -244,7 +274,7 @@
}
},
{
"ordinal": 24,
"ordinal": 27,
"name": "created_at",
"type_info": {
"type": "Timestamp",
@@ -254,7 +284,7 @@
}
},
{
"ordinal": 25,
"ordinal": 28,
"name": "updated_at",
"type_info": {
"type": "Timestamp",
@@ -274,6 +304,9 @@
true,
true,
true,
true,
true,
true,
false,
true,
true,
@@ -296,5 +329,5 @@
false
]
},
"hash": "06e0c5e80803d072551bc4df40e7d273ba0772608d52b46b840249415c341945"
"hash": "726a6c62dc20e8372e950a10ecd5a438769448c7ce315bc8743b728e80179420"
}
@@ -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"
}
@@ -0,0 +1,91 @@
{
"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 m.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension\n\nFROM media_files AS m\nWHERE\n m.token = ?\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token: tokens::tokens::media_files::MediaFileToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 1,
"name": "media_type: enums::by_table::media_files::media_file_type::MediaFileType",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 2,
"name": "maybe_creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 3,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 4,
"name": "public_bucket_directory_hash",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 5,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 6,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
true,
false,
false,
true,
true
]
},
"hash": "8ba733c63aff16f144417eaa2004d7de479e59f62688016f0ce7b7c61ec1ec57"
}
@@ -0,0 +1,399 @@
{
"db_name": "MySQL",
"query": "\n SELECT\n wt.token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n wt.title,\n wt.weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n wt.weights_category as `weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n wt.maybe_description_markdown,\n wt.maybe_description_rendered_html,\n\n wt.creator_user_token as `creator_user_token: tokens::tokens::users::UserToken`,\n users.username as creator_username,\n users.display_name as creator_display_name,\n users.email_gravatar_hash AS creator_gravatar_hash,\n\n wt.creator_ip_address,\n wt.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n wt.maybe_last_update_user_token as `maybe_last_update_user_token: tokens::tokens::users::UserToken`,\n wt.original_download_url,\n wt.original_filename,\n wt.file_size_bytes,\n wt.file_checksum_sha2,\n\n wt.public_bucket_hash,\n wt.maybe_public_bucket_prefix,\n wt.maybe_public_bucket_extension,\n\n cover_image.public_bucket_directory_hash as maybe_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_cover_image_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 w_extension.ietf_language_tag as maybe_ietf_language_tag,\n w_extension.ietf_primary_language_subtag as maybe_ietf_primary_language_subtag,\n w_extension.maybe_default_pretrained_vocoder as `maybe_default_pretrained_vocoder: crate::column_types::vocoder_type::VocoderType`,\n w_extension.text_pipeline_type as maybe_text_pipeline_type,\n\n wt.version,\n wt.created_at,\n wt.updated_at,\n wt.user_deleted_at,\n wt.mod_deleted_at\n\n FROM model_weights as wt\n JOIN users\n ON users.token = wt.creator_user_token\n LEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = wt.maybe_cover_image_media_file_token\n LEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"model_weight\"\n AND entity_stats.entity_token = wt.token\n\n LEFT OUTER JOIN model_weights_extension_tts_details as w_extension\n ON w_extension.model_weights_token = wt.token\n\n WHERE\n wt.token = ?\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": "title",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 2,
"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": 3,
"name": "weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 4,
"name": "maybe_description_markdown",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 5,
"name": "maybe_description_rendered_html",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 6,
"name": "creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 7,
"name": "creator_username",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 8,
"name": "creator_display_name",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 9,
"name": "creator_gravatar_hash",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 10,
"name": "creator_ip_address",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 160
}
},
{
"ordinal": 11,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 12,
"name": "maybe_last_update_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 13,
"name": "original_download_url",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 2048
}
},
{
"ordinal": 14,
"name": "original_filename",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 15,
"name": "file_size_bytes",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 16,
"name": "file_checksum_sha2",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 17,
"name": "public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 18,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 19,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 20,
"name": "maybe_cover_image_public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 21,
"name": "maybe_cover_image_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 22,
"name": "maybe_cover_image_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 23,
"name": "maybe_ratings_positive_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 24,
"name": "maybe_ratings_negative_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 25,
"name": "maybe_bookmark_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 26,
"name": "maybe_ietf_language_tag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 27,
"name": "maybe_ietf_primary_language_subtag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 48
}
},
{
"ordinal": 28,
"name": "maybe_default_pretrained_vocoder: crate::column_types::vocoder_type::VocoderType",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 29,
"name": "maybe_text_pipeline_type",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 30,
"name": "version",
"type_info": {
"type": "Long",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 11
}
},
{
"ordinal": 31,
"name": "created_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | BINARY | TIMESTAMP",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 32,
"name": "updated_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 33,
"name": "user_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 34,
"name": "mod_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
true,
true,
true,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
true,
true
]
},
"hash": "8bd7ddec0966c742754a278000902c7d5059237ef312c638817a465dcb1979de"
}
@@ -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"
}
@@ -0,0 +1,399 @@
{
"db_name": "MySQL",
"query": "\n SELECT\n wt.token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n wt.title,\n wt.weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n wt.weights_category as `weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n wt.maybe_description_markdown,\n wt.maybe_description_rendered_html,\n wt.creator_ip_address,\n wt.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n wt.creator_user_token as `creator_user_token: tokens::tokens::users::UserToken`,\n users.username as creator_username,\n users.display_name as creator_display_name,\n users.email_gravatar_hash AS creator_gravatar_hash,\n\n wt.maybe_last_update_user_token as `maybe_last_update_user_token: tokens::tokens::users::UserToken`,\n wt.original_download_url,\n wt.original_filename,\n wt.file_size_bytes,\n wt.file_checksum_sha2,\n wt.public_bucket_hash,\n wt.maybe_public_bucket_prefix,\n wt.maybe_public_bucket_extension,\n\n cover_image.public_bucket_directory_hash as maybe_cover_image_public_bucket_hash,\n cover_image.maybe_public_bucket_prefix as maybe_cover_image_public_bucket_prefix,\n cover_image.maybe_public_bucket_extension as maybe_cover_image_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 w_extension.ietf_language_tag as maybe_ietf_language_tag,\n w_extension.ietf_primary_language_subtag as maybe_ietf_primary_language_subtag,\n w_extension.maybe_default_pretrained_vocoder as `maybe_default_pretrained_vocoder: crate::column_types::vocoder_type::VocoderType`,\n w_extension.text_pipeline_type as maybe_text_pipeline_type,\n\n wt.version,\n wt.created_at,\n wt.updated_at,\n wt.user_deleted_at,\n wt.mod_deleted_at\n\n FROM model_weights as wt\n JOIN users\n ON users.token = wt.creator_user_token\n LEFT OUTER JOIN media_files as cover_image\n ON cover_image.token = wt.maybe_cover_image_media_file_token\n LEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"model_weight\"\n AND entity_stats.entity_token = wt.token\n\n LEFT OUTER JOIN model_weights_extension_tts_details as w_extension\n ON w_extension.model_weights_token = wt.token\n\n WHERE\n wt.token = ?\n AND wt.user_deleted_at IS NULL\n AND wt.mod_deleted_at IS NULL\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": "title",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 2,
"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": 3,
"name": "weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 4,
"name": "maybe_description_markdown",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 5,
"name": "maybe_description_rendered_html",
"type_info": {
"type": "Blob",
"flags": "BLOB | BINARY",
"char_set": 224,
"max_size": 262140
}
},
{
"ordinal": 6,
"name": "creator_ip_address",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 160
}
},
{
"ordinal": 7,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 8,
"name": "creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 9,
"name": "creator_username",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | UNIQUE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 10,
"name": "creator_display_name",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 80
}
},
{
"ordinal": 11,
"name": "creator_gravatar_hash",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 12,
"name": "maybe_last_update_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 13,
"name": "original_download_url",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 2048
}
},
{
"ordinal": 14,
"name": "original_filename",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 1020
}
},
{
"ordinal": 15,
"name": "file_size_bytes",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 16,
"name": "file_checksum_sha2",
"type_info": {
"type": "String",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 17,
"name": "public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 18,
"name": "maybe_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 19,
"name": "maybe_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 20,
"name": "maybe_cover_image_public_bucket_hash",
"type_info": {
"type": "VarString",
"flags": "BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 21,
"name": "maybe_cover_image_public_bucket_prefix",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 22,
"name": "maybe_cover_image_public_bucket_extension",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 64
}
},
{
"ordinal": 23,
"name": "maybe_ratings_positive_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 24,
"name": "maybe_ratings_negative_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 25,
"name": "maybe_bookmark_count",
"type_info": {
"type": "Long",
"flags": "UNSIGNED",
"char_set": 63,
"max_size": 10
}
},
{
"ordinal": 26,
"name": "maybe_ietf_language_tag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 27,
"name": "maybe_ietf_primary_language_subtag",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 48
}
},
{
"ordinal": 28,
"name": "maybe_default_pretrained_vocoder: crate::column_types::vocoder_type::VocoderType",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 29,
"name": "maybe_text_pipeline_type",
"type_info": {
"type": "VarString",
"flags": "BINARY",
"char_set": 224,
"max_size": 256
}
},
{
"ordinal": 30,
"name": "version",
"type_info": {
"type": "Long",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 11
}
},
{
"ordinal": 31,
"name": "created_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | BINARY | TIMESTAMP",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 32,
"name": "updated_at",
"type_info": {
"type": "Timestamp",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | TIMESTAMP | ON_UPDATE_NOW",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 33,
"name": "user_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 34,
"name": "mod_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
true,
true,
true,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
false,
false,
true,
true
]
},
"hash": "a3cf13dd4272af3b8fbcddba1f1ea711e64f57fb114886d60d4ae2937c56841d"
}
@@ -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
}
@@ -0,0 +1,91 @@
{
"db_name": "MySQL",
"query": "\n SELECT\n wt.token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n wt.weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n wt.weights_category as `weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n wt.creator_user_token as `creator_user_token: tokens::tokens::users::UserToken`,\n wt.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n wt.user_deleted_at,\n wt.mod_deleted_at\n\n FROM model_weights as wt\n WHERE\n wt.token = ?\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": "weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 3,
"name": "creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 4,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 5,
"name": "user_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 6,
"name": "mod_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false,
true,
true
]
},
"hash": "be70e3bd4a946da7bd66a29a94e659b25f40a33ef5973a8ff34bfabe08db4051"
}
@@ -0,0 +1,12 @@
{
"db_name": "MySQL",
"query": "INSERT INTO idempotency_tokens SET idempotency_value = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "cfeb095db83dfad895835d509818ecccc6cb9da2b32b5155e5ca29d56d3b7fc0"
}
@@ -0,0 +1,91 @@
{
"db_name": "MySQL",
"query": "\n SELECT\n wt.token as `token: tokens::tokens::model_weights::ModelWeightToken`,\n wt.weights_type as `weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n wt.weights_category as `weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n wt.creator_user_token as `creator_user_token: tokens::tokens::users::UserToken`,\n wt.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n wt.user_deleted_at,\n wt.mod_deleted_at\n\n FROM model_weights as wt\n WHERE\n wt.token = ?\n AND wt.user_deleted_at IS NULL\n AND wt.mod_deleted_at IS NULL\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": "weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 3,
"name": "creator_user_token: tokens::tokens::users::UserToken",
"type_info": {
"type": "VarString",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | NO_DEFAULT_VALUE",
"char_set": 224,
"max_size": 128
}
},
{
"ordinal": 4,
"name": "creator_set_visibility: enums::common::visibility::Visibility",
"type_info": {
"type": "String",
"flags": "NOT_NULL | MULTIPLE_KEY | BINARY | ENUM",
"char_set": 224,
"max_size": 28
}
},
{
"ordinal": 5,
"name": "user_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
},
{
"ordinal": 6,
"name": "mod_deleted_at",
"type_info": {
"type": "Timestamp",
"flags": "MULTIPLE_KEY | BINARY",
"char_set": 63,
"max_size": 19
}
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false,
true,
true
]
},
"hash": "d243270734f48fce2f5072ddbde224abf24858c6484995949c98382aa58840a7"
}
@@ -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"
}
@@ -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
}
@@ -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"
}
@@ -0,0 +1,12 @@
{
"db_name": "MySQL",
"query": "\nINSERT INTO media_files\nSET\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 extra_file_modification_info = ?,\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": "f681f25833875063150b6f881ebbfadc292939745e38754991650651edbe7acb"
}
Generated
+543 -92
View File
File diff suppressed because it is too large Load Diff
+13 -9
View File
@@ -11,20 +11,21 @@ members = [
"crates/_types/tokens",
# CLI tools for operations, etc.
"crates/cli/database-backup",
"crates/cli/database-cleanup",
"crates/cli/dev-database-seed",
"crates/cli/dev-upload-media-file",
"crates/cli/elasticsearch-cli",
"crates/cli/kubectl-pod-cleanup",
"crates/cli/lru-delete-models",
"crates/cli/migration-tool",
"crates/cli/scrape_test",
"crates/cli/devenv/dev-database-seed",
"crates/cli/devenv/dev-upload-media-file",
"crates/cli/devenv/scrape-test",
"crates/cli/production/db-backup",
"crates/cli/production/db-cleanup",
"crates/cli/production/elasticsearch-cli",
"crates/cli/production/kubectl-pod-cleanup",
"crates/cli/production/lru-delete-models",
"crates/cli/production/migration-tool",
# Shared libraries
"crates/lib/actix_helpers",
"crates/lib/api_clients/cloud_storage",
"crates/lib/api_clients/google_drive_common",
"crates/lib/api_clients/thumbnail_generator",
"crates/lib/api_clients/twitch_common",
"crates/lib/bootstrap",
"crates/lib/caching/memory_caching",
@@ -47,12 +48,14 @@ members = [
"crates/lib/files/images",
"crates/lib/files/media",
"crates/lib/files/mimetypes",
"crates/lib/files/videos",
"crates/lib/idempotency",
"crates/lib/jobs_common",
"crates/lib/logging",
"crates/lib/migration",
"crates/lib/mysql_queries",
"crates/lib/password",
"crates/lib/prompt_engineering",
"crates/lib/redis_common",
"crates/lib/server_environment",
"crates/lib/sqlx_mysql_helpers",
@@ -73,6 +76,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",
+5 -2
View File
@@ -18,6 +18,9 @@ deny = [
"clippy::borrow_as_ptr",
"clippy::borrow_deref_ref",
# Clippy async
"clippy::await_holding_lock",
# Clippy - performance
"clippy::cmp_owned",
"clippy::useless_vec",
@@ -43,12 +46,12 @@ deny = [
"unused_imports", # These are easy to automatically cull
"unused_parens", # Unused parens are ugly
"unused_variables", # Don't leave cruft
#"unused_mut", # Be strict about mutability (TODO)
"unused_mut", # Be strict about mutability
# Possible:
# "clippy::ptr_arg",
# "clippy::too_many_lines" (note: this is configurable)
# "clippy::clone_on_copy", # Don't use clone() on Copy types
]
warn = [
@@ -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
}
}
}
}
+13
View File
@@ -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'
);
+2 -1
View File
@@ -375,7 +375,8 @@ where token IN (
'vcm_a47wtfbsjrfc',
'vcm_kygenhbg5mgj',
'vcm_s8gndv19yt7p',
'vcm_ny9pj57w5eyh'
'vcm_ny9pj57w5eyh',
'vcm_jg4rst3j2d7x'
);
@@ -0,0 +1,22 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- This finds the top users of image generation within a given time range.
select
u.username,
u.email_address,
count(*) as use_count
from users as u
join
(
select maybe_creator_user_token as user_token
from generic_inference_jobs
where job_type = 'stable_diffusion'
AND created_at > NOW() - INTERVAL 24 HOUR
) as jobs
ON jobs.user_token = u.token
group by u.username, u.email_address
order by use_count desc
@@ -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);
@@ -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;
@@ -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;
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE generic_inference_jobs DROP COLUMN maybe_cover_image_media_file_token;
@@ -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;
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
DROP TABLE prompts;
@@ -0,0 +1,56 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Table to store prompts as a first class entity.
-- Duplication of the same prompt is totally fine.
CREATE TABLE prompts (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- ========== PRIMARY, FOREIGN KEYS, and POLYMORPHISM ==========
-- Effective "primary key" of the prompt
token VARCHAR(32) NOT NULL,
-- Original product to which the prompt applied.
-- Prompts may or may not be compatible across products.
-- Possible values:
-- * 'stable_diffusion'
-- * 'comfy_ui'
prompt_type VARCHAR(16) NOT NULL,
-- Whomever created the prompt
maybe_creator_user_token VARCHAR(32) DEFAULT NULL,
-- ========== PROMPT DETAILS ==========
-- The positive prompt (optional)
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_positive_prompt TEXT DEFAULT NULL,
-- The negative prompt (optional)
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_negative_prompt TEXT DEFAULT NULL,
-- Polymorphic arguments payload that depends on the type of inference job.
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_other_args TEXT DEFAULT NULL,
-- ========== ABUSE TRACKING ==========
-- For abuse tracking.
-- Wide enough for IPv4/6
creator_ip_address VARCHAR(40) NOT NULL,
-- ========== TIMESTAMPS ==========
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token),
KEY index_maybe_creator_user_token (maybe_creator_user_token),
KEY index_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
drop table usages;
@@ -0,0 +1,46 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Usages of models and assets to create things
-- This should work for inference as well as 3D object/scene creation,
-- so the inputs can be models OR files.
CREATE TABLE usages (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- ========== PRIMARY AND FOREIGN KEYS ==========
-- Type of the entity created
-- This only denotes which table to join against, not the type of the entity within the join table.
-- Possible values:
-- * 'model_weight'
-- * 'media_file'
-- * (maybe future types)
created_type VARCHAR(16) NOT NULL,
-- Token of the entity created
created_token VARCHAR(32) NOT NULL,
-- Type of the entity used
-- This only denotes which table to join against, not the type of the entity within the join table.
-- Possible values:
-- * 'model_weight'
-- * 'media_file'
-- * (maybe future types)
used_type VARCHAR(16) NOT NULL,
-- Token of the entity used
used_token VARCHAR(32) NOT NULL,
-- ========== TIMESTAMPS ==========
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (created_type, created_token, used_type, used_token),
KEY index_created_type_and_token (created_type, created_token),
KEY index_used_type_and_token (used_type, used_token)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_files DROP COLUMN maybe_prompt_token;
@@ -0,0 +1,10 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_files
ADD COLUMN maybe_prompt_token VARCHAR(32) DEFAULT NULL
AFTER maybe_text_transcript;
ALTER TABLE media_files
ADD INDEX fk_maybe_prompt_token (maybe_prompt_token);
@@ -0,0 +1,5 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_files DROP COLUMN maybe_sample_rate;
@@ -0,0 +1,7 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
ALTER TABLE media_files
ADD COLUMN maybe_sample_rate FLOAT DEFAULT NULL
AFTER maybe_duration_millis;
@@ -17,12 +17,27 @@ CREATE TABLE generic_inference_jobs (
-- ========== INFERENCE DETAILS ==========
-- 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):
-- * text_to_speech
-- * voice_conversion
inference_category VARCHAR(32) NOT NULL,
-- 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
-- running easy database analytical queries.
@@ -57,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,
@@ -67,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
@@ -239,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),
+15
View File
@@ -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.
@@ -86,6 +90,9 @@ CREATE TABLE media_files (
-- The duration in millis, if audio or video.
maybe_duration_millis INT(10) DEFAULT NULL,
-- Frame rate for video, sampling rate for audio (if present)
maybe_sample_rate FLOAT DEFAULT NULL,
-- Audio encoder details
-- Only present if the file was audio or a video that had audio.
maybe_audio_encoding VARCHAR(32) DEFAULT NULL,
@@ -100,6 +107,12 @@ 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,
-- Optional pointer to the prompt that generated this media file, if relevant.
maybe_prompt_token VARCHAR(32) 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,7 +225,9 @@ 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 fk_maybe_prompt_token (maybe_prompt_token),
KEY index_checksum_sha2 (checksum_sha2),
KEY fk_maybe_creator_user_token (maybe_creator_user_token),
KEY fk_maybe_mod_user_token (maybe_mod_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)]
@@ -165,11 +165,15 @@ CREATE TABLE model_weights (
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token),
UNIQUE KEY unique_index_maybe_migration_old_model_token (maybe_migration_old_model_token),
KEY index_weights_type (weights_type),
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;
+59
View File
@@ -0,0 +1,59 @@
-- NB: This is a manually squashed view of all the CREATE and ALTER statements,
-- with comments attached to the fields for centralized documentation.
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Table to store prompts as a first class entity.
-- Duplication of the same prompt is totally fine.
CREATE TABLE prompts (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- ========== PRIMARY, FOREIGN KEYS, and POLYMORPHISM ==========
-- Effective "primary key" of the prompt
token VARCHAR(32) NOT NULL,
-- Original product to which the prompt applied.
-- Prompts may or may not be compatible across products.
-- Possible values:
-- * 'stable_diffusion'
-- * 'comfy_ui'
prompt_type VARCHAR(16) NOT NULL,
-- Whomever created the prompt
maybe_creator_user_token VARCHAR(32) DEFAULT NULL,
-- ========== PROMPT DETAILS ==========
-- The positive prompt (optional)
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_positive_prompt TEXT DEFAULT NULL,
-- The negative prompt (optional)
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_negative_prompt TEXT DEFAULT NULL,
-- Polymorphic arguments payload that depends on the type of inference job.
-- TEXT = 65,535 bytes (64 KiB), ~= 4 bytes per UTF-8 character, ~ 16383 characters.
maybe_other_args TEXT DEFAULT NULL,
-- ========== ABUSE TRACKING ==========
-- For abuse tracking.
-- Wide enough for IPv4/6
creator_ip_address VARCHAR(40) NOT NULL,
-- ========== TIMESTAMPS ==========
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (token),
KEY index_maybe_creator_user_token (maybe_creator_user_token),
KEY index_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -43,6 +43,7 @@ CREATE TABLE tts_models (
has_self_contained_pitch_model BOOLEAN NOT NULL DEFAULT FALSE,
-- NB(2022-07-05): THIS IS NOW MEANINGLESS AND SUPERSEDED BY `TEXT_PIPELINE_TYPE`.
-- NB(2024-01-20): All 8720 records in the database are "basic".
-- NB: DO NOT CHANGE ORDER; APPEND ONLY!
-- How text should be handled.
text_preprocessing_algorithm ENUM(
+49
View File
@@ -0,0 +1,49 @@
-- NB: This is a manually squashed view of all the CREATE and ALTER statements,
-- with comments attached to the fields for centralized documentation.
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Usages of models and assets to create things
-- This should work for inference as well as 3D object/scene creation,
-- so the inputs can be models OR files.
CREATE TABLE usages (
-- Not used for anything except replication.
id BIGINT(20) NOT NULL AUTO_INCREMENT,
-- ========== PRIMARY AND FOREIGN KEYS ==========
-- Type of the entity created
-- This only denotes which table to join against, not the type of the entity within the join table.
-- Possible values:
-- * 'model_weight'
-- * 'media_file'
-- * (maybe future types)
created_type VARCHAR(16) NOT NULL,
-- Token of the entity created
created_token VARCHAR(32) NOT NULL,
-- Type of the entity used
-- This only denotes which table to join against, not the type of the entity within the join table.
-- Possible values:
-- * 'model_weight'
-- * 'media_file'
-- * (maybe future types)
used_type VARCHAR(16) NOT NULL,
-- Token of the entity used
used_token VARCHAR(32) NOT NULL,
-- ========== TIMESTAMPS ==========
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- INDICES --
PRIMARY KEY (id),
UNIQUE KEY (created_type, created_token, used_type, used_token),
KEY index_created_type_and_token (created_type, created_token),
KEY index_used_type_and_token (used_type, used_token)
) 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
}
@@ -18,7 +18,7 @@ use strum::EnumIter;
/// Another benefit is that we'll surface all of the various types of failure and perhaps eventually
/// come to handle some in a cross-cutting way.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
/// 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)]
pub enum FrontendFailureCategory {
@@ -11,7 +11,7 @@ use strum::EnumIter;
/// Each "category" of inference is identified by the following enum variants.
/// These types are present in the HTTP API and database columns as serialized here.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
/// 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)]
pub enum InferenceCategory {
@@ -29,8 +29,20 @@ pub enum InferenceCategory {
#[serde(rename = "video_filter")]
VideoFilter,
#[serde(rename = "image_generation")]
ImageGeneration,
#[serde(rename = "mocap")]
Mocap,
#[serde(rename = "workflow")]
Workflow,
#[serde(rename = "format_conversion")]
FormatConversion,
#[serde(rename = "convert_bvh_to_workflow")]
ConvertBvhToWorkflow,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -45,7 +57,11 @@ impl InferenceCategory {
Self::TextToSpeech => "text_to_speech",
Self::VoiceConversion => "voice_conversion",
Self::VideoFilter => "video_filter",
Self::ImageGeneration => "image_generation",
Self::Mocap => "mocap",
Self::Workflow => "workflow",
Self::FormatConversion => "format_conversion",
Self::ConvertBvhToWorkflow => "convert_bvh_to_workflow",
}
}
@@ -55,7 +71,11 @@ impl InferenceCategory {
"text_to_speech" => Ok(Self::TextToSpeech),
"voice_conversion" => Ok(Self::VoiceConversion),
"video_filter" => Ok(Self::VideoFilter),
"image_generation" => Ok(Self::ImageGeneration),
"mocap" => Ok(Self::Mocap),
"workflow" => Ok(Self::Workflow),
"format_conversion" => Ok(Self::FormatConversion),
"convert_bvh_to_workflow" => Ok(Self::ConvertBvhToWorkflow),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -68,7 +88,11 @@ impl InferenceCategory {
Self::TextToSpeech,
Self::VoiceConversion,
Self::VideoFilter,
Self::ImageGeneration,
Self::Mocap,
Self::Workflow,
Self::FormatConversion,
Self::ConvertBvhToWorkflow,
])
}
}
@@ -78,47 +102,96 @@ mod tests {
use crate::by_table::generic_inference_jobs::inference_category::InferenceCategory;
use crate::test_helpers::assert_serialization;
#[test]
fn test_serialization() {
assert_serialization(InferenceCategory::LipsyncAnimation, "lipsync_animation");
assert_serialization(InferenceCategory::TextToSpeech, "text_to_speech");
assert_serialization(InferenceCategory::VoiceConversion, "voice_conversion");
assert_serialization(InferenceCategory::VideoFilter, "video_filter");
assert_serialization(InferenceCategory::Mocap, "mocap")
mod explicit_checks {
use super::*;
#[test]
fn test_serialization() {
assert_serialization(InferenceCategory::LipsyncAnimation, "lipsync_animation");
assert_serialization(InferenceCategory::TextToSpeech, "text_to_speech");
assert_serialization(InferenceCategory::VoiceConversion, "voice_conversion");
assert_serialization(InferenceCategory::VideoFilter, "video_filter");
assert_serialization(InferenceCategory::ImageGeneration, "image_generation");
assert_serialization(InferenceCategory::Mocap, "mocap");
assert_serialization(InferenceCategory::Workflow, "workflow");
assert_serialization(InferenceCategory::FormatConversion, "format_conversion");
assert_serialization(InferenceCategory::ConvertBvhToWorkflow, "convert_bvh_to_workflow");
}
#[test]
fn to_str() {
assert_eq!(InferenceCategory::LipsyncAnimation.to_str(), "lipsync_animation");
assert_eq!(InferenceCategory::TextToSpeech.to_str(), "text_to_speech");
assert_eq!(InferenceCategory::VoiceConversion.to_str(), "voice_conversion");
assert_eq!(InferenceCategory::VideoFilter.to_str(), "video_filter");
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::FormatConversion.to_str(), "format_conversion");
assert_eq!(InferenceCategory::ConvertBvhToWorkflow.to_str(), "convert_bvh_to_workflow");
}
#[test]
fn from_str() {
assert_eq!(InferenceCategory::from_str("lipsync_animation").unwrap(), InferenceCategory::LipsyncAnimation);
assert_eq!(InferenceCategory::from_str("text_to_speech").unwrap(), InferenceCategory::TextToSpeech);
assert_eq!(InferenceCategory::from_str("voice_conversion").unwrap(), InferenceCategory::VoiceConversion);
assert_eq!(InferenceCategory::from_str("video_filter").unwrap(), InferenceCategory::VideoFilter);
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("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(), 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));
assert_eq!(variants.pop_first(), Some(InferenceCategory::VideoFilter));
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::FormatConversion));
assert_eq!(variants.pop_first(), Some(InferenceCategory::ConvertBvhToWorkflow));
assert_eq!(variants.pop_first(), None);
// Generated check
use strum::IntoEnumIterator;
assert_eq!(InferenceCategory::all_variants().len(), InferenceCategory::iter().len());
}
}
#[test]
fn to_str() {
assert_eq!(InferenceCategory::LipsyncAnimation.to_str(), "lipsync_animation");
assert_eq!(InferenceCategory::TextToSpeech.to_str(), "text_to_speech");
assert_eq!(InferenceCategory::VoiceConversion.to_str(), "voice_conversion");
assert_eq!(InferenceCategory::VideoFilter.to_str(), "video_filter");
assert_eq!(InferenceCategory::Mocap.to_str(), "mocap");
}
mod mechanical_checks {
use super::*;
#[test]
fn from_str() {
assert_eq!(InferenceCategory::from_str("lipsync_animation").unwrap(), InferenceCategory::LipsyncAnimation);
assert_eq!(InferenceCategory::from_str("text_to_speech").unwrap(), InferenceCategory::TextToSpeech);
assert_eq!(InferenceCategory::from_str("voice_conversion").unwrap(), InferenceCategory::VoiceConversion);
assert_eq!(InferenceCategory::from_str("video_filter").unwrap(), InferenceCategory::VideoFilter);
assert_eq!(InferenceCategory::from_str("mocap").unwrap(), InferenceCategory::Mocap);
}
#[test]
fn variant_length() {
use strum::IntoEnumIterator;
assert_eq!(InferenceCategory::all_variants().len(), InferenceCategory::iter().len());
}
#[test]
fn all_variants() {
// Static check
let mut variants = InferenceCategory::all_variants();
assert_eq!(variants.len(), 5);
assert_eq!(variants.pop_first(), Some(InferenceCategory::LipsyncAnimation));
assert_eq!(variants.pop_first(), Some(InferenceCategory::TextToSpeech));
assert_eq!(variants.pop_first(), Some(InferenceCategory::VoiceConversion));
assert_eq!(variants.pop_first(), Some(InferenceCategory::VideoFilter));
assert_eq!(variants.pop_first(), Some(InferenceCategory::Mocap));
assert_eq!(variants.pop_first(), None);
#[test]
fn round_trip() {
for variant in InferenceCategory::all_variants() {
assert_eq!(variant, InferenceCategory::from_str(variant.to_str()).unwrap());
assert_eq!(variant, InferenceCategory::from_str(&format!("{}", variant)).unwrap());
assert_eq!(variant, InferenceCategory::from_str(&format!("{:?}", variant)).unwrap());
}
}
// Generated check
use strum::IntoEnumIterator;
assert_eq!(InferenceCategory::all_variants().len(), InferenceCategory::iter().len());
#[test]
fn serialized_length_ok_for_database() {
const MAX_LENGTH : usize = 32;
for variant in InferenceCategory::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);
}
}
}
}
@@ -7,7 +7,7 @@ use strum::EnumIter;
/// Used in the `generic_inference_jobs` table in `VARCHAR(32)` field `maybe_input_source_token`.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
/// 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)]
pub enum InferenceInputSourceTokenType {
@@ -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);
}
}
}
}
@@ -13,7 +13,7 @@ use strum::EnumIter;
///
/// These types are present in the HTTP API and database columns as serialized here.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
/// 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)]
pub enum InferenceModelType {
@@ -33,10 +33,19 @@ pub enum InferenceModelType {
VallEX,
#[serde(rename = "rerender_a_video")]
RerenderAVideo,
#[serde(rename = "stable_diffusion")]
StableDiffusion,
#[serde(rename = "mocap_net")]
MocapNet,
#[serde(rename = "comfy_ui")]
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!
@@ -54,8 +63,12 @@ impl InferenceModelType {
Self::Vits => "vits",
Self::VallEX => "vall_e_x",
Self::RerenderAVideo => "rerender_a_video",
Self::StableDiffusion => "stable_diffusion",
Self::MocapNet => "mocap_net",
Self::StyleTTS2 => "styletts2",
Self::ComfyUi => "comfy_ui",
Self::ConvertFbxToGltf => "convert_fbx_gltf",
Self::BvhToWorkflow => "bvh_to_workflow",
}
}
@@ -68,25 +81,33 @@ impl InferenceModelType {
"vits" => Ok(Self::Vits),
"vall_e_x" => Ok(Self::VallEX),
"rerender_a_video" => Ok(Self::RerenderAVideo),
"stable_diffusion" => Ok(Self::StableDiffusion),
"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::MocapNet,
InferenceModelType::StyleTTS2,
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,
])
}
}
@@ -96,63 +117,112 @@ mod tests {
use crate::by_table::generic_inference_jobs::inference_model_type::InferenceModelType;
use crate::test_helpers::assert_serialization;
#[test]
fn test_serialization() {
assert_serialization(InferenceModelType::RvcV2, "rvc_v2");
assert_serialization(InferenceModelType::SadTalker, "sad_talker");
assert_serialization(InferenceModelType::SoVitsSvc, "so_vits_svc");
assert_serialization(InferenceModelType::Tacotron2, "tacotron2");
assert_serialization(InferenceModelType::Vits, "vits");
assert_serialization(InferenceModelType::VallEX, "vall_e_x");
assert_serialization(InferenceModelType::RerenderAVideo, "rerender_a_video");
assert_serialization(InferenceModelType::MocapNet, "mocap_net");
assert_serialization(InferenceModelType::StyleTTS2, "styletts2");
mod explicit_checks {
use super::*;
#[test]
fn test_serialization() {
assert_serialization(InferenceModelType::RvcV2, "rvc_v2");
assert_serialization(InferenceModelType::SadTalker, "sad_talker");
assert_serialization(InferenceModelType::SoVitsSvc, "so_vits_svc");
assert_serialization(InferenceModelType::Tacotron2, "tacotron2");
assert_serialization(InferenceModelType::Vits, "vits");
assert_serialization(InferenceModelType::VallEX, "vall_e_x");
assert_serialization(InferenceModelType::RerenderAVideo, "rerender_a_video");
assert_serialization(InferenceModelType::StableDiffusion, "stable_diffusion");
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]
fn to_str() {
assert_eq!(InferenceModelType::RvcV2.to_str(), "rvc_v2");
assert_eq!(InferenceModelType::SadTalker.to_str(), "sad_talker");
assert_eq!(InferenceModelType::SoVitsSvc.to_str(), "so_vits_svc");
assert_eq!(InferenceModelType::Tacotron2.to_str(), "tacotron2");
assert_eq!(InferenceModelType::Vits.to_str(), "vits");
assert_eq!(InferenceModelType::VallEX.to_str(), "vall_e_x");
assert_eq!(InferenceModelType::RerenderAVideo.to_str(), "rerender_a_video");
assert_eq!(InferenceModelType::StableDiffusion.to_str(), "stable_diffusion");
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]
fn from_str() {
assert_eq!(InferenceModelType::from_str("rvc_v2").unwrap(), InferenceModelType::RvcV2);
assert_eq!(InferenceModelType::from_str("sad_talker").unwrap(), InferenceModelType::SadTalker);
assert_eq!(InferenceModelType::from_str("so_vits_svc").unwrap(), InferenceModelType::SoVitsSvc);
assert_eq!(InferenceModelType::from_str("tacotron2").unwrap(), InferenceModelType::Tacotron2);
assert_eq!(InferenceModelType::from_str("vits").unwrap(), InferenceModelType::Vits);
assert_eq!(InferenceModelType::from_str("vall_e_x").unwrap(), InferenceModelType::VallEX);
assert_eq!(InferenceModelType::from_str("rerender_a_video").unwrap(), InferenceModelType::RerenderAVideo);
assert_eq!(InferenceModelType::from_str("stable_diffusion").unwrap(), InferenceModelType::StableDiffusion);
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(), 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));
assert_eq!(variants.pop_first(), Some(InferenceModelType::Tacotron2));
assert_eq!(variants.pop_first(), Some(InferenceModelType::Vits));
assert_eq!(variants.pop_first(), Some(InferenceModelType::VallEX));
assert_eq!(variants.pop_first(), Some(InferenceModelType::RerenderAVideo));
assert_eq!(variants.pop_first(), Some(InferenceModelType::StableDiffusion));
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
use strum::IntoEnumIterator;
assert_eq!(InferenceModelType::all_variants().len(), InferenceModelType::iter().len());
}
}
mod mechanical_checks {
use super::*;
#[test]
fn to_str() {
assert_eq!(InferenceModelType::RvcV2.to_str(), "rvc_v2");
assert_eq!(InferenceModelType::SadTalker.to_str(), "sad_talker");
assert_eq!(InferenceModelType::SoVitsSvc.to_str(), "so_vits_svc");
assert_eq!(InferenceModelType::Tacotron2.to_str(), "tacotron2");
assert_eq!(InferenceModelType::Vits.to_str(), "vits");
assert_eq!(InferenceModelType::VallEX.to_str(), "vall_e_x");
assert_eq!(InferenceModelType::RerenderAVideo.to_str(), "rerender_a_video");
assert_eq!(InferenceModelType::MocapNet.to_str(), "mocap_net");
assert_eq!(InferenceModelType::StyleTTS2.to_str(), "styletts2");
}
#[test]
fn variant_length() {
use strum::IntoEnumIterator;
assert_eq!(InferenceModelType::all_variants().len(), InferenceModelType::iter().len());
}
#[test]
fn from_str() {
assert_eq!(InferenceModelType::from_str("rvc_v2").unwrap(), InferenceModelType::RvcV2);
assert_eq!(InferenceModelType::from_str("sad_talker").unwrap(), InferenceModelType::SadTalker);
assert_eq!(InferenceModelType::from_str("so_vits_svc").unwrap(), InferenceModelType::SoVitsSvc);
assert_eq!(InferenceModelType::from_str("tacotron2").unwrap(), InferenceModelType::Tacotron2);
assert_eq!(InferenceModelType::from_str("vits").unwrap(), InferenceModelType::Vits);
assert_eq!(InferenceModelType::from_str("vall_e_x").unwrap(), InferenceModelType::VallEX);
assert_eq!(InferenceModelType::from_str("rerender_a_video").unwrap(), InferenceModelType::RerenderAVideo);
assert_eq!(InferenceModelType::from_str("mocap_net").unwrap(), InferenceModelType::MocapNet);
assert_eq!(InferenceModelType::from_str("styletts2").unwrap(), InferenceModelType::StyleTTS2);
}
#[test]
fn round_trip() {
for variant in InferenceModelType::all_variants() {
assert_eq!(variant, InferenceModelType::from_str(variant.to_str()).unwrap());
assert_eq!(variant, InferenceModelType::from_str(&format!("{}", variant)).unwrap());
assert_eq!(variant, InferenceModelType::from_str(&format!("{:?}", variant)).unwrap());
}
}
#[test]
fn all_variants() {
// Static check
let mut variants = InferenceModelType::all_variants();
assert_eq!(variants.len(), 9);
assert_eq!(variants.pop_first(), Some(InferenceModelType::RvcV2));
assert_eq!(variants.pop_first(), Some(InferenceModelType::SadTalker));
assert_eq!(variants.pop_first(), Some(InferenceModelType::SoVitsSvc));
assert_eq!(variants.pop_first(), Some(InferenceModelType::Tacotron2));
assert_eq!(variants.pop_first(), Some(InferenceModelType::Vits));
assert_eq!(variants.pop_first(), Some(InferenceModelType::VallEX));
assert_eq!(variants.pop_first(), Some(InferenceModelType::RerenderAVideo));
assert_eq!(variants.pop_first(), Some(InferenceModelType::MocapNet));
assert_eq!(variants.pop_first(), Some(InferenceModelType::StyleTTS2));
assert_eq!(variants.pop_first(), None);
// Generated check
use strum::IntoEnumIterator;
assert_eq!(InferenceModelType::all_variants().len(), InferenceModelType::iter().len());
#[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);
}
}
}
}
@@ -12,7 +12,7 @@ use strum::EnumIter;
///
/// These types are present in the HTTP API and database columns as serialized here.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
/// 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)]
pub enum InferenceResultType {
@@ -29,6 +29,9 @@ pub enum InferenceResultType {
#[serde(rename = "zs_voice_embedding")]
ZeroShotVoiceEmbedding,
#[serde(rename = "upload_model")]
UploadModel
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -43,6 +46,7 @@ impl InferenceResultType {
Self::TextToSpeech => "text_to_speech",
Self::VoiceConversion => "voice_conversion",
Self::ZeroShotVoiceEmbedding => "zs_voice_embedding",
Self::UploadModel => "upload_model",
}
}
@@ -52,6 +56,7 @@ impl InferenceResultType {
"text_to_speech" => Ok(Self::TextToSpeech),
"voice_conversion" => Ok(Self::VoiceConversion),
"zs_voice_embedding" => Ok(Self::ZeroShotVoiceEmbedding),
"upload_model" => Ok(Self::UploadModel),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -64,6 +69,7 @@ impl InferenceResultType {
InferenceResultType::TextToSpeech,
InferenceResultType::VoiceConversion,
InferenceResultType::ZeroShotVoiceEmbedding,
InferenceResultType::UploadModel,
])
}
}
@@ -79,6 +85,7 @@ mod tests {
assert_serialization(InferenceResultType::TextToSpeech, "text_to_speech");
assert_serialization(InferenceResultType::VoiceConversion, "voice_conversion");
assert_serialization(InferenceResultType::ZeroShotVoiceEmbedding, "zs_voice_embedding");
assert_serialization(InferenceResultType::UploadModel, "upload_model");
}
#[test]
@@ -87,6 +94,7 @@ mod tests {
assert_eq!(InferenceResultType::TextToSpeech.to_str(), "text_to_speech");
assert_eq!(InferenceResultType::VoiceConversion.to_str(), "voice_conversion");
assert_eq!(InferenceResultType::ZeroShotVoiceEmbedding.to_str(), "zs_voice_embedding");
assert_eq!(InferenceResultType::UploadModel.to_str(), "upload_model");
}
#[test]
@@ -95,17 +103,19 @@ mod tests {
assert_eq!(InferenceResultType::from_str("text_to_speech").unwrap(), InferenceResultType::TextToSpeech);
assert_eq!(InferenceResultType::from_str("voice_conversion").unwrap(), InferenceResultType::VoiceConversion);
assert_eq!(InferenceResultType::from_str("zs_voice_embedding").unwrap(), InferenceResultType::ZeroShotVoiceEmbedding);
assert_eq!(InferenceResultType::from_str("upload_model").unwrap(), InferenceResultType::UploadModel);
}
#[test]
fn all_variants() {
// Static check
let mut variants = InferenceResultType::all_variants();
assert_eq!(variants.len(), 4);
assert_eq!(variants.len(), 5);
assert_eq!(variants.pop_first(), Some(InferenceResultType::MediaFile));
assert_eq!(variants.pop_first(), Some(InferenceResultType::TextToSpeech));
assert_eq!(variants.pop_first(), Some(InferenceResultType::VoiceConversion));
assert_eq!(variants.pop_first(), Some(InferenceResultType::ZeroShotVoiceEmbedding));
assert_eq!(variants.pop_first(), Some(InferenceResultType::UploadModel));
assert_eq!(variants.pop_first(), None);
// Generated check
@@ -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;
@@ -29,6 +29,10 @@ pub enum IdCategory {
#[serde(rename = "mocap")]
MocapResult,
// Results from workflows
#[serde(rename = "workflow")]
WorkflowResult,
/// Results from tacotron2
/// Applies for RVC and SVC
#[serde(rename = "tts_result")]
@@ -78,6 +82,7 @@ impl IdCategory {
Self::ModelWeights => "model_weights",
Self::FileUpload => "file_upload",
Self::MocapResult => "mocap",
Self::WorkflowResult => "workflow",
}
}
@@ -94,6 +99,7 @@ impl IdCategory {
"model_weights" => Ok(Self::ModelWeights),
"file_upload" => Ok(Self::FileUpload),
"mocap" => Ok(Self::MocapResult),
"workflow" => Ok(Self::WorkflowResult),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -113,6 +119,7 @@ impl IdCategory {
Self::ModelWeights,
Self::FileUpload,
Self::MocapResult,
Self::WorkflowResult,
])
}
}
@@ -138,6 +145,7 @@ mod tests {
assert_serialization(IdCategory::ModelWeights, "model_weights");
assert_serialization(IdCategory::FileUpload, "file_upload");
assert_serialization(IdCategory::MocapResult, "mocap");
assert_serialization(IdCategory::WorkflowResult, "workflow");
}
#[test]
@@ -153,6 +161,7 @@ mod tests {
assert_eq!(IdCategory::ModelWeights.to_str(), "model_weights");
assert_eq!(IdCategory::FileUpload.to_str(), "file_upload");
assert_eq!(IdCategory::MocapResult.to_str(), "mocap");
assert_eq!(IdCategory::WorkflowResult.to_str(), "workflow");
}
#[test]
@@ -168,17 +177,19 @@ mod tests {
assert_eq!(IdCategory::from_str("model_weights").unwrap(), IdCategory::ModelWeights);
assert_eq!(IdCategory::from_str("file_upload").unwrap(), IdCategory::FileUpload);
assert_eq!(IdCategory::from_str("mocap").unwrap(), IdCategory::MocapResult);
assert_eq!(IdCategory::from_str("workflow").unwrap(), IdCategory::WorkflowResult);
}
#[test]
fn all_variants() {
// Static check
let mut variants = IdCategory::all_variants();
assert_eq!(variants.len(), 11);
assert_eq!(variants.len(), 12);
assert_eq!(variants.pop_first(), Some(IdCategory::MediaFile));
assert_eq!(variants.pop_first(), Some(IdCategory::LipsyncAnimationResult));
assert_eq!(variants.pop_first(), Some(IdCategory::VideoFilterResult));
assert_eq!(variants.pop_first(), Some(IdCategory::MocapResult));
assert_eq!(variants.pop_first(), Some(IdCategory::WorkflowResult));
assert_eq!(variants.pop_first(), Some(IdCategory::TtsResult));
assert_eq!(variants.pop_first(), Some(IdCategory::VoiceConversionResult));
assert_eq!(variants.pop_first(), Some(IdCategory::ZeroShotTtsResult));
@@ -26,6 +26,9 @@ pub enum MediaFileOriginCategory {
/// User uploaded files recorded directly from their device (browser, mobile), typically using device APIs.
DeviceApi,
/// From Storyteller Studio Engine
StoryEngine,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -41,6 +44,7 @@ impl MediaFileOriginCategory {
Self::Processed => "processed",
Self::Upload => "upload",
Self::DeviceApi => "device_api",
Self::StoryEngine => "story_engine",
}
}
@@ -50,6 +54,7 @@ impl MediaFileOriginCategory {
"processed" => Ok(Self::Processed),
"upload" => Ok(Self::Upload),
"device_api" => Ok(Self::DeviceApi),
"story_engine" => Ok(Self::StoryEngine),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -62,6 +67,7 @@ impl MediaFileOriginCategory {
Self::Processed,
Self::Upload,
Self::DeviceApi,
Self::StoryEngine,
])
}
}
@@ -80,6 +86,7 @@ mod tests {
assert_serialization(MediaFileOriginCategory::Processed, "processed");
assert_serialization(MediaFileOriginCategory::Upload, "upload");
assert_serialization(MediaFileOriginCategory::DeviceApi, "device_api");
assert_serialization(MediaFileOriginCategory::StoryEngine, "story_engine");
}
#[test]
@@ -87,7 +94,7 @@ mod tests {
assert_eq!(MediaFileOriginCategory::Inference.to_str(), "inference");
assert_eq!(MediaFileOriginCategory::Processed.to_str(), "processed");
assert_eq!(MediaFileOriginCategory::Upload.to_str(), "upload");
assert_eq!(MediaFileOriginCategory::DeviceApi.to_str(), "device_api");
assert_eq!(MediaFileOriginCategory::StoryEngine.to_str(), "story_engine");
}
#[test]
@@ -96,17 +103,19 @@ mod tests {
assert_eq!(MediaFileOriginCategory::from_str("processed").unwrap(), MediaFileOriginCategory::Processed);
assert_eq!(MediaFileOriginCategory::from_str("upload").unwrap(), MediaFileOriginCategory::Upload);
assert_eq!(MediaFileOriginCategory::from_str("device_api").unwrap(), MediaFileOriginCategory::DeviceApi);
assert_eq!(MediaFileOriginCategory::from_str("story_engine").unwrap(), MediaFileOriginCategory::StoryEngine);
assert!(MediaFileOriginCategory::from_str("foo").is_err());
}
#[test]
fn all_variants() {
let mut variants = MediaFileOriginCategory::all_variants();
assert_eq!(variants.len(), 4);
assert_eq!(variants.len(), 5);
assert_eq!(variants.pop_first(), Some(MediaFileOriginCategory::Inference));
assert_eq!(variants.pop_first(), Some(MediaFileOriginCategory::Processed));
assert_eq!(variants.pop_first(), Some(MediaFileOriginCategory::Upload));
assert_eq!(variants.pop_first(), Some(MediaFileOriginCategory::DeviceApi));
assert_eq!(variants.pop_first(), Some(MediaFileOriginCategory::StoryEngine));
assert_eq!(variants.pop_first(), None);
}
}
@@ -128,5 +137,15 @@ mod tests {
assert_eq!(variant, MediaFileOriginCategory::from_str(&format!("{:?}", variant)).unwrap());
}
}
#[test]
fn serialized_length_ok_for_database() {
const MAX_LENGTH : usize = 16;
for variant in MediaFileOriginCategory::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);
}
}
}
}
@@ -39,8 +39,14 @@ pub enum MediaFileOriginModelType {
#[serde(rename = "mocap_net")]
MocapNet,
#[serde(rename = "comfy_ui")]
ComfyUi,
#[serde(rename = "styletts2")]
StyleTTS2,
#[serde(rename = "stable_diffusion_1_5")]
StableDiffusion15,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -59,7 +65,9 @@ impl MediaFileOriginModelType {
Self::VallEX => "vall_e_x",
Self::Rerender => "rerender",
Self::MocapNet => "mocap_net",
Self::ComfyUi => "comfy_ui",
Self::StyleTTS2 => "styletts2",
Self::StableDiffusion15 => "stable_diffusion_1_5"
}
}
@@ -72,7 +80,9 @@ impl MediaFileOriginModelType {
"vall_e_x" => Ok(Self::VallEX),
"rerender" => Ok(Self::Rerender),
"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)),
}
}
@@ -88,7 +98,9 @@ impl MediaFileOriginModelType {
Self::VallEX,
Self::Rerender,
Self::MocapNet,
Self::ComfyUi,
Self::StyleTTS2,
Self::StableDiffusion15
])
}
}
@@ -115,7 +127,9 @@ mod tests {
assert_eq!(MediaFileOriginModelType::VallEX.to_str(), "vall_e_x");
assert_eq!(MediaFileOriginModelType::Rerender.to_str(), "rerender");
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]
@@ -127,14 +141,16 @@ mod tests {
assert_eq!(MediaFileOriginModelType::from_str("vall_e_x").unwrap(), MediaFileOriginModelType::VallEX);
assert_eq!(MediaFileOriginModelType::from_str("rerender").unwrap(), MediaFileOriginModelType::Rerender);
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(), 8);
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));
@@ -142,7 +158,9 @@ mod tests {
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::VallEX));
assert_eq!(variants.pop_first(), Some(MediaFileOriginModelType::Rerender));
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);
}
}
@@ -46,6 +46,12 @@ pub enum MediaFileOriginProductCategory {
// Mocap
#[serde(rename = "mocap")]
Mocap,
#[serde(rename = "image_gen")]
ImageGeneration,
// Workflow
#[serde(rename = "workflow")]
Workflow,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -64,6 +70,8 @@ impl MediaFileOriginProductCategory {
Self::ZeroShotVoice => "zs_voice",
Self::VideoFilter => "video_filter",
Self::Mocap => "mocap",
Self::ImageGeneration => "image_gen",
Self::Workflow => "workflow",
}
}
@@ -76,6 +84,8 @@ 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)),
}
}
@@ -91,6 +101,8 @@ impl MediaFileOriginProductCategory {
Self::VoiceConversion,
Self::ZeroShotVoice,
Self::Mocap,
Self::ImageGeneration,
Self::Workflow,
])
}
}
@@ -111,7 +123,9 @@ mod tests {
assert_serialization(MediaFileOriginProductCategory::VoiceConversion, "voice_conversion");
assert_serialization(MediaFileOriginProductCategory::ZeroShotVoice, "zs_voice");
assert_serialization(MediaFileOriginProductCategory::VideoFilter, "video_filter");
assert_serialization(MediaFileOriginProductCategory::Mocap, "mocap")
assert_serialization(MediaFileOriginProductCategory::Mocap, "mocap");
assert_serialization(MediaFileOriginProductCategory::ImageGeneration, "image_gen");
assert_serialization(MediaFileOriginProductCategory::Workflow, "workflow");
}
#[test]
@@ -123,6 +137,8 @@ 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");
}
#[test]
@@ -134,12 +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(), 7);
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));
@@ -147,6 +165,8 @@ 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,12 +6,12 @@ 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))]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Deserialize, Serialize, ToSchema)]
#[serde(rename_all = "lowercase")]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Deserialize, Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum MediaFileType {
/// Audio files: wav, mp3, etc.
Audio,
@@ -23,7 +23,26 @@ 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,
/// Bevy's scene files (in RON; Rusty Object Notation)
/// This will be replaced with another format in future versions of Bevy
SceneRon,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
@@ -39,6 +58,11 @@ impl MediaFileType {
Self::Image => "image",
Self::Video => "video",
Self::Mocap => "mocap",
Self::Bvh => "bvh",
Self::Fbx => "fbx",
Self::Glb => "glb",
Self::Gltf => "gltf",
Self::SceneRon => "scene_ron",
}
}
@@ -48,6 +72,11 @@ 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),
"scene_ron" => Ok(Self::SceneRon),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -60,6 +89,11 @@ impl MediaFileType {
Self::Image,
Self::Video,
Self::Mocap,
Self::Bvh,
Self::Fbx,
Self::Glb,
Self::Gltf,
Self::SceneRon,
])
}
}
@@ -78,6 +112,11 @@ 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");
assert_serialization(MediaFileType::SceneRon, "scene_ron");
}
}
@@ -90,6 +129,11 @@ mod tests {
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");
assert_eq!(MediaFileType::SceneRon.to_str(), "scene_ron");
}
#[test]
@@ -98,6 +142,11 @@ 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_eq!(MediaFileType::from_str("scene_ron").unwrap(), MediaFileType::SceneRon);
assert!(MediaFileType::from_str("foo").is_err());
}
}
@@ -108,11 +157,16 @@ mod tests {
#[test]
fn all_variants() {
let mut variants = MediaFileType::all_variants();
assert_eq!(variants.len(), 4);
assert_eq!(variants.len(), 9);
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(), Some(MediaFileType::SceneRon));
assert_eq!(variants.pop_first(), None);
}
}
@@ -134,5 +188,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
View File
@@ -11,8 +11,10 @@ pub mod media_files;
pub mod media_uploads;
pub mod model_categories;
pub mod model_weights;
pub mod prompts;
pub mod trending_model_analytics;
pub mod tts_models;
pub mod usages;
pub mod user_bookmarks;
pub mod user_ratings;
pub mod voice_conversion_models;
@@ -17,6 +17,8 @@ pub enum WeightsCategory {
Vocoder,
#[serde(rename = "voice_conversion")]
VoiceConversion,
#[serde(rename = "workflow_config")]
WorkflowConfig,
}
impl WeightsCategory {
@@ -26,6 +28,7 @@ impl WeightsCategory {
Self::TextToSpeech => "text_to_speech",
Self::Vocoder => "vocoder",
Self::VoiceConversion => "voice_conversion",
Self::WorkflowConfig => "workflow_config",
}
}
@@ -35,6 +38,7 @@ impl WeightsCategory {
"text_to_speech" => Ok(Self::TextToSpeech),
"vocoder" => Ok(Self::Vocoder),
"voice_conversion" => Ok(Self::VoiceConversion),
"workflow_config" => Ok(Self::WorkflowConfig),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -45,6 +49,7 @@ impl WeightsCategory {
Self::TextToSpeech,
Self::Vocoder,
Self::VoiceConversion,
Self::WorkflowConfig,
])
}
}
@@ -62,6 +67,7 @@ mod tests {
assert_eq!(WeightsCategory::TextToSpeech.to_str(), "text_to_speech");
assert_eq!(WeightsCategory::Vocoder.to_str(), "vocoder");
assert_eq!(WeightsCategory::VoiceConversion.to_str(), "voice_conversion");
assert_eq!(WeightsCategory::WorkflowConfig.to_str(), "workflow_config");
}
#[test]
@@ -70,16 +76,18 @@ mod tests {
assert_eq!(WeightsCategory::from_str("text_to_speech").unwrap(), WeightsCategory::TextToSpeech);
assert_eq!(WeightsCategory::from_str("vocoder").unwrap(), WeightsCategory::Vocoder);
assert_eq!(WeightsCategory::from_str("voice_conversion").unwrap(), WeightsCategory::VoiceConversion);
assert_eq!(WeightsCategory::from_str("workflow_config").unwrap(), WeightsCategory::WorkflowConfig);
assert!(WeightsCategory::from_str("invalid").is_err());
}
#[test]
fn test_all_variants() {
let variants = WeightsCategory::all_variants();
assert_eq!(variants.len(), 4);
assert_eq!(variants.len(), 5);
assert!(variants.contains(&WeightsCategory::ImageGeneration));
assert!(variants.contains(&WeightsCategory::TextToSpeech));
assert!(variants.contains(&WeightsCategory::Vocoder));
assert!(variants.contains(&WeightsCategory::VoiceConversion));
assert!(variants.contains(&WeightsCategory::WorkflowConfig));
}
}
@@ -25,6 +25,8 @@ pub enum WeightsType {
LoRA,
#[serde(rename = "vall_e")]
VallE,
#[serde(rename = "comfy_ui")]
ComfyUi,
}
@@ -39,6 +41,7 @@ impl WeightsType {
Self::Tacotron2 => "tt2",
Self::LoRA => "loRA",
Self::VallE => "vall_e",
Self::ComfyUi => "comfy_ui",
}
}
@@ -52,6 +55,7 @@ impl WeightsType {
"tt2" => Ok(Self::Tacotron2),
"loRA" => Ok(Self::LoRA),
"vall_e" => Ok(Self::VallE),
"comfy_ui" => Ok(Self::ComfyUi),
_ => Err(format!("invalid value: {:?}", value)),
}
}
@@ -65,7 +69,8 @@ impl WeightsType {
Self::SoVitsSvc,
Self::Tacotron2,
Self::LoRA,
Self::VallE
Self::VallE,
Self::ComfyUi,
])
}
}
@@ -88,6 +93,7 @@ mod tests {
assert_eq!(WeightsType::Tacotron2.to_str(), "tt2");
assert_eq!(WeightsType::LoRA.to_str(), "loRA");
assert_eq!(WeightsType::VallE.to_str(), "vall_e");
assert_eq!(WeightsType::ComfyUi.to_str(), "comfy_ui");
}
#[test]
@@ -100,13 +106,14 @@ mod tests {
assert_eq!(WeightsType::from_str("tt2").unwrap(), WeightsType::Tacotron2);
assert_eq!(WeightsType::from_str("loRA").unwrap(), WeightsType::LoRA);
assert_eq!(WeightsType::from_str("vall_e").unwrap(), WeightsType::VallE);
assert_eq!(WeightsType::from_str("comfy_ui").unwrap(), WeightsType::ComfyUi);
assert!(WeightsType::from_str("invalid").is_err());
}
#[test]
fn test_all_variants() {
let variants = WeightsType::all_variants();
assert_eq!(variants.len(), 8);
assert_eq!(variants.len(), 9);
assert!(variants.contains(&WeightsType::HifiganTacotron2));
assert!(variants.contains(&WeightsType::RvcV2));
assert!(variants.contains(&WeightsType::StableDiffusion15));
@@ -115,5 +122,6 @@ mod tests {
assert!(variants.contains(&WeightsType::Tacotron2));
assert!(variants.contains(&WeightsType::LoRA));
assert!(variants.contains(&WeightsType::VallE));
assert!(variants.contains(&WeightsType::ComfyUi));
}
}
@@ -0,0 +1 @@
pub mod prompt_type;
@@ -0,0 +1,128 @@
use std::collections::BTreeSet;
#[cfg(test)]
use strum::EnumCount;
#[cfg(test)]
use strum::EnumIter;
use utoipa::ToSchema;
/// Used in the `prompts` table in a `VARCHAR(16)` field.
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
#[cfg_attr(test, derive(EnumIter, EnumCount))]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Deserialize, Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum PromptType {
/// Stable diffusion
StableDiffusion,
/// Comfy UI
ComfyUi,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
impl_enum_display_and_debug_using_to_str!(PromptType);
impl_mysql_enum_coders!(PromptType);
impl_mysql_from_row!(PromptType);
/// NB: Legacy API for older code.
impl PromptType {
pub fn to_str(&self) -> &'static str {
match self {
Self::StableDiffusion => "stable_diffusion",
Self::ComfyUi => "comfy_ui",
}
}
pub fn from_str(value: &str) -> Result<Self, String> {
match value {
"stable_diffusion" => Ok(Self::StableDiffusion),
"comfy_ui" => Ok(Self::ComfyUi),
_ => 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::StableDiffusion,
Self::ComfyUi,
])
}
}
#[cfg(test)]
mod tests {
use crate::by_table::prompts::prompt_type::PromptType;
use crate::test_helpers::assert_serialization;
mod serde {
use super::*;
#[test]
fn test_serialization() {
assert_serialization(PromptType::StableDiffusion, "stable_diffusion");
assert_serialization(PromptType::ComfyUi, "comfy_ui");
}
}
mod impl_methods {
use super::*;
#[test]
fn to_str() {
assert_eq!(PromptType::StableDiffusion.to_str(), "stable_diffusion");
assert_eq!(PromptType::ComfyUi.to_str(), "comfy_ui");
}
#[test]
fn from_str() {
assert_eq!(PromptType::from_str("stable_diffusion").unwrap(), PromptType::StableDiffusion);
assert_eq!(PromptType::from_str("comfy_ui").unwrap(), PromptType::ComfyUi);
assert!(PromptType::from_str("foo").is_err());
}
}
mod manual_variant_checks {
use super::*;
#[test]
fn all_variants() {
let mut variants = PromptType::all_variants();
assert_eq!(variants.len(), 2);
assert_eq!(variants.pop_first(), Some(PromptType::StableDiffusion));
assert_eq!(variants.pop_first(), Some(PromptType::ComfyUi));
assert_eq!(variants.pop_first(), None);
}
}
mod mechanical_checks {
use super::*;
#[test]
fn variant_length() {
use strum::IntoEnumIterator;
assert_eq!(PromptType::all_variants().len(), PromptType::iter().len());
}
#[test]
fn round_trip() {
for variant in PromptType::all_variants() {
assert_eq!(variant, PromptType::from_str(variant.to_str()).unwrap());
assert_eq!(variant, PromptType::from_str(&format!("{}", variant)).unwrap());
assert_eq!(variant, PromptType::from_str(&format!("{:?}", variant)).unwrap());
}
}
#[test]
fn serialized_length_ok_for_database() {
const MAX_LENGTH : usize = 16;
for variant in PromptType::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);
}
}
}
}
@@ -0,0 +1 @@
pub mod usages_type;
@@ -0,0 +1,128 @@
use std::collections::BTreeSet;
#[cfg(test)]
use strum::EnumCount;
#[cfg(test)]
use strum::EnumIter;
use utoipa::ToSchema;
/// Used in the `usages` table in a `VARCHAR(16)` field. (Two fields!)
///
/// DO NOT CHANGE VALUES WITHOUT A MIGRATION STRATEGY.
#[cfg_attr(test, derive(EnumIter, EnumCount))]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Deserialize, Serialize, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum UsagesType {
/// Represents a foreign key link against a model_weights record
ModelWeight,
/// Represents a foreign key link against a media_files record
MediaFile,
}
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
impl_enum_display_and_debug_using_to_str!(UsagesType);
impl_mysql_enum_coders!(UsagesType);
impl_mysql_from_row!(UsagesType);
/// NB: Legacy API for older code.
impl UsagesType {
pub fn to_str(&self) -> &'static str {
match self {
Self::ModelWeight => "model_weight",
Self::MediaFile => "media_file",
}
}
pub fn from_str(value: &str) -> Result<Self, String> {
match value {
"model_weight" => Ok(Self::ModelWeight),
"media_file" => Ok(Self::MediaFile),
_ => 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::ModelWeight,
Self::MediaFile,
])
}
}
#[cfg(test)]
mod tests {
use crate::by_table::usages::usages_type::UsagesType;
use crate::test_helpers::assert_serialization;
mod serde {
use super::*;
#[test]
fn test_serialization() {
assert_serialization(UsagesType::ModelWeight, "model_weight");
assert_serialization(UsagesType::MediaFile, "media_file");
}
}
mod impl_methods {
use super::*;
#[test]
fn to_str() {
assert_eq!(UsagesType::ModelWeight.to_str(), "model_weight");
assert_eq!(UsagesType::MediaFile.to_str(), "media_file");
}
#[test]
fn from_str() {
assert_eq!(UsagesType::from_str("model_weight").unwrap(), UsagesType::ModelWeight);
assert_eq!(UsagesType::from_str("media_file").unwrap(), UsagesType::MediaFile);
assert!(UsagesType::from_str("foo").is_err());
}
}
mod manual_variant_checks {
use super::*;
#[test]
fn all_variants() {
let mut variants = UsagesType::all_variants();
assert_eq!(variants.len(), 2);
assert_eq!(variants.pop_first(), Some(UsagesType::ModelWeight));
assert_eq!(variants.pop_first(), Some(UsagesType::MediaFile));
assert_eq!(variants.pop_first(), None);
}
}
mod mechanical_checks {
use super::*;
#[test]
fn variant_length() {
use strum::IntoEnumIterator;
assert_eq!(UsagesType::all_variants().len(), UsagesType::iter().len());
}
#[test]
fn round_trip() {
for variant in UsagesType::all_variants() {
assert_eq!(variant, UsagesType::from_str(variant.to_str()).unwrap());
assert_eq!(variant, UsagesType::from_str(&format!("{}", variant)).unwrap());
assert_eq!(variant, UsagesType::from_str(&format!("{:?}", variant)).unwrap());
}
}
#[test]
fn serialized_length_ok_for_database() {
const MAX_LENGTH : usize = 16;
for variant in UsagesType::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
View File
@@ -34,6 +34,7 @@ pub(crate) enum TokenPrefix {
ModelWeight,
NewsStory, // NB: aichatbot / sqlite
PasswordReset,
Prompt,
TtsRenderTask, // NB: aichatbot / sqlite
User,
UserBookmark,
@@ -101,6 +102,7 @@ impl PrefixGenerator for TokenPrefix {
Self::ModelWeight => "weight_",
Self::NewsStory => "news_story_",
Self::PasswordReset => "pw_reset_",
Self::Prompt => "prompt_",
Self::TtsRenderTask => "tts_task_",
Self::User => "user_", // NB: Previously "U:"
Self::UserBookmark => "ub_",
@@ -6,7 +6,7 @@ use utoipa::ToSchema;
use crate::prefixes::TokenPrefix;
/// The primary key for Audit Logs.
/// The primary key for Media Files
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize, ToSchema)]
#[sqlx(transparent)]
pub struct MediaFileToken(pub String);
+1
View File
@@ -13,6 +13,7 @@ pub mod media_uploads;
pub mod model_categories;
pub mod model_weights;
pub mod password_reset;
pub mod prompts;
pub mod sqlite;
pub mod tts_inference_jobs;
pub mod tts_model_upload_jobs;
@@ -0,0 +1,15 @@
use std::fmt::Debug;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;
use crate::prefixes::TokenPrefix;
/// The primary key for Prompts
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, sqlx::Type, Debug, Serialize, Deserialize, ToSchema)]
#[sqlx(transparent)]
pub struct PromptToken(pub String);
impl_string_token!(PromptToken);
impl_crockford_generator!(PromptToken, 32usize, TokenPrefix::Prompt, CrockfordLower);
@@ -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);

Some files were not shown because too many files have changed in this diff Show More