



'''simple docstring'''




import argparse
import os

import torch

from diffusers import (
    CMStochasticIterativeScheduler,
    ConsistencyModelPipeline,
    UNetaDModel,
)


a   :			Union[str, Any]					  =    {
    """sample_size""": 3_2,
    """in_channels""": 3,
    """out_channels""": 3,
    """layers_per_block""": 2,
    """num_class_embeds""": 1_0_0_0,
    """block_out_channels""": [3_2, 6_4],
    """attention_head_dim""": 8,
    """down_block_types""": [
        """ResnetDownsampleBlock2D""",
        """AttnDownBlock2D""",
    ],
    """up_block_types""": [
        """AttnUpBlock2D""",
        """ResnetUpsampleBlock2D""",
    ],
    """resnet_time_scale_shift""": """scale_shift""",
    """upsample_type""": """resnet""",
    """downsample_type""": """resnet""",
}

a   :			Optional[int]					  =    {
    """sample_size""": 6_4,
    """in_channels""": 3,
    """out_channels""": 3,
    """layers_per_block""": 3,
    """num_class_embeds""": 1_0_0_0,
    """block_out_channels""": [1_9_2, 1_9_2 * 2, 1_9_2 * 3, 1_9_2 * 4],
    """attention_head_dim""": 6_4,
    """down_block_types""": [
        """ResnetDownsampleBlock2D""",
        """AttnDownBlock2D""",
        """AttnDownBlock2D""",
        """AttnDownBlock2D""",
    ],
    """up_block_types""": [
        """AttnUpBlock2D""",
        """AttnUpBlock2D""",
        """AttnUpBlock2D""",
        """ResnetUpsampleBlock2D""",
    ],
    """resnet_time_scale_shift""": """scale_shift""",
    """upsample_type""": """resnet""",
    """downsample_type""": """resnet""",
}

a   :			int					  =    {
    """sample_size""": 2_5_6,
    """in_channels""": 3,
    """out_channels""": 3,
    """layers_per_block""": 2,
    """num_class_embeds""": None,
    """block_out_channels""": [2_5_6, 2_5_6, 2_5_6 * 2, 2_5_6 * 2, 2_5_6 * 4, 2_5_6 * 4],
    """attention_head_dim""": 6_4,
    """down_block_types""": [
        """ResnetDownsampleBlock2D""",
        """ResnetDownsampleBlock2D""",
        """ResnetDownsampleBlock2D""",
        """AttnDownBlock2D""",
        """AttnDownBlock2D""",
        """AttnDownBlock2D""",
    ],
    """up_block_types""": [
        """AttnUpBlock2D""",
        """AttnUpBlock2D""",
        """AttnUpBlock2D""",
        """ResnetUpsampleBlock2D""",
        """ResnetUpsampleBlock2D""",
        """ResnetUpsampleBlock2D""",
    ],
    """resnet_time_scale_shift""": """default""",
    """upsample_type""": """resnet""",
    """downsample_type""": """resnet""",
}

a   :			int					  =    {
    """num_train_timesteps""": 4_0,
    """sigma_min""": 0.0_0_2,
    """sigma_max""": 8_0.0,
}

a   :			int					  =    {
    """num_train_timesteps""": 2_0_1,
    """sigma_min""": 0.0_0_2,
    """sigma_max""": 8_0.0,
}

a   :			Tuple					  =    {
    """num_train_timesteps""": 1_5_1,
    """sigma_min""": 0.0_0_2,
    """sigma_max""": 8_0.0,
}



def       __lowerCamelCase  (					_lowercase		)      ->			Tuple:
							if isinstance(_lowercase	,				_lowercase		):
														return v
							if v.lower() in ("yes", "true", "t", "y", "1"):
														return True
							elif v.lower() in ("no", "false", "f", "n", "0"):
														return False
							else:
														raise argparse.ArgumentTypeError("""boolean value expected"""		)



