Keep YuE2 jobs live on the bench and wire target length to semantic tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-15 20:53:07 -05:00
co-authored by Cursor
parent 2ebc3066e6
commit 5694104226
13 changed files with 92 additions and 29 deletions
+6
View File
@@ -32,6 +32,12 @@ class WorkerTests(unittest.TestCase):
self.assertNotEqual(attention, 'flash')
self.assertTrue(os.environ.get('PYTORCH_CUDA_ALLOC_CONF', '').startswith('expandable_segments'))
def test_target_length_maps_to_semantic_max_tokens(self):
# 48000 / 1920 = 25 latent frames per second.
self.assertEqual(max(200, min(9000, 30 * 25)), 750)
self.assertEqual(max(200, min(9000, 15 * 25)), 375)
self.assertEqual(max(200, min(9000, 150 * 25)), 3750)
def test_cuda_oom_detection(self):
self.assertTrue(worker.is_cuda_oom(RuntimeError('CUDA out of memory. Tried to allocate 2.49 GiB')))
self.assertFalse(worker.is_cuda_oom(RuntimeError('bad lyrics')))