
"""simple docstring"""




from typing import TYPE_CHECKING

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


lowerCAmelCase__				=					{
    'configuration_maskformer': ['MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MaskFormerConfig'],
    'configuration_maskformer_swin': ['MaskFormerSwinConfig'],
}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase__				=					['MaskFormerFeatureExtractor']
						lowerCAmelCase__				=					['MaskFormerImageProcessor']


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase__				=					[
						    'MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'MaskFormerForInstanceSegmentation',
						    'MaskFormerModel',
						    'MaskFormerPreTrainedModel',
						]
						lowerCAmelCase__				=					[
						    'MaskFormerSwinBackbone',
						    'MaskFormerSwinModel',
						    'MaskFormerSwinPreTrainedModel',
						]

if TYPE_CHECKING:
						from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
						from .configuration_maskformer_swin import MaskFormerSwinConfig

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_maskformer import MaskFormerFeatureExtractor
												from .image_processing_maskformer import MaskFormerImageProcessor
						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_maskformer import (
												    MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    MaskFormerForInstanceSegmentation,
												    MaskFormerModel,
												    MaskFormerPreTrainedModel,
												)
												from .modeling_maskformer_swin import (
												    MaskFormerSwinBackbone,
												    MaskFormerSwinModel,
												    MaskFormerSwinPreTrainedModel,
												)


else:
						import sys

						lowerCAmelCase__				=					_LazyModule(__name__, globals()['__file__'], _import_structure)



import inspect
import unittest






class      UpperCamelCase(	unittest.TestCase ):


					def 				SCREAMING_SNAKE_CASE_	(    self						:		Dict    )      ->						List[Any]:




											'''simple docstring'''

											try:
																	import diffusers  # noqa: F401
											except ImportError:
																	assert False






					def 				SCREAMING_SNAKE_CASE_	(    self						:		Optional[int]    )      ->						Any:




											'''simple docstring'''

											import diffusers
											from diffusers.dependency_versions_table import deps

											__snake_case				=		inspect.getmembers(SCREAMING_SNAKE_CASE  ,     inspect.isclass    )

											for cls_name, cls_module in all_classes:
																	if "dummy_" in cls_module.__module__:
																							for backend in cls_module._backends:
																													if backend == "k_diffusion":
																																			__snake_case				=		"k-diffusion"
																													elif backend == "invisible_watermark":
																																			__snake_case				=		"invisible-watermark"
																													assert backend in deps, f'''{backend} is not in the deps table!'''





