This commit is contained in:
Saifeddine ALOUI 2025-03-07 09:56:49 +01:00
parent 1ac42e04fb
commit 0385bacebf
3 changed files with 8 additions and 9 deletions

View File

@ -30,6 +30,7 @@ from lollms.utilities import PackageManager, find_next_available_filename
from lollms.tts import LollmsTTS
import subprocess
import shutil
from pathlib import Path
from tqdm import tqdm
import threading
from io import BytesIO
@ -53,7 +54,7 @@ class LollmsOpenAITTS(LollmsTTS):
def __init__(
self,
app:LollmsApplication,
output_folder=None
output_folder:str|Path=None
):
"""
Initializes the LollmsDalle binding.

View File

@ -64,7 +64,7 @@ class LollmsXTTS(LollmsTTS):
def __init__(
self,
app:LollmsApplication,
output_folder=None
output_folder:str|Path=None
):
"""
Initializes the LollmsDalle binding.

View File

@ -17,7 +17,7 @@ class LollmsNovitaAITextToVideo(LollmsTTV):
def __init__(
self,
app:LollmsApplication,
output_folder:str|Path
output_folder:str|Path=None
):
"""
Initializes the NovitaAITextToVideo binding.
@ -94,6 +94,8 @@ class LollmsNovitaAITextToVideo(LollmsTTV):
"""
if model_name=="":
model_name = self.model_name
if output_dir is None:
output_dir = self.output_folder
url = f"{self.base_url}/txt2video"
headers = {
"Authorization": f"Bearer {self.service_config.api_key}",
@ -148,12 +150,8 @@ class LollmsNovitaAITextToVideo(LollmsTTV):
output_dir = Path(output_dir)
file_name = output_dir/find_next_available_filename(output_dir, "vid_novita_") # You can change the filename if needed
self.download_video(infos["videos"][0]["video_url"], file_name )
else:
file_name = self.app.personality.personality_output_folder/find_next_available_filename(output_dir, "vid_novita_") # You can change the filename if needed
self.download_video(infos["videos"][0]["video_url"], self.app.personality.personality_output_folder/"video_{}.mp4" )
return infos
return file_name
return None
def settings_updated(self):
pass