Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
xenova committed Nov 9, 2023
1 parent 26b7802 commit 3c93f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/processors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ export class Swin2SRImageProcessor extends ImageFeatureExtractor {
const [imageWidth, imageHeight, imageChannels] = imgDims;

return super.pad_image(pixelData, imgDims, {
// NOTE: For Swin2SR models, the original python implementation adds padding even when `pad_size` is already
// NOTE: For Swin2SR models, the original python implementation adds padding even when the image's width/height is already
// a multiple of `pad_size`. However, this is most likely a bug (PR: https://github.com/mv-lab/swin2sr/pull/19).
// For this reason, we only add padding when the image's width/height is not a multiple of `pad_size`.
width: imageWidth + (padSize - imageWidth % padSize) % padSize,
Expand Down

0 comments on commit 3c93f8e

Please sign in to comment.