mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-15 06:36:32 +00:00
fixed installation of modules
This commit is contained in:
parent
65a5b08e4b
commit
11f823bb8a
@ -11,7 +11,7 @@ import sys
|
||||
from lollms.app import LollmsApplication
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.config import TypedConfig, ConfigTemplate, BaseConfig
|
||||
from lollms.utilities import get_conda_path
|
||||
from lollms.utilities import get_conda_path, show_yes_no_dialog
|
||||
import time
|
||||
import io
|
||||
import sys
|
||||
@ -48,7 +48,7 @@ def install_motion_ctrl(lollms_app:LollmsApplication):
|
||||
shared_folder = root_dir/"shared"
|
||||
motion_ctrl_folder = shared_folder / "auto_motion_ctrl"
|
||||
if motion_ctrl_folder.exists():
|
||||
if not lollms_app.YesNoMessage("I have detected that there is a previous installation of stable diffusion.\nShould I remove it and continue installing?"):
|
||||
if not show_yes_no_dialog("warning!","I have detected that there is a previous installation of motion ctrl.\nShould I remove it and continue installing?"):
|
||||
return
|
||||
else:
|
||||
motion_ctrl_folder.unlink(True)
|
||||
|
@ -28,7 +28,7 @@ from typing import List, Dict, Any
|
||||
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.utilities import git_pull
|
||||
from lollms.utilities import git_pull, show_yes_no_dialog
|
||||
import subprocess
|
||||
import platform
|
||||
|
||||
@ -46,7 +46,7 @@ def install_ollama(lollms_app:LollmsApplication):
|
||||
if platform.system() == 'Windows':
|
||||
root_path = "/mnt/"+"".join(str(Path(__file__).parent).replace("\\","/").split(":"))
|
||||
if not os.path.exists('C:\\Windows\\System32\\wsl.exe'):
|
||||
if not lollms_app.YesNoMessage("No WSL is detected on your system. Do you want me to install it for you? Ollama won't be abble to work without wsl."):
|
||||
if not show_yes_no_dialog("warning!","No WSL is detected on your system. Do you want me to install it for you? Ollama won't be abble to work without wsl."):
|
||||
return False
|
||||
subprocess.run(['wsl', '--install', 'Ubuntu'])
|
||||
subprocess.run(['wsl', 'bash', '-c', 'cp {} ~'.format( root_path + '/install_ollama.sh')])
|
||||
|
@ -29,7 +29,7 @@ from typing import List, Dict, Any
|
||||
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.utilities import git_pull
|
||||
from lollms.utilities import git_pull, show_yes_no_dialog
|
||||
import subprocess
|
||||
import platform
|
||||
|
||||
@ -47,7 +47,7 @@ def install_petals(lollms_app:LollmsApplication):
|
||||
if platform.system() == 'Windows':
|
||||
root_path = "/mnt/"+"".join(str(Path(__file__).parent).replace("\\","/").split(":"))
|
||||
if not os.path.exists('C:\\Windows\\System32\\wsl.exe'):
|
||||
if not lollms_app.YesNoMessage("No WSL is detected on your system. Do you want me to install it for you? petals won't be abble to work without wsl."):
|
||||
if not show_yes_no_dialog("warning!","No WSL is detected on your system. Do you want me to install it for you? petals won't be abble to work without wsl."):
|
||||
return False
|
||||
subprocess.run(['wsl', '--install', 'Ubuntu'])
|
||||
subprocess.run(['wsl', 'bash', '-c', 'cp {} ~'.format( root_path + '/install_petals.sh')])
|
||||
|
@ -28,7 +28,7 @@ from typing import List, Dict, Any
|
||||
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.utilities import git_pull
|
||||
from lollms.utilities import git_pull, show_yes_no_dialog
|
||||
import subprocess
|
||||
|
||||
|
||||
@ -52,13 +52,13 @@ def install_sd(lollms_app:LollmsApplication):
|
||||
shared_folder = root_dir/"shared"
|
||||
sd_folder = shared_folder / "auto_sd"
|
||||
if sd_folder.exists():
|
||||
if not lollms_app.YesNoMessage("I have detected that there is a previous installation of stable diffusion.\nShould I remove it and continue installing?"):
|
||||
if not show_yes_no_dialog("warning!","I have detected that there is a previous installation of stable diffusion.\nShould I remove it and continue installing?"):
|
||||
return
|
||||
else:
|
||||
sd_folder.unlink(True)
|
||||
subprocess.run(["git", "clone", "https://github.com/ParisNeo/stable-diffusion-webui.git", str(sd_folder)])
|
||||
subprocess.run(["git", "clone", "https://github.com/ParisNeo/SD-CN-Animation.git", str(sd_folder/"extensions/SD-CN-Animation")])
|
||||
if lollms_app.YesNoMessage("Do you want to install a model from civitai?\nIsuggest dreamshaper xl."):
|
||||
if show_yes_no_dialog("warning!","Do you want to install a model from civitai?\nIsuggest dreamshaper xl."):
|
||||
download_file("https://civitai.com/api/download/models/351306", sd_folder/"models/Stable-diffusion","dreamshaperXL_v21TurboDPMSDE.safetensors")
|
||||
ASCIIColors.green("Stable diffusion installed successfully")
|
||||
|
||||
|
@ -29,7 +29,7 @@ from typing import List, Dict, Any
|
||||
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.utilities import git_pull
|
||||
from lollms.utilities import git_pull, show_yes_no_dialog
|
||||
import subprocess
|
||||
import platform
|
||||
|
||||
@ -48,7 +48,7 @@ def install_vllm(lollms_app:LollmsApplication):
|
||||
if platform.system() == 'Windows':
|
||||
root_path = "/mnt/"+"".join(str(Path(__file__).parent).replace("\\","/").split(":"))
|
||||
if not os.path.exists('C:\\Windows\\System32\\wsl.exe'):
|
||||
if not lollms_app.YesNoMessage("No WSL is detected on your system. Do you want me to install it for you? vLLM won't be abble to work without wsl."):
|
||||
if not show_yes_no_dialog("No WSL is detected on your system. Do you want me to install it for you? vLLM won't be abble to work without wsl."):
|
||||
return False
|
||||
subprocess.run(['wsl', '--install', 'Ubuntu'])
|
||||
subprocess.run(['wsl', 'bash', '-c', 'cp {} ~'.format( root_path + '/install_vllm.sh')])
|
||||
|
@ -29,7 +29,7 @@ from typing import List, Dict, Any
|
||||
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
from lollms.paths import LollmsPaths
|
||||
from lollms.utilities import git_pull
|
||||
from lollms.utilities import git_pull, show_yes_no_dialog
|
||||
import subprocess
|
||||
import platform
|
||||
|
||||
@ -45,7 +45,7 @@ def install_xtts(lollms_app:LollmsApplication):
|
||||
shared_folder = root_dir/"shared"
|
||||
xtts_folder = shared_folder / "xtts"
|
||||
if xtts_folder.exists() and PackageManager.check_package_installed("xtts-api-server"):
|
||||
if not lollms_app.YesNoMessage("It looks like xtts is already installed on your system.\nDo you want to reinstall it?"):
|
||||
if not show_yes_no_dialog("warning!","It looks like xtts is already installed on your system.\nDo you want to reinstall it?"):
|
||||
lollms_app.error("Service installation canceled")
|
||||
return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user