From 9849f64083b1473ecdc91a97fa6295f73a09cf23 Mon Sep 17 00:00:00 2001 From: akristoffersen Date: Sun, 9 Feb 2025 02:29:53 +0000 Subject: [PATCH] fix device typing issue --- nerfstudio/data/utils/nerfstudio_collate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nerfstudio/data/utils/nerfstudio_collate.py b/nerfstudio/data/utils/nerfstudio_collate.py index 1dc7bea6a..9c57b1253 100644 --- a/nerfstudio/data/utils/nerfstudio_collate.py +++ b/nerfstudio/data/utils/nerfstudio_collate.py @@ -98,7 +98,7 @@ def nerfstudio_collate(batch: Any, extra_mappings: Union[Dict[type, Callable], N # If we're in a background process, concatenate directly into a # shared memory tensor to avoid an extra copy numel = sum(x.numel() for x in batch) - storage = elem.untyped_storage()._new_shared(numel, device=elem.device) + storage = elem.untyped_storage()._new_shared(numel, device=str(elem.device)) out = elem.new(storage).resize_(len(batch), *list(elem.size())) return torch.stack(batch, 0, out=out) elif elem_type.__module__ == "numpy" and elem_type.__name__ not in ("str_", "string_"):