From ca09bd63a3184485b539b90519ce191fbc772869 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:44:30 +1100 Subject: [PATCH] tidy(nodes): do not refer to files as latents in `PickleStorageTorch` (again) --- .../services/pickle_storage/pickle_storage_torch.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/invokeai/app/services/pickle_storage/pickle_storage_torch.py b/invokeai/app/services/pickle_storage/pickle_storage_torch.py index de411bbf47..16f0d7bb7a 100644 --- a/invokeai/app/services/pickle_storage/pickle_storage_torch.py +++ b/invokeai/app/services/pickle_storage/pickle_storage_torch.py @@ -25,17 +25,17 @@ class PickleStorageTorch(PickleStorageBase[T]): self._delete_all_items() def get(self, name: str) -> T: - latent_path = self._get_path(name) - return torch.load(latent_path) + file_path = self._get_path(name) + return torch.load(file_path) def save(self, name: str, data: T) -> None: self._output_folder.mkdir(parents=True, exist_ok=True) - latent_path = self._get_path(name) - torch.save(data, latent_path) + file_path = self._get_path(name) + torch.save(data, file_path) def delete(self, name: str) -> None: - latent_path = self._get_path(name) - latent_path.unlink() + file_path = self._get_path(name) + file_path.unlink() def _get_path(self, name: str) -> Path: return self._output_folder / name