initial commit

This commit is contained in:
2025-10-21 13:37:07 +07:00
commit 9cd16e276a
1574 changed files with 2675557 additions and 0 deletions

21
modules_forge/bnb_installer.py Executable file
View File

@@ -0,0 +1,21 @@
import pkg_resources
from modules.launch_utils import run_pip
target_bitsandbytes_version = '0.45.3'
def try_install_bnb():
try:
bitsandbytes_version = pkg_resources.get_distribution('bitsandbytes').version
except Exception:
bitsandbytes_version = None
try:
if bitsandbytes_version != target_bitsandbytes_version:
run_pip(
f"install -U bitsandbytes=={target_bitsandbytes_version}",
f"bitsandbytes=={target_bitsandbytes_version}",
)
except Exception as e:
print(f'Cannot install bitsandbytes. Skipped.')