
from ...processing_utils import ProcessorMixin


class        lowercase      (	_SCREAMING_SNAKE_CASE     ):
		__lowercase : str			  =       ["image_processor", "feature_extractor"]
		__lowercase : List[Any]			  =       "TvltImageProcessor"
		__lowercase : Union[str, Any]			  =       "TvltFeatureExtractor"



		def __init__(				self       ,   A_       ,   A_ )						->      Dict:
				"""simple docstring"""
				super().__init__(image_processor=A_       ,   feature_extractor=A_ )

				UpperCamelCase						=  image_processor
				UpperCamelCase						=  feature_extractor



		def __call__(				self       ,   A_=None       ,   A_=None       ,   A_=None       ,   A_=None       ,   A_=False       ,   A_=False       ,   *A_       ,   **A_       ,   )						->      Optional[Any]:
				"""simple docstring"""

				if images is None and audio is None:
						raise ValueError('You need to specify either an `images` or `audio` input to process.' )

				UpperCamelCase						=  None
				if images is not None:
						UpperCamelCase						=  self.image_processor(A_       ,   mask_pixel=A_       ,   *A_       ,   **A_ )
				if images_mixed is not None:
						UpperCamelCase						=  self.image_processor(A_       ,   is_mixed=A_       ,   *A_       ,   **A_ )
				if audio is not None:
						UpperCamelCase						=  self.feature_extractor(
						    A_       ,   *A_       ,   sampling_rate=A_       ,   mask_audio=A_       ,   **A_ )

				UpperCamelCase						=  {}
				if audio is not None:
						output_dict.update(A_ )
				if images is not None:
						output_dict.update(A_ )
				if images_mixed_dict is not None:
						output_dict.update(A_ )
				return output_dict



		@property
		def __UpperCamelCase				(				self )						->      int:
				"""simple docstring"""
				UpperCamelCase						=  self.image_processor.model_input_names
				UpperCamelCase						=  self.feature_extractor.model_input_names
				return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names ) )


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase      :				Union[str, Any]          = {
    "configuration_git": ["GIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "GitConfig", "GitVisionConfig"],
    "processing_git": ["GitProcessor"],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					_UpperCAmelCase      :				Dict          = [
					    "GIT_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "GitForCausalLM",
					    "GitModel",
					    "GitPreTrainedModel",
					    "GitVisionModel",
					]

if TYPE_CHECKING:
					from .configuration_git import GIT_PRETRAINED_CONFIG_ARCHIVE_MAP, GitConfig, GitVisionConfig
					from .processing_git import GitProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_git import (
										    GIT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    GitForCausalLM,
										    GitModel,
										    GitPreTrainedModel,
										    GitVisionModel,
										)

else:
					import sys

					_UpperCAmelCase      :				int          = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
