mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Don't force bnb version outside of cuda
This commit is contained in:
@@ -70,10 +70,13 @@ def load_torchao(msg='', silent=False):
|
||||
|
||||
|
||||
def load_bnb(msg='', silent=False):
|
||||
from modules import devices
|
||||
global bnb # pylint: disable=global-statement
|
||||
if bnb is not None:
|
||||
return bnb
|
||||
install('bitsandbytes==0.45.0', quiet=True)
|
||||
if devices.backend == 'cuda':
|
||||
# forcing a version will uninstall the multi-backend-refactor branch of bnb
|
||||
install('bitsandbytes==0.45.0', quiet=True)
|
||||
try:
|
||||
import bitsandbytes
|
||||
bnb = bitsandbytes
|
||||
|
||||
Reference in New Issue
Block a user