fix installer nightly

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-04-18 13:21:13 -04:00
parent 75756ac6ea
commit 80a6b3aafc
3 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -571,7 +571,7 @@ def install_cuda():
log.info('CUDA: nVidia toolkit detected')
ts('cuda', t_start)
if args.use_nightly:
cmd = os.environ.get('TORCH_COMMAND', 'pip install --upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 --extra-index-url https://download.pytorch.org/whl/nightly/cu126')
cmd = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 --extra-index-url https://download.pytorch.org/whl/nightly/cu126')
else:
cmd = os.environ.get('TORCH_COMMAND', 'torch==2.6.0+cu126 torchvision==0.21.0+cu126 --index-url https://download.pytorch.org/whl/cu126')
return cmd
+8 -5
View File
@@ -1,7 +1,7 @@
# MIT-Han-Lab Nunchaku: <https://github.com/mit-han-lab/nunchaku>
# TODO nunchaku: cache-dir for transformer and t5 loader
# TODO nunchaku: batch support
# TODO nunchaku: LoRA support
from installer import log, pip
from modules import devices
@@ -31,6 +31,7 @@ def install_nunchaku():
if devices.backend is None:
return False # too early
if not check():
import os
import sys
import platform
import importlib
@@ -51,11 +52,13 @@ def install_nunchaku():
if torch_ver not in ['2.5', '2.6', '2.7', '2.8']:
log.error(f'Nunchaku: torch={torch.__version__} unsupported')
suffix = 'x86_64' if arch == 'linux' else 'win_amd64'
url = f'https://huggingface.co/mit-han-lab/nunchaku/resolve/main/nunchaku-{ver}'
url += f'+torch{torch_ver}-cp{python_ver}-cp{python_ver}-{arch}_{suffix}.whl'
cmd = f'install --upgrade {url}'
cmd = os.environ.get('NUNCHAKU_COMMAND', None)
if cmd is None:
url = f'https://huggingface.co/mit-han-lab/nunchaku/resolve/main/nunchaku-{ver}'
url += f'+torch{torch_ver}-cp{python_ver}-cp{python_ver}-{arch}_{suffix}.whl'
cmd = f'install --upgrade {url}'
# pip install https://huggingface.co/mit-han-lab/nunchaku/resolve/main/nunchaku-0.2.0+torch2.6-cp311-cp311-linux_x86_64.whl
log.debug(f'Nunchaku: url={url}')
log.debug(f'Nunchaku: install="{url}"')
pip(cmd, ignore=False, uv=False)
importlib.reload(pkg_resources)
if not check():
+1 -1
Submodule wiki updated: 7311b73156...7c7a9ffdc9