


"""simple docstring"""






import itertools
import random
import unittest

import numpy as np

from transformers import is_speech_available
from transformers.testing_utils import require_torch, require_torchaudio

from ...test_sequence_feature_extraction_common import SequenceFeatureExtractionTestMixin


if is_speech_available():
							from transformers import SpeechaTextFeatureExtractor

UpperCAmelCase    :     Optional[int]   						=		random.Random()
def      lowerCamelCase       (     _UpperCamelCase		:      Union[str, Any]       ,			_UpperCamelCase		:      Optional[int]=1.0       ,			_UpperCamelCase		:      Any=None       ,			_UpperCamelCase		:      str=None							)		->       List[Any]:

							'''simple docstring'''



							if rng is None:
														__UpperCAmelCase   :						str      							=					global_rng

							__UpperCAmelCase   :						List[Any]      							=					[]
							for batch_idx in range(shape[0]							):
														values.append([]							)
														for _ in range(shape[1]							):
																					values[-1].append(rng.random() * scale							)

							return values





@require_torch
@require_torchaudio
class      lowerCamelCase__   (     unittest.TestCase				):







					"""simple docstring"""


					def __init__(       self    : int ,       UpperCamelCase    : str ,       UpperCamelCase    : Optional[Any]=7 ,       UpperCamelCase    : Optional[int]=400 ,       UpperCamelCase    : Optional[int]=2_000 ,       UpperCamelCase    : str=24 ,       UpperCamelCase    : Union[str, Any]=24 ,       UpperCamelCase    : Any=0.0 ,       UpperCamelCase    : Dict=16_000 ,       UpperCamelCase    : Union[str, Any]=True ,       UpperCamelCase    : Tuple=True ,       ):
												'''simple docstring'''






												__UpperCAmelCase   :						str      							=					parent
												__UpperCAmelCase   :						Optional[Any]      							=					batch_size
												__UpperCAmelCase   :						List[str]      							=					min_seq_length
												__UpperCAmelCase   :						Dict      							=					max_seq_length
												__UpperCAmelCase   :						Dict      							=					(self.max_seq_length - self.min_seq_length) // (self.batch_size - 1)
												__UpperCAmelCase   :						str      							=					feature_size
												__UpperCAmelCase   :						Dict      							=					num_mel_bins
												__UpperCAmelCase   :						Tuple      							=					padding_value
												__UpperCAmelCase   :						int      							=					sampling_rate
												__UpperCAmelCase   :						Tuple      							=					return_attention_mask
												__UpperCAmelCase   :						Union[str, Any]      							=					do_normalize






					def lowerCamelCase__							(       self    : List[str]  ):
												'''simple docstring'''






												return {
												    "feature_size": self.feature_size,
												    "num_mel_bins": self.num_mel_bins,
												    "padding_value": self.padding_value,
												    "sampling_rate": self.sampling_rate,
												    "return_attention_mask": self.return_attention_mask,
												    "do_normalize": self.do_normalize,
												}






					def lowerCamelCase__							(       self    : Optional[Any] ,       UpperCamelCase    : int=False ,       UpperCamelCase    : Tuple=False  ):
												'''simple docstring'''






												def _flatten(UpperCamelCase    : int  ):
																			return list(itertools.chain(*UpperCamelCase  )  )

												if equal_length:
																			__UpperCAmelCase   :						Dict      							=					[floats_list((self.max_seq_length, self.feature_size)  ) for _ in range(self.batch_size  )]
												else:
																			# make sure that inputs increase in size
																			__UpperCAmelCase   :						Any      							=					[
																			    floats_list((x, self.feature_size)  )
																			    for x in range(self.min_seq_length ,       self.max_seq_length ,       self.seq_length_diff  )
																			]
												if numpify:
																			__UpperCAmelCase   :						Any      							=					[np.asarray(UpperCamelCase  ) for x in speech_inputs]
												return speech_inputs






