mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
multiple fixes
This commit is contained in:
+7
-3
@@ -9,7 +9,11 @@ initialized = False
|
||||
logging.getLogger("DeepSpeed").disabled = True
|
||||
# os.environ.setdefault('OMP_NUM_THREADS', 1)
|
||||
# os.environ.setdefault('MKL_NUM_THREADS', 1)
|
||||
|
||||
# import tensorflow as tf # pylint: disable=C0411
|
||||
|
||||
import torch # pylint: disable=C0411
|
||||
|
||||
# torch.set_num_threads(1)
|
||||
try:
|
||||
import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import
|
||||
@@ -19,14 +23,14 @@ except Exception:
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
import torchvision # pylint: disable=W0611,C0411
|
||||
import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them # pylint: disable=W0611,C0411
|
||||
if ".dev" in torch.__version__ or "+git" in torch.__version__:
|
||||
torch.__long_version__ = torch.__version__
|
||||
torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0)
|
||||
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
|
||||
logging.getLogger("pytorch_lightning").disabled = True
|
||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
|
||||
warnings.filterwarnings(action="ignore", category=FutureWarning)
|
||||
warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvision")
|
||||
if ".dev" in torch.__version__ or "+git" in torch.__version__:
|
||||
torch.__long_version__ = torch.__version__
|
||||
torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0)
|
||||
timer.startup.record("torch")
|
||||
|
||||
from fastapi import FastAPI # pylint: disable=W0611,C0411
|
||||
|
||||
Reference in New Issue
Block a user