diffusers
3bc3e525 - Initialize ZImage pad tokens deterministically (#13805)

Commit
36 days ago
Initialize ZImage pad tokens deterministically (#13805) This PR fixes a determinism issue in ZImageTransformer2DModel by initializing its pad tokens with zeros instead of torch.empty(). The model's pad tokens participate in the forward path when padded caption or image tokens are present. Because they were previously created with torch.empty(), direct model instantiation from config could pick up uninitialized values, which made outputs unstable across runs and could surface NaNs in layerwise casting tests. Signed-off-by: Wang, Yi <yi.a.wang@intel.com>
Author
Parents
Loading