

from dataclasses import dataclass
from typing import Optional

import numpy as np
import torch
import torch.nn as nn

from ..utils import BaseOutput, is_torch_version, randn_tensor
from .attention_processor import SpatialNorm
from .unet_ad_blocks import UNetMidBlockaD, get_down_block, get_up_block






@dataclass
class 	A_		(	SCREAMING_SNAKE_CASE    ):
							_UpperCAmelCase   :  torch.FloatTensor






class 	A_		(	nn.Module    ):
							def __init__(		self		:      Dict       ,SCREAMING_SNAKE_CASE__		:      int=3       ,SCREAMING_SNAKE_CASE__		:      int=3       ,SCREAMING_SNAKE_CASE__		:      Optional[int]=("DownEncoderBlock2D",)       ,SCREAMING_SNAKE_CASE__		:      Optional[Any]=(6_4,)       ,SCREAMING_SNAKE_CASE__		:      Any=2       ,SCREAMING_SNAKE_CASE__		:      Any=3_2       ,SCREAMING_SNAKE_CASE__		:      int="silu"       ,SCREAMING_SNAKE_CASE__		:      Dict=True       ,):
								super().__init__()
								__lowerCamelCase    :    List[Any] 	=			layers_per_block

								__lowerCamelCase    :    Any 	=			torch.nn.Convad(
								    SCREAMING_SNAKE_CASE__       ,block_out_channels[0]       ,kernel_size=3       ,stride=1       ,padding=1       ,)

								__lowerCamelCase    :    Any 	=			None
								__lowerCamelCase    :    str 	=			nn.ModuleList([])

								# down
								__lowerCamelCase    :    int 	=			block_out_channels[0]
								for i, down_block_type in enumerate(SCREAMING_SNAKE_CASE__):
									__lowerCamelCase    :    int 	=			output_channel
									__lowerCamelCase    :    Dict 	=			block_out_channels[i]
									__lowerCamelCase    :    Tuple 	=			i == len(SCREAMING_SNAKE_CASE__) - 1

									__lowerCamelCase    :    Union[str, Any] 	=			get_down_block(
									    SCREAMING_SNAKE_CASE__       ,num_layers=self.layers_per_block       ,in_channels=SCREAMING_SNAKE_CASE__       ,out_channels=SCREAMING_SNAKE_CASE__       ,add_downsample=not is_final_block       ,resnet_eps=1E-6       ,downsample_padding=0       ,resnet_act_fn=SCREAMING_SNAKE_CASE__       ,resnet_groups=SCREAMING_SNAKE_CASE__       ,attention_head_dim=SCREAMING_SNAKE_CASE__       ,temb_channels=SCREAMING_SNAKE_CASE__       ,)
									self.down_blocks.append(SCREAMING_SNAKE_CASE__)

								# mid
								__lowerCamelCase    :    List[Any] 	=			UNetMidBlockaD(
								    in_channels=block_out_channels[-1]       ,resnet_eps=1E-6       ,resnet_act_fn=SCREAMING_SNAKE_CASE__       ,output_scale_factor=1       ,resnet_time_scale_shift='default'       ,attention_head_dim=block_out_channels[-1]       ,resnet_groups=SCREAMING_SNAKE_CASE__       ,temb_channels=SCREAMING_SNAKE_CASE__       ,)

								# out
								__lowerCamelCase    :    Union[str, Any] 	=			nn.GroupNorm(num_channels=block_out_channels[-1]       ,num_groups=SCREAMING_SNAKE_CASE__       ,eps=1E-6)
								__lowerCamelCase    :    Union[str, Any] 	=			nn.SiLU()

								__lowerCamelCase    :    str 	=			2 * out_channels if double_z else out_channels
								__lowerCamelCase    :    Any 	=			nn.Convad(block_out_channels[-1]       ,SCREAMING_SNAKE_CASE__       ,3       ,padding=1)

								__lowerCamelCase    :    Union[str, Any] 	=			False


							def    lowerCAmelCase					(		self		:      Union[str, Any]       ,SCREAMING_SNAKE_CASE__		:      List[str]):
								__lowerCamelCase    :    Any 	=			x
								__lowerCamelCase    :    str 	=			self.conv_in(SCREAMING_SNAKE_CASE__)

								if self.training and self.gradient_checkpointing:

									def create_custom_forward(SCREAMING_SNAKE_CASE__		:      Any):
										def custom_forward(*SCREAMING_SNAKE_CASE__		:      List[str]):
											return module(*SCREAMING_SNAKE_CASE__)

										return custom_forward

									# down
									if is_torch_version('>='       ,'1.11.0'):
										for down_block in self.down_blocks:
											__lowerCamelCase    :    Union[str, Any] 	=			torch.utils.checkpoint.checkpoint(
											    create_custom_forward(SCREAMING_SNAKE_CASE__)       ,SCREAMING_SNAKE_CASE__       ,use_reentrant=SCREAMING_SNAKE_CASE__)
										# middle
										__lowerCamelCase    :    Tuple 	=			torch.utils.checkpoint.checkpoint(
										    create_custom_forward(self.mid_block)       ,SCREAMING_SNAKE_CASE__       ,use_reentrant=SCREAMING_SNAKE_CASE__)
									else:
										for down_block in self.down_blocks:
											__lowerCamelCase    :    Optional[int] 	=			torch.utils.checkpoint.checkpoint(create_custom_forward(SCREAMING_SNAKE_CASE__)       ,SCREAMING_SNAKE_CASE__)
										# middle
										__lowerCamelCase    :    List[Any] 	=			torch.utils.checkpoint.checkpoint(create_custom_forward(self.mid_block)       ,SCREAMING_SNAKE_CASE__)

								else:
									# down
									for down_block in self.down_blocks:
										__lowerCamelCase    :    Optional[int] 	=			down_block(SCREAMING_SNAKE_CASE__)

									# middle
									__lowerCamelCase    :    Optional[Any] 	=			self.mid_block(SCREAMING_SNAKE_CASE__)

								# post-process
								__lowerCamelCase    :    List[str] 	=			self.conv_norm_out(SCREAMING_SNAKE_CASE__)
								__lowerCamelCase    :    str 	=			self.conv_act(SCREAMING_SNAKE_CASE__)
								__lowerCamelCase    :    Union[str, Any] 	=			self.conv_out(SCREAMING_SNAKE_CASE__)

								return sample