@require_torch
@require_torchaudio
class      lowerCamelCase__   (     A     ,    unittest.TestCase				):







					"""simple docstring"""


					__a	       =							SpeechaTextFeatureExtractor if is_speech_available() else None






					def lowerCamelCase__							(       self    : Any  ):
												'''simple docstring'''






												__UpperCAmelCase   :						int      							=					SpeechaTextFeatureExtractionTester(self  )






					def lowerCamelCase__							(       self    : List[Any] ,       UpperCamelCase    : Optional[int]  ):
												'''simple docstring'''






												self.assertTrue(np.all(np.mean(UpperCamelCase ,       axis=0  ) < 1e-3  )  )
												self.assertTrue(np.all(np.abs(np.var(UpperCamelCase ,       axis=0  ) - 1  ) < 1e-3  )  )






					def lowerCamelCase__							(       self    : Dict  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Union[str, Any]      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												# create three inputs of length 800, 1000, and 1200
												__UpperCAmelCase   :						Union[str, Any]      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]
												__UpperCAmelCase   :						List[str]      							=					[np.asarray(UpperCamelCase  ) for speech_input in speech_inputs]

												# Test feature size
												__UpperCAmelCase   :						Tuple      							=					feature_extractor(UpperCamelCase ,       padding=UpperCamelCase ,       return_tensors="""np"""  ).input_features
												self.assertTrue(input_features.ndim == 3  )
												self.assertTrue(input_features.shape[-1] == feature_extractor.feature_size  )

												# Test not batched input
												__UpperCAmelCase   :						Dict      							=					feature_extractor(speech_inputs[0] ,       return_tensors="""np"""  ).input_features
												__UpperCAmelCase   :						Tuple      							=					feature_extractor(np_speech_inputs[0] ,       return_tensors="""np"""  ).input_features
												self.assertTrue(np.allclose(UpperCamelCase ,       UpperCamelCase ,       atol=1e-3  )  )

												# Test batched
												__UpperCAmelCase   :						Optional[int]      							=					feature_extractor(UpperCamelCase ,       return_tensors="""np"""  ).input_features
												__UpperCAmelCase   :						Optional[int]      							=					feature_extractor(UpperCamelCase ,       return_tensors="""np"""  ).input_features
												for enc_seq_a, enc_seq_a in zip(UpperCamelCase ,       UpperCamelCase  ):
																			self.assertTrue(np.allclose(UpperCamelCase ,       UpperCamelCase ,       atol=1e-3  )  )

												# Test 2-D numpy arrays are batched.
												__UpperCAmelCase   :						int      							=					[floats_list((1, x)  )[0] for x in (800, 800, 800)]
												__UpperCAmelCase   :						List[str]      							=					np.asarray(UpperCamelCase  )
												__UpperCAmelCase   :						Union[str, Any]      							=					feature_extractor(UpperCamelCase ,       return_tensors="""np"""  ).input_features
												__UpperCAmelCase   :						Any      							=					feature_extractor(UpperCamelCase ,       return_tensors="""np"""  ).input_features
												for enc_seq_a, enc_seq_a in zip(UpperCamelCase ,       UpperCamelCase  ):
																			self.assertTrue(np.allclose(UpperCamelCase ,       UpperCamelCase ,       atol=1e-3  )  )






					def lowerCamelCase__							(       self    : Any  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Optional[int]      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						Any      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]

												__UpperCAmelCase   :						int      							=					["""longest""", """max_length""", """do_not_pad"""]
												__UpperCAmelCase   :						Any      							=					[None, 16, None]
												for max_length, padding in zip(UpperCamelCase ,       UpperCamelCase  ):
																			__UpperCAmelCase   :						Any      							=					feature_extractor(
																			    UpperCamelCase ,       padding=UpperCamelCase ,       max_length=UpperCamelCase ,       return_attention_mask=UpperCamelCase  )
																			__UpperCAmelCase   :						Optional[int]      							=					inputs.input_features
																			__UpperCAmelCase   :						Optional[int]      							=					inputs.attention_mask
																			__UpperCAmelCase   :						str      							=					[np.sum(UpperCamelCase  ) for x in attention_mask]

																			self._check_zero_mean_unit_variance(input_features[0][: fbank_feat_lengths[0]]  )
																			self._check_zero_mean_unit_variance(input_features[1][: fbank_feat_lengths[1]]  )
																			self._check_zero_mean_unit_variance(input_features[2][: fbank_feat_lengths[2]]  )






					def lowerCamelCase__							(       self    : Optional[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Dict      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						List[Any]      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]

												__UpperCAmelCase   :						Any      							=					["""longest""", """max_length""", """do_not_pad"""]
												__UpperCAmelCase   :						List[Any]      							=					[None, 16, None]
												for max_length, padding in zip(UpperCamelCase ,       UpperCamelCase  ):
																			__UpperCAmelCase   :						Optional[Any]      							=					feature_extractor(
																			    UpperCamelCase ,       max_length=UpperCamelCase ,       padding=UpperCamelCase ,       return_tensors="""np""" ,       return_attention_mask=UpperCamelCase  )
																			__UpperCAmelCase   :						List[str]      							=					inputs.input_features
																			__UpperCAmelCase   :						Optional[int]      							=					inputs.attention_mask
																			__UpperCAmelCase   :						Tuple      							=					[np.sum(UpperCamelCase  ) for x in attention_mask]

																			self._check_zero_mean_unit_variance(input_features[0][: fbank_feat_lengths[0]]  )
																			self.assertTrue(input_features[0][fbank_feat_lengths[0] :].sum() < 1e-6  )
																			self._check_zero_mean_unit_variance(input_features[1][: fbank_feat_lengths[1]]  )
																			self.assertTrue(input_features[0][fbank_feat_lengths[1] :].sum() < 1e-6  )
																			self._check_zero_mean_unit_variance(input_features[2][: fbank_feat_lengths[2]]  )






					def lowerCamelCase__							(       self    : List[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Dict      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						Dict      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]
												__UpperCAmelCase   :						List[str]      							=					feature_extractor(
												    UpperCamelCase ,       padding="""max_length""" ,       max_length=4 ,       truncation=UpperCamelCase ,       return_tensors="""np""" ,       return_attention_mask=UpperCamelCase ,       )
												__UpperCAmelCase   :						Optional[int]      							=					inputs.input_features
												__UpperCAmelCase   :						Dict      							=					inputs.attention_mask
												__UpperCAmelCase   :						List[str]      							=					np.sum(attention_mask == 1 ,       axis=1  )

												self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]  )
												self._check_zero_mean_unit_variance(input_features[1]  )
												self._check_zero_mean_unit_variance(input_features[2]  )






					def lowerCamelCase__							(       self    : Any  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Dict      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						List[str]      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]
												__UpperCAmelCase   :						str      							=					feature_extractor(
												    UpperCamelCase ,       padding="""longest""" ,       max_length=4 ,       truncation=UpperCamelCase ,       return_tensors="""np""" ,       return_attention_mask=UpperCamelCase ,       )
												__UpperCAmelCase   :						Optional[Any]      							=					inputs.input_features
												__UpperCAmelCase   :						List[str]      							=					inputs.attention_mask
												__UpperCAmelCase   :						List[Any]      							=					np.sum(attention_mask == 1 ,       axis=1  )

												self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]  )
												self._check_zero_mean_unit_variance(input_features[1, : fbank_feat_lengths[1]]  )
												self._check_zero_mean_unit_variance(input_features[2]  )

												# make sure that if max_length < longest -> then pad to max_length
												self.assertEqual(input_features.shape ,       (3, 4, 24)  )

												__UpperCAmelCase   :						str      							=					[floats_list((1, x)  )[0] for x in range(800 ,       1_400 ,       200  )]
												__UpperCAmelCase   :						int      							=					feature_extractor(
												    UpperCamelCase ,       padding="""longest""" ,       max_length=16 ,       truncation=UpperCamelCase ,       return_tensors="""np""" ,       return_attention_mask=UpperCamelCase ,       )
												__UpperCAmelCase   :						Union[str, Any]      							=					inputs.input_features
												__UpperCAmelCase   :						Any      							=					inputs.attention_mask
												__UpperCAmelCase   :						str      							=					np.sum(attention_mask == 1 ,       axis=1  )

												self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]  )
												self._check_zero_mean_unit_variance(input_features[1, : fbank_feat_lengths[1]]  )
												self._check_zero_mean_unit_variance(input_features[2]  )

												# make sure that if max_length < longest -> then pad to max_length
												self.assertEqual(input_features.shape ,       (3, 6, 24)  )






					def lowerCamelCase__							(       self    : int  ):
												'''simple docstring'''






												import torch

												__UpperCAmelCase   :						Union[str, Any]      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						List[Any]      							=					np.random.rand(100 ,       32  ).astype(np.floataa  )
												__UpperCAmelCase   :						Any      							=					np_speech_inputs.tolist()

												for inputs in [py_speech_inputs, np_speech_inputs]:
																			__UpperCAmelCase   :						Union[str, Any]      							=					feature_extractor.pad([{"""input_features""": inputs}] ,       return_tensors="""np"""  )
																			self.assertTrue(np_processed.input_features.dtype == np.floataa  )
																			__UpperCAmelCase   :						Dict      							=					feature_extractor.pad([{"""input_features""": inputs}] ,       return_tensors="""pt"""  )
																			self.assertTrue(pt_processed.input_features.dtype == torch.floataa  )






					def lowerCamelCase__							(       self    : List[Any] ,       UpperCamelCase    : str  ):
												'''simple docstring'''






												from datasets import load_dataset

												__UpperCAmelCase   :						Any      							=					load_dataset("""hf-internal-testing/librispeech_asr_dummy""" ,       """clean""" ,       split="""validation"""  )
												# automatic decoding with librispeech
												__UpperCAmelCase   :						Optional[Any]      							=					ds.sort("""id"""  ).select(range(UpperCamelCase  )  )[:num_samples]["""audio"""]

												return [x["array"] for x in speech_samples]






					def lowerCamelCase__							(       self    : List[Any]  ):
												'''simple docstring'''






												__UpperCAmelCase   :						Optional[Any]      							=					np.array([
												    -1.5745, -1.7713, -1.7020, -1.6069, -1.2250, -1.1105, -0.9072, -0.8241,
												    -1.2310, -0.8098, -0.3320, -0.4101, -0.7985, -0.4996, -0.8213, -0.9128,
												    -1.0420, -1.1286, -1.0440, -0.7999, -0.8405, -1.2275, -1.5443, -1.4625,
												]  )
												# fmt: on

												__UpperCAmelCase   :						Dict      							=					self._load_datasamples(1  )
												__UpperCAmelCase   :						List[Any]      							=					self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()  )
												__UpperCAmelCase   :						List[Any]      							=					feature_extractor(UpperCamelCase ,       return_tensors="""pt"""  ).input_features
												self.assertEquals(input_features.shape ,       (1, 584, 24)  )
												self.assertTrue(np.allclose(input_features[0, 0, :30] ,       UpperCamelCase ,       atol=1e-4  )  )