def       __lowerCamelCase  (					_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				_lowercase=False		)      ->			Any:
							UpperCAmelCase     :		Dict							     =		checkpoint[F'''{old_prefix}.in_layers.0.weight''']
							UpperCAmelCase     :		Optional[int]							     =		checkpoint[F'''{old_prefix}.in_layers.0.bias''']
							UpperCAmelCase     :		int							     =		checkpoint[F'''{old_prefix}.in_layers.2.weight''']
							UpperCAmelCase     :		Union[str, Any]							     =		checkpoint[F'''{old_prefix}.in_layers.2.bias''']
							UpperCAmelCase     :		Union[str, Any]							     =		checkpoint[F'''{old_prefix}.emb_layers.1.weight''']
							UpperCAmelCase     :		Union[str, Any]							     =		checkpoint[F'''{old_prefix}.emb_layers.1.bias''']
							UpperCAmelCase     :		Optional[Any]							     =		checkpoint[F'''{old_prefix}.out_layers.0.weight''']
							UpperCAmelCase     :		Tuple							     =		checkpoint[F'''{old_prefix}.out_layers.0.bias''']
							UpperCAmelCase     :		Any							     =		checkpoint[F'''{old_prefix}.out_layers.3.weight''']
							UpperCAmelCase     :		int							     =		checkpoint[F'''{old_prefix}.out_layers.3.bias''']

							if has_skip:
														UpperCAmelCase     :		int							     =		checkpoint[F'''{old_prefix}.skip_connection.weight''']
														UpperCAmelCase     :		Tuple							     =		checkpoint[F'''{old_prefix}.skip_connection.bias''']

							return new_checkpoint



def       __lowerCamelCase  (					_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				_lowercase=None		)      ->			Optional[Any]:
							UpperCAmelCase     ,     UpperCAmelCase     ,     UpperCAmelCase     :		Optional[int]							     =		checkpoint[F'''{old_prefix}.qkv.weight'''].chunk(3	,				dim=0		)
							UpperCAmelCase     ,     UpperCAmelCase     ,     UpperCAmelCase     :		Optional[int]							     =		checkpoint[F'''{old_prefix}.qkv.bias'''].chunk(3	,				dim=0		)

							UpperCAmelCase     :		int							     =		checkpoint[F'''{old_prefix}.norm.weight''']
							UpperCAmelCase     :		int							     =		checkpoint[F'''{old_prefix}.norm.bias''']

							UpperCAmelCase     :		Tuple							     =		weight_q.squeeze(-1		).squeeze(-1		)
							UpperCAmelCase     :		Optional[int]							     =		bias_q.squeeze(-1		).squeeze(-1		)
							UpperCAmelCase     :		Optional[Any]							     =		weight_k.squeeze(-1		).squeeze(-1		)
							UpperCAmelCase     :		List[Any]							     =		bias_k.squeeze(-1		).squeeze(-1		)
							UpperCAmelCase     :		Dict							     =		weight_v.squeeze(-1		).squeeze(-1		)
							UpperCAmelCase     :		str							     =		bias_v.squeeze(-1		).squeeze(-1		)

							UpperCAmelCase     :		Union[str, Any]							     =		(
							    checkpoint[F'''{old_prefix}.proj_out.weight'''].squeeze(-1		).squeeze(-1		)
							)
							UpperCAmelCase     :		Dict							     =		checkpoint[F'''{old_prefix}.proj_out.bias'''].squeeze(-1		).squeeze(-1		)

							return new_checkpoint