class 	A_		(	nn.Module    ):
							def __init__(		self		:      Optional[Any]       ,SCREAMING_SNAKE_CASE__		:      Any=3       ,SCREAMING_SNAKE_CASE__		:      int=3       ,SCREAMING_SNAKE_CASE__		:      Tuple=("UpDecoderBlock2D",)       ,SCREAMING_SNAKE_CASE__		:      Optional[Any]=(6_4,)       ,SCREAMING_SNAKE_CASE__		:      int=2       ,SCREAMING_SNAKE_CASE__		:      Tuple=3_2       ,SCREAMING_SNAKE_CASE__		:      str="silu"       ,SCREAMING_SNAKE_CASE__		:      int="group"       ,):
								super().__init__()
								__lowerCamelCase    :    Dict 	=			layers_per_block

								__lowerCamelCase    :    Any 	=			nn.Convad(
								    SCREAMING_SNAKE_CASE__       ,block_out_channels[-1]       ,kernel_size=3       ,stride=1       ,padding=1       ,)

								__lowerCamelCase    :    Optional[int] 	=			None
								__lowerCamelCase    :    Dict 	=			nn.ModuleList([])

								__lowerCamelCase    :    Tuple 	=			in_channels if norm_type == 'spatial' else None

								# mid
								__lowerCamelCase    :    List[Any] 	=			UNetMidBlockaD(
								    in_channels=block_out_channels[-1]       ,resnet_eps=1E-6       ,resnet_act_fn=SCREAMING_SNAKE_CASE__       ,output_scale_factor=1       ,resnet_time_scale_shift='default' if norm_type == 'group' else norm_type       ,attention_head_dim=block_out_channels[-1]       ,resnet_groups=SCREAMING_SNAKE_CASE__       ,temb_channels=SCREAMING_SNAKE_CASE__       ,)

								# up
								__lowerCamelCase    :    List[str] 	=			list(reversed(SCREAMING_SNAKE_CASE__))
								__lowerCamelCase    :    Optional[int] 	=			reversed_block_out_channels[0]
								for i, up_block_type in enumerate(SCREAMING_SNAKE_CASE__):
									__lowerCamelCase    :    str 	=			output_channel
									__lowerCamelCase    :    str 	=			reversed_block_out_channels[i]

									__lowerCamelCase    :    Dict 	=			i == len(SCREAMING_SNAKE_CASE__) - 1

									__lowerCamelCase    :    str 	=			get_up_block(
									    SCREAMING_SNAKE_CASE__       ,num_layers=self.layers_per_block + 1       ,in_channels=SCREAMING_SNAKE_CASE__       ,out_channels=SCREAMING_SNAKE_CASE__       ,prev_output_channel=SCREAMING_SNAKE_CASE__       ,add_upsample=not is_final_block       ,resnet_eps=1E-6       ,resnet_act_fn=SCREAMING_SNAKE_CASE__       ,resnet_groups=SCREAMING_SNAKE_CASE__       ,attention_head_dim=SCREAMING_SNAKE_CASE__       ,temb_channels=SCREAMING_SNAKE_CASE__       ,resnet_time_scale_shift=SCREAMING_SNAKE_CASE__       ,)
									self.up_blocks.append(SCREAMING_SNAKE_CASE__)
									__lowerCamelCase    :    List[Any] 	=			output_channel

								# out
								if norm_type == "spatial":
									__lowerCamelCase    :    Optional[int] 	=			SpatialNorm(block_out_channels[0]       ,SCREAMING_SNAKE_CASE__)
								else:
									__lowerCamelCase    :    Optional[Any] 	=			nn.GroupNorm(num_channels=block_out_channels[0]       ,num_groups=SCREAMING_SNAKE_CASE__       ,eps=1E-6)
								__lowerCamelCase    :    Optional[Any] 	=			nn.SiLU()
								__lowerCamelCase    :    Optional[Any] 	=			nn.Convad(block_out_channels[0]       ,SCREAMING_SNAKE_CASE__       ,3       ,padding=1)

								__lowerCamelCase    :    List[str] 	=			False


							def    lowerCAmelCase					(		self		:      Union[str, Any]       ,SCREAMING_SNAKE_CASE__		:      str       ,SCREAMING_SNAKE_CASE__		:      Optional[Any]=None):
								__lowerCamelCase    :    Tuple 	=			z
								__lowerCamelCase    :    int 	=			self.conv_in(SCREAMING_SNAKE_CASE__)

								__lowerCamelCase    :    Optional[Any] 	=			next(iter(self.up_blocks.parameters())).dtype
								if self.training and self.gradient_checkpointing:

									def create_custom_forward(SCREAMING_SNAKE_CASE__		:      Optional[int]):
										def custom_forward(*SCREAMING_SNAKE_CASE__		:      int):
											return module(*SCREAMING_SNAKE_CASE__)

										return custom_forward

									if is_torch_version('>='       ,'1.11.0'):
										# middle
										__lowerCamelCase    :    Optional[int] 	=			torch.utils.checkpoint.checkpoint(
										    create_custom_forward(self.mid_block)       ,SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__       ,use_reentrant=SCREAMING_SNAKE_CASE__)
										__lowerCamelCase    :    Optional[int] 	=			sample.to(SCREAMING_SNAKE_CASE__)

										# up
										for up_block in self.up_blocks:
											__lowerCamelCase    :    Dict 	=			torch.utils.checkpoint.checkpoint(
											    create_custom_forward(SCREAMING_SNAKE_CASE__)       ,SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__       ,use_reentrant=SCREAMING_SNAKE_CASE__)
									else:
										# middle
										__lowerCamelCase    :    Optional[int] 	=			torch.utils.checkpoint.checkpoint(
										    create_custom_forward(self.mid_block)       ,SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__)
										__lowerCamelCase    :    Union[str, Any] 	=			sample.to(SCREAMING_SNAKE_CASE__)

										# up
										for up_block in self.up_blocks:
											__lowerCamelCase    :    Any 	=			torch.utils.checkpoint.checkpoint(create_custom_forward(SCREAMING_SNAKE_CASE__)       ,SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__)
								else:
									# middle
									__lowerCamelCase    :    str 	=			self.mid_block(SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__)
									__lowerCamelCase    :    int 	=			sample.to(SCREAMING_SNAKE_CASE__)

									# up
									for up_block in self.up_blocks:
										__lowerCamelCase    :    int 	=			up_block(SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__)

        # post-process
								if latent_embeds is None:
									__lowerCamelCase    :    List[Any] 	=			self.conv_norm_out(SCREAMING_SNAKE_CASE__)
								else:
									__lowerCamelCase    :    Tuple 	=			self.conv_norm_out(SCREAMING_SNAKE_CASE__       ,SCREAMING_SNAKE_CASE__)
								__lowerCamelCase    :    Optional[Any] 	=			self.conv_act(SCREAMING_SNAKE_CASE__)
								__lowerCamelCase    :    Optional[Any] 	=			self.conv_out(SCREAMING_SNAKE_CASE__)

								return sample