"""simple docstring"""






import argparse
import json
from pathlib import Path

import requests
import torch
from huggingface_hub import hf_hub_download
from PIL import Image

from transformers import (
    SwiftFormerConfig,
    SwiftFormerForImageClassification,
    ViTImageProcessor,
)
from transformers.utils import logging


logging.set_verbosity_info()
UpperCAmelCase    :     Dict   						=		logging.get_logger(__name__)

UpperCAmelCase    :     Union[str, Any]   						=		torch.device('cpu')
def      lowerCamelCase       (     )		->       str:

							'''simple docstring'''



							__UpperCAmelCase   :						Optional[int]      							=					"""http://images.cocodataset.org/val2017/000000039769.jpg"""
							__UpperCAmelCase   :						Optional[Any]      							=					Image.open(requests.get(_UpperCamelCase       ,			stream=_UpperCamelCase							).raw							)
							return im
def      lowerCamelCase       (     _UpperCamelCase		:      Union[str, Any]							)		->       Union[str, Any]:

							'''simple docstring'''



							if swiftformer_name == "swiftformer_xs":
														return torch.tensor([-2.1_703E00, 2.1_107E00, -2.0_811E00, 8.8_685E-01, 2.4_360E-01]							)

							elif swiftformer_name == "swiftformer_s":
														return torch.tensor([3.9_636E-01, 2.3_478E-01, -1.6_963E00, -1.7_381E00, -8.6_337E-01]							)

							elif swiftformer_name == "swiftformer_l1":
														return torch.tensor([-4.2_768E-01, -4.7_429E-01, -1.0_897E00, -1.0_248E00, 3.5_523E-02]							)

							elif swiftformer_name == "swiftformer_l3":
														return torch.tensor([-2.5_330E-01, 2.4_211E-01, -6.0_185E-01, -8.2_789E-01, -6.0_446E-02]							)
