Skip to content

Commit 9a74d2f

Browse files
Cleanup
1 parent fe38bfb commit 9a74d2f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/pipelines/z_image/test_z_image_inpaint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ def get_dummy_components(self):
109109
axes_dims=[8, 4, 4],
110110
axes_lens=[256, 32, 32],
111111
)
112-
# `x_pad_token` and `cap_pad_token` are initialized with `torch.empty`.
113-
# This can cause NaN data values in our testing environment. Fixating them
114-
# helps prevent that issue.
112+
# `x_pad_token` and `cap_pad_token` are initialized with `torch.empty` which contains
113+
# uninitialized memory. Set them to known values for deterministic test behavior.
115114
with torch.no_grad():
116115
transformer.x_pad_token.copy_(torch.ones_like(transformer.x_pad_token.data))
117116
transformer.cap_pad_token.copy_(torch.ones_like(transformer.cap_pad_token.data))

0 commit comments

Comments
 (0)