[diffusion] fix: fix pytorch non-writable array warning (#15017)
This commit is contained in:
@@ -32,7 +32,7 @@ def broadcast_pyobj(
|
||||
size = len(serialized_data)
|
||||
|
||||
tensor_data = torch.ByteTensor(
|
||||
np.frombuffer(serialized_data, dtype=np.uint8)
|
||||
np.frombuffer(serialized_data, dtype=np.uint8).copy()
|
||||
).to(device)
|
||||
tensor_size = torch.tensor([size], dtype=torch.long, device=device)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user