def      lowerCamelCase       (     _UpperCamelCase		:      Union[str, Any]       ,			_UpperCamelCase		:      Optional[int]       ,			_UpperCamelCase		:      List[Any]							)		->       Union[str, Any]:

							'''simple docstring'''



							__UpperCAmelCase   :						Any      							=					dct.pop(_UpperCamelCase							)
							__UpperCAmelCase   :						List[str]      							=					val
def      lowerCamelCase       (     _UpperCamelCase		:      List[Any]							)		->       List[Any]:

							'''simple docstring'''



							__UpperCAmelCase   :						Tuple      							=					[]
							for k in state_dict.keys():
														__UpperCAmelCase   :						int      							=					k
														if ".pwconv" in k:
																					__UpperCAmelCase   :						Optional[int]      							=					k_new.replace(""".pwconv"""       ,			""".point_wise_conv"""							)
														if ".dwconv" in k:
																					__UpperCAmelCase   :						List[Any]      							=					k_new.replace(""".dwconv"""       ,			""".depth_wise_conv"""							)
														if ".Proj." in k:
																					__UpperCAmelCase   :						str      							=					k_new.replace(""".Proj."""       ,			""".proj."""							)
														if "patch_embed" in k_new:
																					__UpperCAmelCase   :						int      							=					k_new.replace("""patch_embed"""       ,			"""swiftformer.patch_embed.patch_embedding"""							)
														if "network" in k_new:
																					__UpperCAmelCase   :						str      							=					k_new.split("""."""							)
																					if ls[2].isdigit():
																												__UpperCAmelCase   :						Dict      							=					"""swiftformer.encoder.network.""" + ls[1] + """.blocks.""" + ls[2] + """.""" + """.""".join(ls[3:]							)
																					else:
																												__UpperCAmelCase   :						List[str]      							=					k_new.replace("""network"""       ,			"""swiftformer.encoder.network"""							)
														rename_keys.append((k, k_new)							)
							return rename_keys