class 	A_		(	nn.Module    ):
							def __init__(		self		:      List[Any]       ,SCREAMING_SNAKE_CASE__		:      Optional[int]       ,SCREAMING_SNAKE_CASE__		:      Optional[int]       ,SCREAMING_SNAKE_CASE__		:      int       ,SCREAMING_SNAKE_CASE__		:      Union[str, Any]=None       ,SCREAMING_SNAKE_CASE__		:      Union[str, Any]="random"       ,SCREAMING_SNAKE_CASE__		:      Tuple=False       ,SCREAMING_SNAKE_CASE__		:      Optional[Any]=True):
								super().__init__()
								__lowerCamelCase    :    Optional[int] 	=			n_e
								__lowerCamelCase    :    Optional[int] 	=			vq_embed_dim
								__lowerCamelCase    :    Dict 	=			beta
								__lowerCamelCase    :    List[Any] 	=			legacy

								__lowerCamelCase    :    Optional[Any] 	=			nn.Embedding(self.n_e       ,self.vq_embed_dim)
								self.embedding.weight.data.uniform_(-1.0 / self.n_e       ,1.0 / self.n_e)

								__lowerCamelCase    :    str 	=			remap
								if self.remap is not None:
									self.register_buffer('used'       ,torch.tensor(np.load(self.remap)))
									__lowerCamelCase    :    str 	=			self.used.shape[0]
									__lowerCamelCase    :    Any 	=			unknown_index  # "random" or "extra" or integer
									if self.unknown_index == "extra":
										__lowerCamelCase    :    Tuple 	=			self.re_embed
										__lowerCamelCase    :    List[Any] 	=			self.re_embed + 1
									print(
									    F"Remapping {self.n_e} indices to {self.re_embed} indices. "
									    F"Using {self.unknown_index} for unknown indices.")
								else:
									__lowerCamelCase    :    List[str] 	=			n_e

								__lowerCamelCase    :    Dict 	=			sane_index_shape
							def    lowerCAmelCase					(		self		:      int       ,SCREAMING_SNAKE_CASE__		:      Dict):
								__lowerCamelCase    :    Union[str, Any] 	=			inds.shape
								assert len(SCREAMING_SNAKE_CASE__) > 1
								__lowerCamelCase    :    Union[str, Any] 	=			inds.reshape(ishape[0]       ,-1)
								__lowerCamelCase    :    Dict 	=			self.used.to(SCREAMING_SNAKE_CASE__)
								__lowerCamelCase    :    str 	=			(inds[:, :, None] == used[None, None, ...]).long()
								__lowerCamelCase    :    Optional[int] 	=			match.argmax(-1)
								__lowerCamelCase    :    Any 	=			match.sum(2) < 1
								if self.unknown_index == "random":
									__lowerCamelCase    :    Union[str, Any] 	=			torch.randint(0       ,self.re_embed       ,size=new[unknown].shape).to(device=new.device)
								else:
									__lowerCamelCase    :    Any 	=			self.unknown_index
								return new.reshape(SCREAMING_SNAKE_CASE__)
							def    lowerCAmelCase					(		self		:      Union[str, Any]       ,SCREAMING_SNAKE_CASE__		:      Dict):
								__lowerCamelCase    :    Dict 	=			inds.shape
								assert len(SCREAMING_SNAKE_CASE__) > 1
								__lowerCamelCase    :    List[str] 	=			inds.reshape(ishape[0]       ,-1)
								__lowerCamelCase    :    Optional[int] 	=			self.used.to(SCREAMING_SNAKE_CASE__)
								if self.re_embed > self.used.shape[0]:  # extra token
									__lowerCamelCase    :    str 	=			0  # simply set to zero
								__lowerCamelCase    :    Any 	=			torch.gather(used[None, :][inds.shape[0] * [0], :]       ,1       ,SCREAMING_SNAKE_CASE__)
								return back.reshape(SCREAMING_SNAKE_CASE__)
							def    lowerCAmelCase					(		self		:      int       ,SCREAMING_SNAKE_CASE__		:      Optional[int]):
								# reshape z -> (batch, height, width, channel) and flatten
								__lowerCamelCase    :    List[Any] 	=			z.permute(0       ,2       ,3       ,1).contiguous()
								__lowerCamelCase    :    List[str] 	=			z.view(-1       ,self.vq_embed_dim)

								# distances from z to embeddings e_j (z - e)^2 = z^2 + e^2 - 2 e * z
								__lowerCamelCase    :    Optional[int] 	=			torch.argmin(torch.cdist(SCREAMING_SNAKE_CASE__       ,self.embedding.weight)       ,dim=1)

								__lowerCamelCase    :    Any 	=			self.embedding(SCREAMING_SNAKE_CASE__).view(z.shape)
								__lowerCamelCase    :    Any 	=			None
								__lowerCamelCase    :    List[Any] 	=			None

								# compute loss for embedding
								if not self.legacy:
									__lowerCamelCase    :    int 	=			self.beta * torch.mean((z_q.detach() - z) ** 2) + torch.mean((z_q - z.detach()) ** 2)
								else:
									__lowerCamelCase    :    Optional[Any] 	=			torch.mean((z_q.detach() - z) ** 2) + self.beta * torch.mean((z_q - z.detach()) ** 2)

								# preserve gradients
								__lowerCamelCase    :    Union[str, Any] 	=			z + (z_q - z).detach()

								# reshape back to match original input shape
								__lowerCamelCase    :    str 	=			z_q.permute(0       ,3       ,1       ,2).contiguous()

								if self.remap is not None:
									__lowerCamelCase    :    Optional[Any] 	=			min_encoding_indices.reshape(z.shape[0]       ,-1)  # add batch axis
									__lowerCamelCase    :    List[Any] 	=			self.remap_to_used(SCREAMING_SNAKE_CASE__)
									__lowerCamelCase    :    str 	=			min_encoding_indices.reshape(-1       ,1)  # flatten

								if self.sane_index_shape:
									__lowerCamelCase    :    Union[str, Any] 	=			min_encoding_indices.reshape(z_q.shape[0]       ,z_q.shape[2]       ,z_q.shape[3])

								return z_q, loss, (perplexity, min_encodings, min_encoding_indices)


							def    lowerCAmelCase					(		self		:      List[str]       ,SCREAMING_SNAKE_CASE__		:      Any       ,SCREAMING_SNAKE_CASE__		:      Union[str, Any]):
								# shape specifying (batch, height, width, channel)
								if self.remap is not None:
									__lowerCamelCase    :    Dict 	=			indices.reshape(shape[0]       ,-1)  # add batch axis
									__lowerCamelCase    :    str 	=			self.unmap_to_all(SCREAMING_SNAKE_CASE__)
									__lowerCamelCase    :    List[str] 	=			indices.reshape(-1)  # flatten again

								# get quantized latent vectors
								__lowerCamelCase    :    int 	=			self.embedding(SCREAMING_SNAKE_CASE__)

								if shape is not None:
									__lowerCamelCase    :    Optional[int] 	=			z_q.view(SCREAMING_SNAKE_CASE__)
									# reshape back to match original input shape
									__lowerCamelCase    :    List[str] 	=			z_q.permute(0       ,3       ,1       ,2).contiguous()

								return z_q






