If the data length is not divisible by the patch size (e.g., 100 datapoints, 30 patch size), then the data will be padded (e.g., 100 datapoints turns into 120 datapoints). This is good but only concerns the original data lengths, and not the lengths of the encoded layer of an autoencoder (e.g., when the data length is 100 but the encoded layer is 25, the patch size should consider the encoded layer length but instead it considers the data length).
If the data length is not divisible by the patch size (e.g., 100 datapoints, 30 patch size), then the data will be padded (e.g., 100 datapoints turns into 120 datapoints). This is good but only concerns the original data lengths, and not the lengths of the encoded layer of an autoencoder (e.g., when the data length is 100 but the encoded layer is 25, the patch size should consider the encoded layer length but instead it considers the data length).