def       __lowerCamelCase  (					_lowercase	,				_lowercase		)      ->			Optional[int]:
							UpperCAmelCase     :		Union[str, Any]							     =		torch.load(_lowercase	,				map_location="""cpu"""		)
							UpperCAmelCase     :		Optional[int]							     =		{}

							UpperCAmelCase     :		Tuple							     =		checkpoint["""time_embed.0.weight"""]
							UpperCAmelCase     :		Dict							     =		checkpoint["""time_embed.0.bias"""]
							UpperCAmelCase     :		Any							     =		checkpoint["""time_embed.2.weight"""]
							UpperCAmelCase     :		List[str]							     =		checkpoint["""time_embed.2.bias"""]

							if unet_config["num_class_embeds"] is not None:
														UpperCAmelCase     :		Union[str, Any]							     =		checkpoint["""label_emb.weight"""]

							UpperCAmelCase     :		str							     =		checkpoint["""input_blocks.0.0.weight"""]
							UpperCAmelCase     :		int							     =		checkpoint["""input_blocks.0.0.bias"""]

							UpperCAmelCase     :		Tuple							     =		unet_config["""down_block_types"""]
							UpperCAmelCase     :		Any							     =		unet_config["""layers_per_block"""]
							UpperCAmelCase     :		Dict							     =		unet_config["""attention_head_dim"""]
							UpperCAmelCase     :		Optional[Any]							     =		unet_config["""block_out_channels"""]
							UpperCAmelCase     :		Optional[Any]							     =		1
							UpperCAmelCase     :		List[Any]							     =		channels_list[0]

							for i, layer_type in enumerate(_lowercase		):
														UpperCAmelCase     :		List[str]							     =		channels_list[i]
														UpperCAmelCase     :		Any							     =		current_channels != prev_channels
														if layer_type == "ResnetDownsampleBlock2D":
																					for j in range(_lowercase		):
																												UpperCAmelCase     :		Union[str, Any]							     =		F'''down_blocks.{i}.resnets.{j}'''
																												UpperCAmelCase     :		Any							     =		F'''input_blocks.{current_layer}.0'''
																												UpperCAmelCase     :		Optional[int]							     =		True if j == 0 and downsample_block_has_skip else False
																												UpperCAmelCase     :		List[Any]							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				has_skip=_lowercase		)
																												current_layer += 1

														elif layer_type == "AttnDownBlock2D":
																					for j in range(_lowercase		):
																												UpperCAmelCase     :		Tuple							     =		F'''down_blocks.{i}.resnets.{j}'''
																												UpperCAmelCase     :		Optional[Any]							     =		F'''input_blocks.{current_layer}.0'''
																												UpperCAmelCase     :		Optional[int]							     =		True if j == 0 and downsample_block_has_skip else False
																												UpperCAmelCase     :		Optional[Any]							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				has_skip=_lowercase		)
																												UpperCAmelCase     :		Optional[int]							     =		F'''down_blocks.{i}.attentions.{j}'''
																												UpperCAmelCase     :		int							     =		F'''input_blocks.{current_layer}.1'''
																												UpperCAmelCase     :		Dict							     =		convert_attention(
																												    _lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
																												current_layer += 1

														if i != len(_lowercase		) - 1:
																					UpperCAmelCase     :		List[str]							     =		F'''down_blocks.{i}.downsamplers.0'''
																					UpperCAmelCase     :		List[Any]							     =		F'''input_blocks.{current_layer}.0'''
																					UpperCAmelCase     :		Union[str, Any]							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
																					current_layer += 1

														UpperCAmelCase     :		Dict							     =		current_channels

							# hardcoded the mid-block for now
							UpperCAmelCase     :		Any							     =		"""mid_block.resnets.0"""
							UpperCAmelCase     :		str							     =		"""middle_block.0"""
							UpperCAmelCase     :		str							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
							UpperCAmelCase     :		str							     =		"""mid_block.attentions.0"""
							UpperCAmelCase     :		Union[str, Any]							     =		"""middle_block.1"""
							UpperCAmelCase     :		Any							     =		convert_attention(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
							UpperCAmelCase     :		Any							     =		"""mid_block.resnets.1"""
							UpperCAmelCase     :		int							     =		"""middle_block.2"""
							UpperCAmelCase     :		Optional[Any]							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)

							UpperCAmelCase     :		Optional[int]							     =		0
							UpperCAmelCase     :		int							     =		unet_config["""up_block_types"""]

							for i, layer_type in enumerate(_lowercase		):
														if layer_type == "ResnetUpsampleBlock2D":
																					for j in range(layers_per_block + 1		):
																												UpperCAmelCase     :		Dict							     =		F'''up_blocks.{i}.resnets.{j}'''
																												UpperCAmelCase     :		List[Any]							     =		F'''output_blocks.{current_layer}.0'''
																												UpperCAmelCase     :		Tuple							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				has_skip=_lowercase		)
																												current_layer += 1

																					if i != len(_lowercase		) - 1:
																												UpperCAmelCase     :		List[Any]							     =		F'''up_blocks.{i}.upsamplers.0'''
																												UpperCAmelCase     :		List[str]							     =		F'''output_blocks.{current_layer-1}.1'''
																												UpperCAmelCase     :		int							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
														elif layer_type == "AttnUpBlock2D":
																					for j in range(layers_per_block + 1		):
																												UpperCAmelCase     :		str							     =		F'''up_blocks.{i}.resnets.{j}'''
																												UpperCAmelCase     :		Tuple							     =		F'''output_blocks.{current_layer}.0'''
																												UpperCAmelCase     :		List[Any]							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				has_skip=_lowercase		)
																												UpperCAmelCase     :		Optional[Any]							     =		F'''up_blocks.{i}.attentions.{j}'''
																												UpperCAmelCase     :		Dict							     =		F'''output_blocks.{current_layer}.1'''
																												UpperCAmelCase     :		Union[str, Any]							     =		convert_attention(
																												    _lowercase	,				_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)
																												current_layer += 1

																					if i != len(_lowercase		) - 1:
																												UpperCAmelCase     :		List[Any]							     =		F'''up_blocks.{i}.upsamplers.0'''
																												UpperCAmelCase     :		str							     =		F'''output_blocks.{current_layer-1}.2'''
																												UpperCAmelCase     :		Tuple							     =		convert_resnet(_lowercase	,				_lowercase	,				_lowercase	,				_lowercase		)

							UpperCAmelCase     :		Tuple							     =		checkpoint["""out.0.weight"""]
							UpperCAmelCase     :		str							     =		checkpoint["""out.0.bias"""]
							UpperCAmelCase     :		Tuple							     =		checkpoint["""out.2.weight"""]
							UpperCAmelCase     :		int							     =		checkpoint["""out.2.bias"""]

							return new_checkpoint