@torch.no_grad()
def      lowerCamelCase       (     _UpperCamelCase		:      int       ,			_UpperCamelCase		:      List[Any]       ,			_UpperCamelCase		:      int							)		->       Union[str, Any]:

							'''simple docstring'''



							__UpperCAmelCase   :						Optional[int]      							=					SwiftFormerConfig()

							# dataset (ImageNet-21k only or also fine-tuned on ImageNet 2012), patch_size and image_size
							__UpperCAmelCase   :						Optional[int]      							=					1_0_0_0
							__UpperCAmelCase   :						Optional[int]      							=					"""huggingface/label-files"""
							__UpperCAmelCase   :						str      							=					"""imagenet-1k-id2label.json"""
							__UpperCAmelCase   :						List[Any]      							=					json.load(open(hf_hub_download(_UpperCamelCase       ,			_UpperCamelCase       ,			repo_type="""dataset"""							)       ,			"""r"""							)							)
							__UpperCAmelCase   :						Any      							=					{int(_UpperCamelCase							): v for k, v in idalabel.items()}
							__UpperCAmelCase   :						Optional[Any]      							=					idalabel
							__UpperCAmelCase   :						Optional[int]      							=					{v: k for k, v in idalabel.items()}

							# size of the architecture
							if swiftformer_name == "swiftformer_xs":
														__UpperCAmelCase   :						Tuple      							=					[3, 3, 6, 4]
														__UpperCAmelCase   :						List[Any]      							=					[4_8, 5_6, 1_1_2, 2_2_0]

							elif swiftformer_name == "swiftformer_s":
														__UpperCAmelCase   :						Optional[int]      							=					[3, 3, 9, 6]
														__UpperCAmelCase   :						Tuple      							=					[4_8, 6_4, 1_6_8, 2_2_4]

							elif swiftformer_name == "swiftformer_l1":
														__UpperCAmelCase   :						Dict      							=					[4, 3, 1_0, 5]
														__UpperCAmelCase   :						Optional[Any]      							=					[4_8, 9_6, 1_9_2, 3_8_4]

							elif swiftformer_name == "swiftformer_l3":
														__UpperCAmelCase   :						str      							=					[4, 4, 1_2, 6]
														__UpperCAmelCase   :						str      							=					[6_4, 1_2_8, 3_2_0, 5_1_2]

							# load state_dict of original model, remove and rename some keys
							if original_ckpt:
														if original_ckpt.startswith("""https"""							):
																					__UpperCAmelCase   :						str      							=					torch.hub.load_state_dict_from_url(_UpperCamelCase       ,			map_location="""cpu"""       ,			check_hash=_UpperCamelCase							)
														else:
																					__UpperCAmelCase   :						Dict      							=					torch.load(_UpperCamelCase       ,			map_location="""cpu"""							)
							__UpperCAmelCase   :						str      							=					checkpoint

							__UpperCAmelCase   :						Union[str, Any]      							=					create_rename_keys(_UpperCamelCase							)
							for rename_key_src, rename_key_dest in rename_keys:
														rename_key(_UpperCamelCase       ,			_UpperCamelCase       ,			_UpperCamelCase							)

							# load HuggingFace model
							__UpperCAmelCase   :						int      							=					SwiftFormerForImageClassification(_UpperCamelCase							).eval()
							hf_model.load_state_dict(_UpperCamelCase							)

							# prepare test inputs
							__UpperCAmelCase   :						List[Any]      							=					prepare_img()
							__UpperCAmelCase   :						int      							=					ViTImageProcessor.from_pretrained("""preprocessor_config"""							)
							__UpperCAmelCase   :						Optional[Any]      							=					processor(images=_UpperCamelCase       ,			return_tensors="""pt"""							)

							# compare outputs from both models
							__UpperCAmelCase   :						Tuple      							=					get_expected_output(_UpperCamelCase							)
							__UpperCAmelCase   :						Dict      							=					hf_model(inputs["""pixel_values"""]							).logits

							assert hf_logits.shape == torch.Size([1, 1_0_0_0]							)
							assert torch.allclose(hf_logits[0, 0:5]       ,			_UpperCamelCase       ,			atol=1E-3							)

							Path(_UpperCamelCase							).mkdir(exist_ok=_UpperCamelCase							)
							print(f'''Saving model {swiftformer_name} to {pytorch_dump_folder_path}'''							)
							hf_model.save_pretrained(_UpperCamelCase							)


if __name__ == "__main__":
							UpperCAmelCase    :     Optional[Any]   						=		argparse.ArgumentParser()
							# Required parameters
							parser.add_argument(
							    '--swiftformer_name',
							    default='swiftformer_xs',
							    choices=['swiftformer_xs', 'swiftformer_s', 'swiftformer_l1', 'swiftformer_l3'],
							    type=str,
							    help='Name of the SwiftFormer model you\'d like to convert.',
							)
							parser.add_argument(
							    '--pytorch_dump_folder_path',
							    default='./converted_outputs/',
							    type=str,
							    help='Path to the output PyTorch model directory.',
							)
							parser.add_argument('--original_ckpt', default=None, type=str, help='Path to the original model checkpoint.')

							UpperCAmelCase    :     Tuple   						=		parser.parse_args()
							convert_swiftformer_checkpoint(args.swiftformer_name, args.pytorch_dump_folder_path, args.original_ckpt)
