[Loader] Improve InstantTensor loading (#46868)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
Michael Goin
2026-07-17 16:30:02 -04:00
committed by GitHub
co-authored by OpenAI Codex
parent c4cd2bd544
commit cc25f028b7
9 changed files with 27 additions and 14 deletions
@@ -33,8 +33,6 @@ def test_instanttensor_model_loader():
hf_safetensors_tensors = {}
for name, tensor in instanttensor_weights_iterator(safetensors, True):
# Copy the tensor immediately as it is a reference to the internal
# buffer of instanttensor.
instanttensor_tensors[name] = tensor.to("cpu")
for name, tensor in safetensors_weights_iterator(safetensors, True):