mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-08 11:24:14 +00:00
sync
This commit is contained in:
parent
8a5a585954
commit
e7bad4a3c3
@ -656,7 +656,7 @@ class LollmsApplication(LoLLMsCom):
|
||||
|
||||
if self.config.active_ttm_service:
|
||||
def start_ttm(*args, **kwargs):
|
||||
self.ttv = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"ttv", self.config.active_ttm_service)
|
||||
self.ttv = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"ttm", self.config.active_ttm_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTM services", start_ttm, ASCIIColors.color_blue)
|
||||
print("OK")
|
||||
|
||||
@ -690,26 +690,31 @@ class LollmsApplication(LoLLMsCom):
|
||||
trace_exception(ex)
|
||||
self.warning(f"Couldn't load vllm")
|
||||
|
||||
|
||||
def start_tti(*args, **kwargs):
|
||||
self.tti = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"tti", self.config.active_tti_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTI services", start_tti, ASCIIColors.color_blue)
|
||||
if self.config.active_tti_service:
|
||||
def start_tti(*args, **kwargs):
|
||||
self.tti = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"tti", self.config.active_tti_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTI services", start_tti, ASCIIColors.color_blue)
|
||||
|
||||
|
||||
def start_stt(*args, **kwargs):
|
||||
self.stt = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"stt", self.config.active_stt_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal STT services", start_stt, ASCIIColors.color_blue)
|
||||
if self.config.active_stt_service:
|
||||
def start_stt(*args, **kwargs):
|
||||
self.stt = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"stt", self.config.active_stt_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal STT services", start_stt, ASCIIColors.color_blue)
|
||||
|
||||
def start_tts(*args, **kwargs):
|
||||
self.tts = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"tts", self.config.active_tts_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal STT services", start_tts, ASCIIColors.color_blue)
|
||||
if self.config.active_tts_service:
|
||||
def start_tts(*args, **kwargs):
|
||||
self.tts = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"tts", self.config.active_tts_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal STT services", start_tts, ASCIIColors.color_blue)
|
||||
|
||||
if self.config.active_ttm_service:
|
||||
def start_ttm(*args, **kwargs):
|
||||
self.ttv = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"ttm", self.config.active_ttm_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTM services", start_ttm, ASCIIColors.color_blue)
|
||||
|
||||
def start_ttv(*args, **kwargs):
|
||||
self.ttv = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"ttv", self.config.active_ttv_service)
|
||||
|
||||
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTV services", start_ttv, ASCIIColors.color_blue)
|
||||
if self.config.active_ttv_service:
|
||||
def start_ttv(*args, **kwargs):
|
||||
self.ttv = self.load_service_from_folder(self.lollms_paths.services_zoo_path/"ttv", self.config.active_ttv_service)
|
||||
ASCIIColors.execute_with_animation("Loading loacal TTV services", start_ttv, ASCIIColors.color_blue)
|
||||
print("OK")
|
||||
|
||||
|
||||
|
0
lollms/services/ttm/musicgen/config.yaml
Normal file
0
lollms/services/ttm/musicgen/config.yaml
Normal file
@ -12,6 +12,9 @@ from pathlib import Path
|
||||
from typing import List, Dict
|
||||
from lollms.ttm import LollmsTTM
|
||||
from lollms.utilities import PackageManager, File_Path_Generator, check_and_install_torch
|
||||
import pipmaster as pm
|
||||
pm.install_if_missing("audiocraft")
|
||||
from audiocraft.models import musicgen
|
||||
|
||||
class LollmsMusicGen(LollmsTTM):
|
||||
"""
|
||||
@ -49,16 +52,13 @@ class LollmsMusicGen(LollmsTTM):
|
||||
self.model = model
|
||||
self.api_key = api_key
|
||||
self.output_path = output_path
|
||||
if not PackageManager.check_package_installed("musicgen"):
|
||||
check_and_install_torch(True if device=="cuda" else False)
|
||||
PackageManager.install_or_update("musicgen")
|
||||
|
||||
from audiocraft.models import musicgen
|
||||
self.music_model = musicgen.MusicGen.get_pretrained(model, device=device)
|
||||
|
||||
self.models = [] # To be filled by the child class
|
||||
self.ready = True
|
||||
|
||||
def settings_updated(self):
|
||||
pass
|
||||
def generate(self,
|
||||
positive_prompt: str,
|
||||
negative_prompt: str = "",
|
Loading…
x
Reference in New Issue
Block a user