mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-13 22:02:56 +00:00
fix
This commit is contained in:
parent
1ac42e04fb
commit
0385bacebf
@ -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.
|
||||
|
@ -64,7 +64,7 @@ class LollmsXTTS(LollmsTTS):
|
||||
def __init__(
|
||||
self,
|
||||
app:LollmsApplication,
|
||||
output_folder=None
|
||||
output_folder:str|Path=None
|
||||
):
|
||||
"""
|
||||
Initializes the LollmsDalle binding.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user