class 	A_		(	SCREAMING_SNAKE_CASE    ):
							def __init__(		self		:      int       ,SCREAMING_SNAKE_CASE__		:      List[str]       ,SCREAMING_SNAKE_CASE__		:      Any=False):
								__lowerCamelCase    :    Union[str, Any] 	=			parameters
								__lowerCamelCase	,			__lowerCamelCase    :    Any 	=			torch.chunk(SCREAMING_SNAKE_CASE__       ,2       ,dim=1)
								__lowerCamelCase    :    str 	=			torch.clamp(self.logvar       ,-30.0       ,20.0)
								__lowerCamelCase    :    Any 	=			deterministic
								__lowerCamelCase    :    List[Any] 	=			torch.exp(0.5 * self.logvar)
								__lowerCamelCase    :    Tuple 	=			torch.exp(self.logvar)
								if self.deterministic:
									__lowerCamelCase    :    List[str] 	=			torch.zeros_like(
									    self.mean       ,device=self.parameters.device       ,dtype=self.parameters.dtype)
							def    lowerCAmelCase					(		self		:      str       ,SCREAMING_SNAKE_CASE__		:      Optional[torch.Generator] = None):
								# make sure sample is on the same device as the parameters and has same dtype
								__lowerCamelCase    :    Any 	=			randn_tensor(
								    self.mean.shape       ,generator=SCREAMING_SNAKE_CASE__       ,device=self.parameters.device       ,dtype=self.parameters.dtype)
								__lowerCamelCase    :    str 	=			self.mean + self.std * sample
								return x
							def    lowerCAmelCase					(		self		:      Dict       ,SCREAMING_SNAKE_CASE__		:      Dict=None):
								if self.deterministic:
									return torch.Tensor([0.0])
								else:
									if other is None:
										return 0.5 * torch.sum(torch.pow(self.mean       ,2) + self.var - 1.0 - self.logvar       ,dim=[1, 2, 3])
									else:
										return 0.5 * torch.sum(
										    torch.pow(self.mean - other.mean       ,2) / other.var
										    + self.var / other.var
										    - 1.0
										    - self.logvar
										    + other.logvar       ,dim=[1, 2, 3]       ,)
							def    lowerCAmelCase					(		self		:      str       ,SCREAMING_SNAKE_CASE__		:      int       ,SCREAMING_SNAKE_CASE__		:      Any=[1, 2, 3]):
								if self.deterministic:
									return torch.Tensor([0.0])
								__lowerCamelCase    :    Dict 	=			np.log(2.0 * np.pi)
								return 0.5 * torch.sum(logtwopi + self.logvar + torch.pow(sample - self.mean       ,2) / self.var       ,dim=SCREAMING_SNAKE_CASE__)


							def    lowerCAmelCase					(		self		:      int):
								return self.mean







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


a		={
    """configuration_mask2former""": [
        """MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """Mask2FormerConfig""",
    ],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					a		=["""Mask2FormerImageProcessor"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					a		=[
					    """MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """Mask2FormerForUniversalSegmentation""",
					    """Mask2FormerModel""",
					    """Mask2FormerPreTrainedModel""",
					]

if TYPE_CHECKING:
					from .configuration_maskaformer import MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskaFormerConfig

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .image_processing_maskaformer import MaskaFormerImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_maskaformer import (
										    MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    MaskaFormerForUniversalSegmentation,
										    MaskaFormerModel,
										    MaskaFormerPreTrainedModel,
										)


else:
					import sys

					a		=_LazyModule(__name__, globals()["""__file__"""], _import_structure)




