Merge pull request #8 from vipcxj/master

fix tensor not in same device error
pull/21/head
jingyaogong 2026-05-11 22:49:48 +08:00 committed by GitHub
commit af06c632ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -486,7 +486,7 @@ def init_model(args):
au = torch.full((1, 8, 3), 2049, dtype=torch.long, device=args.device)
M['model'].forward(torch.cat((au, ids.unsqueeze(1)), dim=1))
if M['model'].audio_encoder: M['model'].audio_encoder(torch.zeros(1, 100, 560, device=args.device), torch.tensor([100], device=args.device))
if M['mimi']: M['mimi'].decode(torch.zeros(1, 8, 1, dtype=torch.long))
if M['mimi']: M['mimi'].decode(torch.zeros(1, 8, 1, dtype=torch.long, device=args.device))
print('Warmup done!')