Skip to content

Commit

Permalink
patch__pkg_resources__packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed May 25, 2024
1 parent ddb28b3 commit 7fbc5cd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@
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:
pkg_resources.packaging = importlib.import_module("pkg_resources.extern.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

0 comments on commit 7fbc5cd

Please sign in to comment.