From a1b2ad69ee0cae6c6e722d042bd0c6e3efe346f3 Mon Sep 17 00:00:00 2001 From: kilavvy <140459108+kilavvy@users.noreply.github.com> Date: Thu, 12 Jun 2025 16:42:07 +0200 Subject: [PATCH 1/2] Update modeling_swin.py --- src/transformers/models/swin/modeling_swin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/models/swin/modeling_swin.py b/src/transformers/models/swin/modeling_swin.py index 31373ec3705..5bc45c60400 100644 --- a/src/transformers/models/swin/modeling_swin.py +++ b/src/transformers/models/swin/modeling_swin.py @@ -380,7 +380,7 @@ class SwinPatchMerging(nn.Module): batch_size, dim, num_channels = input_feature.shape input_feature = input_feature.view(batch_size, height, width, num_channels) - # pad input to be disible by width and height, if needed + # pad input to be divisible by width and height, if needed input_feature = self.maybe_pad(input_feature, height, width) # [batch_size, height/2, width/2, num_channels] input_feature_0 = input_feature[:, 0::2, 0::2, :] From 86148b5e48ce8f6ddc6c56d6072d0e8490ce9e45 Mon Sep 17 00:00:00 2001 From: kilavvy <140459108+kilavvy@users.noreply.github.com> Date: Thu, 12 Jun 2025 16:42:37 +0200 Subject: [PATCH 2/2] Update pt_utils.py --- src/transformers/pipelines/pt_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/pipelines/pt_utils.py b/src/transformers/pipelines/pt_utils.py index 19663437cd6..53f96c70f2d 100644 --- a/src/transformers/pipelines/pt_utils.py +++ b/src/transformers/pipelines/pt_utils.py @@ -185,7 +185,7 @@ class PipelineChunkIterator(PipelineIterator): # Try to return next item processed = next(self.subiterator) except StopIteration: - # When a preprocess iterator ends, we can start lookig at the next item + # When a preprocess iterator ends, we can start looking at the next item # ChunkIterator will keep feeding until ALL elements of iterator # all have created their subiterator and have been iterating against. #