Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions modules/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@
from modules.timer import startup_timer


def patch__pkg_resources__packaging():
"""temp patch for setuptools >= 70.0.0"""
try:
import pkg_resources
try:
import pkg_resources.packaging
except ImportError:
try:
pkg_resources.packaging = importlib.import_module("pkg_resources.extern.packaging")
except ImportError:
print("Failed to import pkg_resources.packaging")
except ImportError:
pass


def imports():
patch__pkg_resources__packaging()

logging.getLogger("torch.distributed.nn").setLevel(logging.ERROR) # sshh...
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())

Expand Down