mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-01-11 21:10:40 +01:00
Fix GPTQ fail message not being shown on update (#103)
This commit is contained in:
parent
11a8fd1eb9
commit
4df3f72753
9
webui.py
9
webui.py
@ -219,16 +219,17 @@ def update_dependencies():
|
|||||||
if os.path.exists('setup_cuda.py'):
|
if os.path.exists('setup_cuda.py'):
|
||||||
os.rename("setup_cuda.py", "setup.py")
|
os.rename("setup_cuda.py", "setup.py")
|
||||||
|
|
||||||
run_cmd("python -m pip install .", environment=True)
|
build_gptq = run_cmd("python -m pip install .", environment=True).returncode == 0
|
||||||
|
|
||||||
# Wheel installation can fail while in the build directory of a package with the same name
|
# Wheel installation can fail while in the build directory of a package with the same name
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
|
|
||||||
# If the path does not exist, then the install failed
|
# If the path does not exist, then the install failed
|
||||||
quant_cuda_path_regex = os.path.join(site_packages_path, "quant_cuda*/")
|
quant_cuda_path_regex = os.path.join(site_packages_path, "quant_cuda*/")
|
||||||
if not glob.glob(quant_cuda_path_regex):
|
quant_cuda_path = glob.glob(quant_cuda_path_regex)
|
||||||
|
if not build_gptq:
|
||||||
# Attempt installation via alternative, Windows/Linux-specific method
|
# Attempt installation via alternative, Windows/Linux-specific method
|
||||||
if sys.platform.startswith("win") or sys.platform.startswith("linux"):
|
if (sys.platform.startswith("win") or sys.platform.startswith("linux")) and not quant_cuda_path:
|
||||||
print_big_message("WARNING: GPTQ-for-LLaMa compilation failed, but this is FINE and can be ignored!\nThe installer will proceed to install a pre-compiled wheel.")
|
print_big_message("WARNING: GPTQ-for-LLaMa compilation failed, but this is FINE and can be ignored!\nThe installer will proceed to install a pre-compiled wheel.")
|
||||||
url = "https://github.com/jllllll/GPTQ-for-LLaMa-Wheels/raw/main/quant_cuda-0.0.0-cp310-cp310-win_amd64.whl"
|
url = "https://github.com/jllllll/GPTQ-for-LLaMa-Wheels/raw/main/quant_cuda-0.0.0-cp310-cp310-win_amd64.whl"
|
||||||
if sys.platform.startswith("linux"):
|
if sys.platform.startswith("linux"):
|
||||||
@ -239,6 +240,8 @@ def update_dependencies():
|
|||||||
print("Wheel installation success!")
|
print("Wheel installation success!")
|
||||||
else:
|
else:
|
||||||
print("ERROR: GPTQ wheel installation failed. You will not be able to use GPTQ-based models.")
|
print("ERROR: GPTQ wheel installation failed. You will not be able to use GPTQ-based models.")
|
||||||
|
elif quant_cuda_path:
|
||||||
|
print_big_message("WARNING: GPTQ-for-LLaMa compilation failed, but this is FINE and can be ignored!\nquant_cuda has already been installed.")
|
||||||
else:
|
else:
|
||||||
print("ERROR: GPTQ CUDA kernel compilation failed.")
|
print("ERROR: GPTQ CUDA kernel compilation failed.")
|
||||||
print("You will not be able to use GPTQ-based models.")
|
print("You will not be able to use GPTQ-based models.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user