if __name__ == "__main__":
							a   :			int					  =    argparse.ArgumentParser()

							parser.add_argument("""--unet_path""", default=None, type=str, required=True, help="""Path to the unet.pt to convert.""")
							parser.add_argument(
							    """--dump_path""", default=None, type=str, required=True, help="""Path to output the converted UNet model."""
							)
							parser.add_argument("""--class_cond""", default=True, type=str, help="""Whether the model is class-conditional.""")

							a   :			Union[str, Any]					  =    parser.parse_args()
							a   :			Optional[Any]					  =    strabool(args.class_cond)

							a   :			str					  =    os.path.basename(args.unet_path)
							print(F'''Checkpoint: {ckpt_name}''')

							# Get U-Net config
							if "imagenet64" in ckpt_name:
														a   :			Tuple					  =    IMAGENET_64_UNET_CONFIG
							elif "256" in ckpt_name and (("bedroom" in ckpt_name) or ("cat" in ckpt_name)):
														a   :			List[Any]					  =    LSUN_256_UNET_CONFIG
							elif "test" in ckpt_name:
														a   :			List[str]					  =    TEST_UNET_CONFIG
							else:
														raise ValueError(F'''Checkpoint type {ckpt_name} is not currently supported.''')

							if not args.class_cond:
														a   :			Optional[Any]					  =    None

							a   :			Any					  =    con_pt_to_diffuser(args.unet_path, unet_config)

							a   :			Optional[int]					  =    UNetaDModel(**unet_config)
							image_unet.load_state_dict(converted_unet_ckpt)

							# Get scheduler config
							if "cd" in ckpt_name or "test" in ckpt_name:
														a   :			int					  =    CD_SCHEDULER_CONFIG
							elif "ct" in ckpt_name and "imagenet64" in ckpt_name:
														a   :			Union[str, Any]					  =    CT_IMAGENET_64_SCHEDULER_CONFIG
							elif "ct" in ckpt_name and "256" in ckpt_name and (("bedroom" in ckpt_name) or ("cat" in ckpt_name)):
														a   :			Tuple					  =    CT_LSUN_256_SCHEDULER_CONFIG
							else:
														raise ValueError(F'''Checkpoint type {ckpt_name} is not currently supported.''')

							a   :			Union[str, Any]					  =    CMStochasticIterativeScheduler(**scheduler_config)

							a   :			List[str]					  =    ConsistencyModelPipeline(unet=image_unet, scheduler=cm_scheduler)
							consistency_model.save_pretrained(args.dump_path)






