Skip to content

Commit 8500bac

Browse files
committed
Use logger for warning
1 parent 9e58256 commit 8500bac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

invokeai/backend/lora.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from safetensors.torch import load_file
1010
from typing_extensions import Self
1111

12+
import invokeai.backend.util.logging as logger
1213
from invokeai.backend.model_manager import BaseModelType
1314
from invokeai.backend.raw_model import RawModel
1415

@@ -77,9 +78,8 @@ def check_keys(self, values: Dict[str, torch.Tensor], known_keys: Set[str]):
7778
all_known_keys = known_keys | {"alpha", "bias_indices", "bias_values", "bias_size"}
7879
unknown_keys = set(values.keys()) - all_known_keys
7980
if unknown_keys:
80-
# TODO: how to warn log?
81-
print(
82-
f"[WARN] Unexpected keys found in LoRA/LyCORIS layer, model might work incorrectly! Keys: {unknown_keys}"
81+
logger.warning(
82+
f"Unexpected keys found in LoRA/LyCORIS layer, model might work incorrectly! Keys: {unknown_keys}"
8383
)
8484

8585

0 commit comments

Comments
 (0)