Keep YuE2 native AR NAR VAE weights resident and eagerly load
This commit is contained in:
1 parent
2d709a9334
commit
f5bff22ad0
8 files changed
+34
-4
No files matched your search
@@ -27,7 +27,7 @@ class AudioCppRuntime(LTXOriginalRuntime):
|
||||
return self.root/'missing-cli',self.root/'missing-source'
|
||||
def status(self):
|
||||
cli,source=self.paths()
|
||||
return dict(installed=cli.is_file() and (source/'model_specs/yue2.json').is_file(),revision=REVISION,version=VERSION,job=dict(self.job) if self.job else None,required_disk_gib=6,adapter_ready=True,origin='0xShug0/audio.cpp',message='Gemeinsame Laufzeit. Ein Build startet kein Modell; Der YuE2-Musikworker ist angebunden; Profil und Komponenten werden benötigt. Andere Familien brauchen eigene geprüfte Anbindungen.')
|
||||
return dict(installed=cli.is_file() and (source/'model_specs/yue2.json').is_file(),revision=REVISION,version=VERSION,resident_weights=(source/'src/models/yue2/session.cpp').is_file() and 'DECK_YUE2_RESIDENCY_V1' in (source/'src/models/yue2/session.cpp').read_text(),job=dict(self.job) if self.job else None,required_disk_gib=6,adapter_ready=True,origin='0xShug0/audio.cpp',message='Gemeinsame Laufzeit. Ein Build startet kein Modell; Der YuE2-Musikworker ist angebunden; Profil und Komponenten werden benötigt. Andere Familien brauchen eigene geprüfte Anbindungen.')
|
||||
def start(self):
|
||||
if sys.platform!='linux':raise ValueError('audio.cpp wird auf dem Debian-Server gebaut.')
|
||||
missing=[name for name in ('git','cmake','g++','nvcc','nvidia-smi') if not shutil.which(name)]
|
||||
@@ -50,6 +50,8 @@ class AudioCppRuntime(LTXOriginalRuntime):
|
||||
self._command(['git','-C',source,'fetch','--depth','1','https://github.com/0xShug0/audio.cpp.git',REVISION],env)
|
||||
self._command(['git','-C',source,'checkout','--detach','FETCH_HEAD'],env)
|
||||
else:self._command(['git','-C',source,'rev-parse','--verify',REVISION+'^{commit}'],env)
|
||||
from deploy.patch_yue2_residency import patch
|
||||
patch(source)
|
||||
# Compile for the actual available GPUs; no weight allocation or inference.
|
||||
import subprocess
|
||||
raw=subprocess.check_output(['nvidia-smi','--query-gpu=compute_cap','--format=csv,noheader'],text=True)
|
||||
|
||||
Reference in new issue
Block a user