update requirements

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-05-06 09:47:13 -04:00
parent 02fd0aee06
commit 83fc68ece3
3 changed files with 27 additions and 15 deletions
+23 -11
View File
@@ -508,17 +508,23 @@ def get_platform():
# check python version
def check_python(supported_minors=[9, 10, 11, 12], reason=None):
def check_python(supported_minors=[], experimental_minors=[], reason=None):
if supported_minors is None or len(supported_minors) == 0:
supported_minors = [9, 10, 11, 12]
experimental_minors = []
t_start = time.time()
if args.quick:
return
log.info(f'Python: version={platform.python_version()} platform={platform.system()} bin="{sys.executable}" venv="{sys.prefix}"')
if not (int(sys.version_info.major) == 3 and int(sys.version_info.minor) in supported_minors):
log.error(f"Python version incompatible: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} required 3.{supported_minors}")
if reason is not None:
log.error(reason)
if not args.ignore and not args.experimental:
sys.exit(1)
if (int(sys.version_info.major) == 3 and int(sys.version_info.minor) in experimental_minors):
log.warning(f"Python version experimental: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} recommended 3.{supported_minors}")
else:
log.error(f"Python version incompatible: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} required 3.{supported_minors}")
if reason is not None:
log.error(reason)
if not args.ignore and not args.experimental:
sys.exit(1)
if int(sys.version_info.minor) == 12:
os.environ.setdefault('SETUPTOOLS_USE_DISTUTILS', 'local') # hack for python 3.11 setuptools
if not args.skip_git:
@@ -538,7 +544,7 @@ def check_diffusers():
t_start = time.time()
if args.skip_all or args.skip_git or args.experimental:
return
sha = 'd0c02398b986f2876b2b79f3a137ed00a7edde35' # diffusers commit hash
sha = '8c661ea586bf11cb2440da740dd3c4cf84679b85' # diffusers commit hash
pkg = pkg_resources.working_set.by_key.get('diffusers', None)
minor = int(pkg.version.split('.')[1] if pkg is not None else 0)
cur = opts.get('diffusers_version', '') if minor > 0 else ''
@@ -1091,7 +1097,13 @@ def install_submodules(force=True):
return '\n'.join(res)
def reload(package):
def reload(package, desired=None):
loaded = package in sys.modules
if not loaded:
return
current = sys.modules[package].__version__ if hasattr(sys.modules[package], "__version__") else None
if desired is not None and current == desired:
return
modules = [m for m in sys.modules if m.startswith(package)]
for m in modules:
del sys.modules[m]
@@ -1143,17 +1155,17 @@ def install_optional():
install('pillow-jxl-plugin==1.3.2', ignore=True)
install('optimum-quanto==0.2.7', ignore=True)
install('torchao==0.10.0', ignore=True)
install('bitsandbytes==0.45.1', ignore=True)
install('bitsandbytes==0.45.5', ignore=True)
install('pynvml', ignore=True)
install('ultralytics==8.3.40', ignore=True)
install('Cython', ignore=True)
install('insightface==0.7.3', ignore=True) # problematic build
install('albumentations==1.4.3', ignore=True)
install('pydantic==1.10.21', ignore=True)
reload('pydantic')
reload('pydantic', '1.10.21')
install('nncf==2.16.0', ignore=True, no_deps=True) # requires older pandas
# install('flash-attn', ignore=True) # requires cuda and nvcc to be installed
install('gguf', ignore=True)
install('av', ignore=True)
try:
import gguf
scripts_dir = os.path.join(os.path.dirname(gguf.__file__), '..', 'scripts')
+1 -1
View File
@@ -207,7 +207,7 @@ def load_bnb(msg='', silent=False):
if not installed('bitsandbytes'):
if devices.backend == 'cuda':
# forcing a version will uninstall the multi-backend-refactor branch of bnb
install('bitsandbytes==0.45.1', quiet=True)
install('bitsandbytes==0.45.5', quiet=True)
log.warning('Quantization: bitsandbytes installed please restart')
try:
import bitsandbytes
+3 -3
View File
@@ -31,7 +31,7 @@ invisible-watermark
pi-heif
# versioned
rich==13.9.4
rich==14.0.0
safetensors==0.5.3
tensordict==0.1.2
peft==0.15.2
@@ -46,9 +46,9 @@ opencv-contrib-python-headless==4.9.0.80
einops==0.4.1
gradio==3.43.2
huggingface_hub==0.30.2
numexpr==2.8.8
numexpr==2.10.2
numpy==1.26.4
numba==0.59.1
numba==0.61.2
protobuf==4.25.3
pytorch_lightning==1.9.4
tokenizers==0.21.1