mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-12 16:18:22 +00:00
multi-upscaler: specify map_location when loading negative embedding
This commit is contained in:
parent
af1b302e78
commit
88325c3bbc
|
@ -112,7 +112,9 @@ class MultiUpscalerAbstract(MultiDiffusion[T], ABC):
|
|||
if path is None:
|
||||
return ""
|
||||
|
||||
embeddings: Tensor | dict[str, Any] = torch.load(path, weights_only=True) # type: ignore
|
||||
embeddings: torch.Tensor | dict[str, Any] = torch.load( # type: ignore
|
||||
path, weights_only=True, map_location=self.device
|
||||
)
|
||||
|
||||
if isinstance(embeddings, dict):
|
||||
assert key is not None, "Key must be provided to access the negative embedding."
|
||||
|
|
Loading…
Reference in a new issue