





from dataclasses import dataclass
from typing import Optional, Tuple, Union

import flax
import jax.numpy as jnp
from scipy import integrate

from ..configuration_utils import ConfigMixin, register_to_config
from .scheduling_utils_flax import (
    CommonSchedulerState,
    FlaxKarrasDiffusionSchedulers,
    FlaxSchedulerMixin,
    FlaxSchedulerOutput,
    broadcast_to_shape_from_left,
)



@flax.struct.dataclass
class 				_UpperCamelCase       :
       _UpperCamelCase					:       CommonSchedulerState

       # setable values
       _UpperCamelCase					:       jnp.ndarray
       _UpperCamelCase					:       jnp.ndarray
       _UpperCamelCase					:       jnp.ndarray
       _UpperCamelCase					:       Optional[int]       = None

       # running values
       _UpperCamelCase					:       Optional[jnp.ndarray]       = None

       @classmethod
       def lowercase			(		cls:			str       , _SCREAMING_SNAKE_CASE:			CommonSchedulerState       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			jnp.ndarray		)							->			List[str]:




              """simple docstring"""


              return cls(common=_SCREAMING_SNAKE_CASE       , init_noise_sigma=_SCREAMING_SNAKE_CASE       , timesteps=_SCREAMING_SNAKE_CASE       , sigmas=_SCREAMING_SNAKE_CASE		)



@dataclass
class 				_UpperCamelCase       (						lowerCAmelCase_  ):
       _UpperCamelCase					:       LMSDiscreteSchedulerState



