mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-10 20:29:54 +00:00
fixed builds
This commit is contained in:
parent
8b7edf241c
commit
6b258468d0
@ -471,6 +471,8 @@ def select_personality(data:PersonalitySelectionInfos):
|
||||
if id<len(lollmsElfServer.mounted_personalities):
|
||||
lollmsElfServer.config["active_personality_id"]=id
|
||||
lollmsElfServer.personality:AIPersonality = lollmsElfServer.mounted_personalities[lollmsElfServer.config["active_personality_id"]]
|
||||
if lollmsElfServer.personality is None:
|
||||
return {"status": False, "error":"Something is wrong with the personality"}
|
||||
if lollmsElfServer.personality.processor:
|
||||
lollmsElfServer.personality.processor.selected()
|
||||
ASCIIColors.success("ok")
|
||||
|
@ -441,12 +441,12 @@ def reinstall_pytorch_with_cuda():
|
||||
ASCIIColors.error(ex)
|
||||
try:
|
||||
ASCIIColors.info("Installing pytorch 2.1.1")
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir", "--index-url", "https://download.pytorch.org/whl/cu121"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir", "--index-url", "https://download.pytorch.org/whl/cu121"])
|
||||
except Exception as ex:
|
||||
ASCIIColors.error(ex)
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.warning("Couldn't find Cuda build tools on your PC. Reverting to CPU.")
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.error("Couldn't install pytorch !!")
|
||||
else:
|
||||
@ -454,10 +454,10 @@ def reinstall_pytorch_with_cuda():
|
||||
|
||||
|
||||
def reinstall_pytorch_with_rocm():
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir", "--index-url", "https://download.pytorch.org/whl/rocm5.6"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir", "--index-url", "https://download.pytorch.org/whl/rocm5.6"])
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.warning("Couldn't find Cuda build tools on your PC. Reverting to CPU.")
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.error("Couldn't install pytorch !!")
|
||||
else:
|
||||
@ -466,10 +466,10 @@ def reinstall_pytorch_with_rocm():
|
||||
|
||||
|
||||
def reinstall_pytorch_with_cpu():
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.warning("Couldn't find Cuda build tools on your PC. Reverting to CPU.")
|
||||
result = subprocess.run(["pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
result = subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "torch", "torchvision", "torchaudio", "--no-cache-dir"])
|
||||
if result.returncode != 0:
|
||||
ASCIIColors.error("Couldn't install pytorch !!")
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user