Skip to content

Commit

Permalink
revert logging kohya-ss#1137
Browse files Browse the repository at this point in the history
  • Loading branch information
kohya-ss committed Feb 25, 2024
1 parent e0acb10 commit fccbee2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions library/device_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

import torch

from .utils import setup_logging
setup_logging()
import logging
logger = logging.getLogger(__name__)

try:
HAS_CUDA = torch.cuda.is_available()
except Exception:
Expand Down Expand Up @@ -64,7 +59,7 @@ def get_preferred_device() -> torch.device:
device = torch.device("mps")
else:
device = torch.device("cpu")
logger.info(f"get_preferred_device() -> {device}")
print(f"get_preferred_device() -> {device}")
return device


Expand All @@ -82,8 +77,8 @@ def init_ipex():

is_initialized, error_message = ipex_init()
if not is_initialized:
logger.error("failed to initialize ipex: {error_message}")
print("failed to initialize ipex:", error_message)
else:
return
except Exception as e:
logger.error("failed to initialize ipex: {e}")
print("failed to initialize ipex:", e)

0 comments on commit fccbee2

Please sign in to comment.