diff --git a/invokeai/app/services/object_serializer/object_serializer_disk.py b/invokeai/app/services/object_serializer/object_serializer_disk.py index 935fec3060..7e28320ff2 100644 --- a/invokeai/app/services/object_serializer/object_serializer_disk.py +++ b/invokeai/app/services/object_serializer/object_serializer_disk.py @@ -1,3 +1,4 @@ +import threading import tempfile import typing from dataclasses import dataclass @@ -70,7 +71,8 @@ class ObjectSerializerDisk(ObjectSerializerBase[T]): return self._output_dir / name def _new_name(self) -> str: - return f"{self._obj_class_name}_{uuid_string()}" + tid = threading.current_thread().ident + return f"{self._obj_class_name}_{tid}_{uuid_string()}" def _tempdir_cleanup(self) -> None: """Calls `cleanup` on the temporary directory, if it exists."""