We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe38bfb commit 9a74d2fCopy full SHA for 9a74d2f
1 file changed
tests/pipelines/z_image/test_z_image_inpaint.py
@@ -109,9 +109,8 @@ def get_dummy_components(self):
109
axes_dims=[8, 4, 4],
110
axes_lens=[256, 32, 32],
111
)
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.
+ # `x_pad_token` and `cap_pad_token` are initialized with `torch.empty` which contains
+ # uninitialized memory. Set them to known values for deterministic test behavior.
115
with torch.no_grad():
116
transformer.x_pad_token.copy_(torch.ones_like(transformer.x_pad_token.data))
117
transformer.cap_pad_token.copy_(torch.ones_like(transformer.cap_pad_token.data))
0 commit comments