Add exclusive music GPU mode beside LLM and video
This commit is contained in:
@@ -127,6 +127,7 @@ class Server(ThreadingHTTPServer):
|
||||
self.ltx_original_runtime=LTXOriginalRuntime(self.catalog.root.parent/'ltx-original-runtime',self.image_runtime)
|
||||
self.video=VideoRuntimes(self.scheduler,stop_gpu_work,self.docker,self.catalog.root.parent/'video',self.catalog,self.profiles,self.image_runtime,original_runtime=self.ltx_original_runtime)
|
||||
self.endpoint.video=self.video
|
||||
self.video.music_profiles=lambda:[dict(id=p['id'],name=p['name']) for p in self.endpoint.rows() if p['kind']=='music' and p['enabled'] and p['runnable']]
|
||||
self.profiles.video_runtime_ready=lambda:self.image_runtime.status().get("installed",False)
|
||||
from dashboard_data import Dashboard
|
||||
self.dashboard=Dashboard(self,self.catalog.root.parent)
|
||||
@@ -520,7 +521,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
data=self.read_json()
|
||||
if self.path.endswith('/runtime') and set(data)=={'runtime'}:return self.respond(self.server.video.select_runtime(data['runtime']))
|
||||
if self.path.endswith('/service') and set(data)=={'id'}:return self.respond(self.server.video.select(data['id']))
|
||||
if set(data)!={'mode'}:raise ValueError('Nur Modus llm oder video erwartet.')
|
||||
if set(data)!={'mode'}:raise ValueError('Nur Modus llm, video oder music erwartet.')
|
||||
return self.respond(self.server.video.switch(data['mode']))
|
||||
except (OSError,ValueError) as exc:return self.respond({'error':str(exc)},400)
|
||||
if self.path in ('/api/v1/endpoint/start','/api/v1/endpoint/stop','/api/v1/endpoint/config','/api/v1/endpoint/profile'):
|
||||
|
||||
Reference in New Issue
Block a user