[BugFix][DiffusionGemma][CPU] Copy async output snapshots instead of aliasing reused buffers (#59829)
Signed-off-by: ojeda-e <eojeda@league.com> Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
This commit is contained in:
co-authored by
Lucas Wilkinson
parent
201e537d98
commit
4611c2c3d2
@@ -262,7 +262,7 @@ class AsyncPoolingOutput(AsyncModelRunnerOutput):
|
||||
|
||||
|
||||
def async_copy_to_np(x: torch.Tensor) -> np.ndarray:
|
||||
return x.to("cpu", non_blocking=True).numpy()
|
||||
return x.to("cpu", non_blocking=True, copy=True).numpy()
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
||||
Reference in New Issue
Block a user