[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:
co-authored by
OpenAI Codex
parent
c4cd2bd544
commit
cc25f028b7
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user