Skip to content

Commit 5d691ea

Browse files
chore: possible fix for nvidia 5000 series cards
1 parent 0be5a09 commit 5d691ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

invokeai/backend/image_util/pbr_maps/pbr_maps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
# Adopted and optimized for Invoke AI
33

44
import pathlib
5-
from typing import Any, Literal
5+
from typing import Any, Literal, OrderedDict
66

77
import cv2
88
import numpy as np
99
import numpy.typing as npt
1010
import torch
1111
from PIL import Image
12+
from torch.serialization import add_safe_globals
1213

1314
from invokeai.backend.image_util.pbr_maps.architecture.pbr_rrdb_net import PBR_RRDB_Net
1415
from invokeai.backend.image_util.pbr_maps.utils.image_ops import crop_seamless, esrgan_launcher_split_merge
@@ -22,6 +23,7 @@ def __init__(self, normal_map_model: PBR_RRDB_Net, other_map_model: PBR_RRDB_Net
2223
self.normal_map_model = normal_map_model
2324
self.other_map_model = other_map_model
2425
self.device = device
26+
add_safe_globals([PBR_RRDB_Net, OrderedDict])
2527

2628
@staticmethod
2729
def load_model(model_path: pathlib.Path, device: torch.device) -> PBR_RRDB_Net:

0 commit comments

Comments
 (0)