lollms-webui/scripts/python/sd_server.py

29 lines
1.2 KiB
Python
Raw Normal View History

2024-12-19 12:48:57 +00:00
import subprocess
2023-12-31 14:42:34 +00:00
from pathlib import Path
2024-12-19 12:48:57 +00:00
2023-12-31 14:42:34 +00:00
from ascii_colors import ASCIIColors
2024-12-19 12:48:57 +00:00
from lollms.paths import LollmsPaths
2023-12-31 14:42:34 +00:00
2024-12-19 12:48:57 +00:00
global_path = Path(__file__).parent.parent.parent / "global_paths_cfg.yaml"
2023-12-31 14:42:34 +00:00
ASCIIColors.yellow(f"global_path: {global_path}")
lollms_paths = LollmsPaths(global_path)
2024-12-19 12:48:57 +00:00
shared_folder = lollms_paths.personal_path / "shared"
2023-12-31 14:42:34 +00:00
sd_folder = shared_folder / "auto_sd"
output_dir = lollms_paths.personal_path / "outputs/sd"
output_dir.mkdir(parents=True, exist_ok=True)
script_path = sd_folder / "lollms_sd.bat"
2024-12-19 12:48:57 +00:00
output_folder = lollms_paths.personal_outputs_path / "audio_out"
2023-12-31 14:42:34 +00:00
ASCIIColors.red(" ")
ASCIIColors.red(" __ _____ __ __ _____ _____ _____ ____ ")
ASCIIColors.red("| | | | | | | | | __| | __| \ ")
ASCIIColors.red("| |__| | | |__| |__| | | |__ | |__ | | |")
ASCIIColors.red("|_____|_____|_____|_____|_|_|_|_____|_____|_____|____/ ")
ASCIIColors.red(" |_____| ")
ASCIIColors.red(" Forked from Auto1111's Stable diffusion api")
ASCIIColors.red(" Integration in lollms by ParisNeo using mix1009's sdwebuiapi ")
2024-12-19 12:48:57 +00:00
subprocess.Popen(str(script_path) + " --share", cwd=sd_folder)