'''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()
a   :			List[Any]					  =    logging.get_logger(__name__)

a   :			Union[str, Any]					  =    torch.device("""cpu""")



def       __lowerCamelCase  (					)      ->			Any:
							UpperCAmelCase     :		Optional[Any]							     =		"""http://images.cocodataset.org/val2017/000000039769.jpg"""
							UpperCAmelCase     :		Dict							     =		Image.open(requests.get(_lowercase	,				stream=_lowercase		).raw		)
							return im



def       __lowerCamelCase  (					_lowercase		)      ->			Dict:
							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  (					_lowercase	,				_lowercase	,				_lowercase		)      ->			str:
							UpperCAmelCase     :		Union[str, Any]							     =		dct.pop(_lowercase		)
							UpperCAmelCase     :		str							     =		val



def       __lowerCamelCase  (					_lowercase		)      ->			List[str]:
							UpperCAmelCase     :		Tuple							     =		[]
							for k in state_dict.keys():
														UpperCAmelCase     :		Dict							     =		k
														if ".pwconv" in k:
																					UpperCAmelCase     :		Union[str, Any]							     =		k_new.replace(""".pwconv"""	,				""".point_wise_conv"""		)
														if ".dwconv" in k:
																					UpperCAmelCase     :		Dict							     =		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     :		Dict							     =		k_new.replace("""patch_embed"""	,				"""swiftformer.patch_embed.patch_embedding"""		)
														if "network" in k_new:
																					UpperCAmelCase     :		Optional[Any]							     =		k_new.split("""."""		)
																					if ls[2].isdigit():
																												UpperCAmelCase     :		Any							     =		"""swiftformer.encoder.network.""" + ls[1] + """.blocks.""" + ls[2] + """.""" + """.""".join(ls[3:]		)
																					else:
																												UpperCAmelCase     :		Any							     =		k_new.replace("""network"""	,				"""swiftformer.encoder.network"""		)
														rename_keys.append((k, k_new)		)
							return rename_keys



@torch.no_grad()
def       __lowerCamelCase  (					_lowercase	,				_lowercase	,				_lowercase		)      ->			Optional[int]:
							UpperCAmelCase     :		Optional[Any]							     =		SwiftFormerConfig()

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

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

							elif swiftformer_name == "swiftformer_s":
														UpperCAmelCase     :		str							     =		[3, 3, 9, 6]
														UpperCAmelCase     :		str							     =		[4_8, 6_4, 1_6_8, 2_2_4]

							elif swiftformer_name == "swiftformer_l1":
														UpperCAmelCase     :		List[Any]							     =		[4, 3, 1_0, 5]
														UpperCAmelCase     :		Union[str, Any]							     =		[4_8, 9_6, 1_9_2, 3_8_4]

							elif swiftformer_name == "swiftformer_l3":
														UpperCAmelCase     :		Any							     =		[4, 4, 1_2, 6]
														UpperCAmelCase     :		List[Any]							     =		[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     :		Dict							     =		torch.hub.load_state_dict_from_url(_lowercase	,				map_location="""cpu"""	,				check_hash=_lowercase		)
														else:
																					UpperCAmelCase     :		Dict							     =		torch.load(_lowercase	,				map_location="""cpu"""		)
							UpperCAmelCase     :		str							     =		checkpoint

							UpperCAmelCase     :		Tuple							     =		create_rename_keys(_lowercase		)
							for rename_key_src, rename_key_dest in rename_keys:
														rename_key(_lowercase	,				_lowercase	,				_lowercase		)

							# load HuggingFace model
							UpperCAmelCase     :		str							     =		SwiftFormerForImageClassification(_lowercase		).eval()
							hf_model.load_state_dict(_lowercase		)

							# prepare test inputs
							UpperCAmelCase     :		Any							     =		prepare_img()
							UpperCAmelCase     :		List[Any]							     =		ViTImageProcessor.from_pretrained("""preprocessor_config"""		)
							UpperCAmelCase     :		List[str]							     =		processor(images=_lowercase	,				return_tensors="""pt"""		)

							# compare outputs from both models
							UpperCAmelCase     :		List[str]							     =		get_expected_output(_lowercase		)
							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]	,				_lowercase	,				atol=1e-3		)

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


if __name__ == "__main__":
							a   :			Tuple					  =    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.""")

							a   :			Union[str, Any]					  =    parser.parse_args()
							convert_swiftformer_checkpoint(args.swiftformer_name, args.pytorch_dump_folder_path, args.original_ckpt)