class 				_UpperCamelCase       (						lowerCAmelCase_	,    lowerCAmelCase_  ):
       _UpperCamelCase					:       Optional[int]       = [e.name for e in FlaxKarrasDiffusionSchedulers]

       _UpperCamelCase					:       jnp.dtype

       @property
       def lowercase			(		self:			Optional[Any]		)							->			Tuple:




              """simple docstring"""


              return True

       @register_to_config
       def __init__(		self:			Tuple       , _SCREAMING_SNAKE_CASE:			int = 1000       , _SCREAMING_SNAKE_CASE:			float = 0.00_01       , _SCREAMING_SNAKE_CASE:			float = 0.02       , _SCREAMING_SNAKE_CASE:			str = "linear"       , _SCREAMING_SNAKE_CASE:			Optional[jnp.ndarray] = None       , _SCREAMING_SNAKE_CASE:			str = "epsilon"       , _SCREAMING_SNAKE_CASE:			jnp.dtype = jnp.floataa       , )							->			List[str]:




              """simple docstring"""


              UpperCamelCase_ 							=	dtype

       def lowercase			(		self:			List[Any]       , _SCREAMING_SNAKE_CASE:			Optional[CommonSchedulerState] = None		)							->			LMSDiscreteSchedulerState:




              """simple docstring"""


              if common is None:
                     UpperCamelCase_ 							=	CommonSchedulerState.create(self		)

              UpperCamelCase_ 							=	jnp.arange(0       , self.config.num_train_timesteps		).round()[::-1]
              UpperCamelCase_ 							=	((1 - common.alphas_cumprod) / common.alphas_cumprod) ** 0.5

              # standard deviation of the initial noise distribution
              UpperCamelCase_ 							=	sigmas.max()

              return LMSDiscreteSchedulerState.create(
                  common=_SCREAMING_SNAKE_CASE       , init_noise_sigma=_SCREAMING_SNAKE_CASE       , timesteps=_SCREAMING_SNAKE_CASE       , sigmas=_SCREAMING_SNAKE_CASE       , )

       def lowercase			(		self:			Optional[Any]       , _SCREAMING_SNAKE_CASE:			LMSDiscreteSchedulerState       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			int		)							->			jnp.ndarray:




              """simple docstring"""


              ((UpperCamelCase_)							,			) 							=	jnp.where(state.timesteps == timestep       , size=1		)
              UpperCamelCase_ 							=	step_index[0]

              UpperCamelCase_ 							=	state.sigmas[step_index]
              UpperCamelCase_ 							=	sample / ((sigma**2 + 1) ** 0.5)
              return sample

       def lowercase			(		self:			Dict       , _SCREAMING_SNAKE_CASE:			LMSDiscreteSchedulerState       , _SCREAMING_SNAKE_CASE:			List[str]       , _SCREAMING_SNAKE_CASE:			List[str]       , _SCREAMING_SNAKE_CASE:			int		)							->			Union[str, Any]:




              """simple docstring"""


              def lms_derivative(_SCREAMING_SNAKE_CASE:			Dict		):
                     UpperCamelCase_ 							=	1.0
                     for k in range(_SCREAMING_SNAKE_CASE		):
                            if current_order == k:
                                   continue
                            prod *= (tau - state.sigmas[t - k]) / (state.sigmas[t - current_order] - state.sigmas[t - k])
                     return prod

              UpperCamelCase_ 							=	integrate.quad(_SCREAMING_SNAKE_CASE       , state.sigmas[t]       , state.sigmas[t + 1]       , epsrel=1e-4		)[0]

              return integrated_coeff

       def lowercase			(		self:			int       , _SCREAMING_SNAKE_CASE:			LMSDiscreteSchedulerState       , _SCREAMING_SNAKE_CASE:			int       , _SCREAMING_SNAKE_CASE:			Tuple = ()		)							->			LMSDiscreteSchedulerState:




              """simple docstring"""


              UpperCamelCase_ 							=	jnp.linspace(self.config.num_train_timesteps - 1       , 0       , _SCREAMING_SNAKE_CASE       , dtype=self.dtype		)

              UpperCamelCase_ 							=	jnp.floor(_SCREAMING_SNAKE_CASE		).astype(jnp.intaa		)
              UpperCamelCase_ 							=	jnp.ceil(_SCREAMING_SNAKE_CASE		).astype(jnp.intaa		)

              UpperCamelCase_ 							=	jnp.mod(_SCREAMING_SNAKE_CASE       , 1.0		)

              UpperCamelCase_ 							=	((1 - state.common.alphas_cumprod) / state.common.alphas_cumprod) ** 0.5
              UpperCamelCase_ 							=	(1 - frac) * sigmas[low_idx] + frac * sigmas[high_idx]
              UpperCamelCase_ 							=	jnp.concatenate([sigmas, jnp.array([0.0]       , dtype=self.dtype		)]		)

              UpperCamelCase_ 							=	timesteps.astype(jnp.intaa		)

              # initial running values
              UpperCamelCase_ 							=	jnp.zeros((0,) + shape       , dtype=self.dtype		)

              return state.replace(
                  timesteps=_SCREAMING_SNAKE_CASE       , sigmas=_SCREAMING_SNAKE_CASE       , num_inference_steps=_SCREAMING_SNAKE_CASE       , derivatives=_SCREAMING_SNAKE_CASE       , )

       def lowercase			(		self:			Optional[Any]       , _SCREAMING_SNAKE_CASE:			LMSDiscreteSchedulerState       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			int       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			int = 4       , _SCREAMING_SNAKE_CASE:			bool = True       , )							->			Union[FlaxLMSSchedulerOutput, Tuple]:




              """simple docstring"""


              if state.num_inference_steps is None:
                     raise ValueError(
                         "Number of inference steps is 'None', you need to run 'set_timesteps' after creating the scheduler"		)

              UpperCamelCase_ 							=	state.sigmas[timestep]

              # 1. compute predicted original sample (x_0) from sigma-scaled predicted noise
              if self.config.prediction_type == "epsilon":
                     UpperCamelCase_ 							=	sample - sigma * model_output
              elif self.config.prediction_type == "v_prediction":
                     # * c_out + input * c_skip
                     UpperCamelCase_ 							=	model_output * (-sigma / (sigma**2 + 1) ** 0.5) + (sample / (sigma**2 + 1))
              else:
                     raise ValueError(
                         f'''prediction_type given as {self.config.prediction_type} must be one of `epsilon`, or `v_prediction`'''		)

              # 2. Convert to an ODE derivative
              UpperCamelCase_ 							=	(sample - pred_original_sample) / sigma
              UpperCamelCase_ 							=	state.replace(derivatives=jnp.append(state.derivatives       , _SCREAMING_SNAKE_CASE		)		)
              if len(state.derivatives		) > order:
                     UpperCamelCase_ 							=	state.replace(derivatives=jnp.delete(state.derivatives       , 0		)		)

              # 3. Compute linear multistep coefficients
              UpperCamelCase_ 							=	min(timestep + 1       , _SCREAMING_SNAKE_CASE		)
              UpperCamelCase_ 							=	[self.get_lms_coefficient(_SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE		) for curr_order in range(_SCREAMING_SNAKE_CASE		)]

              # 4. Compute previous sample based on the derivatives path
              UpperCamelCase_ 							=	sample + sum(
                  coeff * derivative for coeff, derivative in zip(_SCREAMING_SNAKE_CASE       , reversed(state.derivatives		)		)		)

              if not return_dict:
                     return (prev_sample, state)

              return FlaxLMSSchedulerOutput(prev_sample=_SCREAMING_SNAKE_CASE       , state=_SCREAMING_SNAKE_CASE		)

       def lowercase			(		self:			Dict       , _SCREAMING_SNAKE_CASE:			LMSDiscreteSchedulerState       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , _SCREAMING_SNAKE_CASE:			jnp.ndarray       , )							->			jnp.ndarray:




              """simple docstring"""


              UpperCamelCase_ 							=	state.sigmas[timesteps].flatten()
              UpperCamelCase_ 							=	broadcast_to_shape_from_left(_SCREAMING_SNAKE_CASE       , noise.shape		)

              UpperCamelCase_ 							=	original_samples + noise * sigma

              return noisy_samples



       def __len__(		self:			int		)							->			Union[str, Any]:




              """simple docstring"""


              return self.config.num_train_timesteps


from ..utils import DummyObject, requires_backends





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Any		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  int		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  int		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  int		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Dict		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  List[str]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  str		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Union[str, Any]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)





class   lowerCAmelCase    (       metaclass=_a      ):
     _SCREAMING_SNAKE_CASE  :  Optional[int]		=["""vision"""]



     def __init__(       self					,   *lowerCAmelCase__					,   **lowerCAmelCase__							):
            requires_backends(self					,   ['vision']							)