from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowerCamelCase     :					Union[str, Any]				  =						logging.get_logger(__name__)

__lowerCamelCase     :					str				  =						{
    '''tau/splinter-base''': '''https://huggingface.co/tau/splinter-base/resolve/main/config.json''',
    '''tau/splinter-base-qass''': '''https://huggingface.co/tau/splinter-base-qass/resolve/main/config.json''',
    '''tau/splinter-large''': '''https://huggingface.co/tau/splinter-large/resolve/main/config.json''',
    '''tau/splinter-large-qass''': '''https://huggingface.co/tau/splinter-large-qass/resolve/main/config.json''',
    # See all Splinter models at https://huggingface.co/models?filter=splinter
}







class __snake_case							(		lowerCamelCase_						):
   lowerCAmelCase_								=				"splinter"




   def __init__(       self     :							Optional[int]			,      _lowercase     :							Tuple=3_05_22			,      _lowercase     :							str=7_68			,      _lowercase     :							List[Any]=12			,      _lowercase     :							Optional[int]=12			,      _lowercase     :							Optional[int]=30_72			,      _lowercase     :							int="gelu"			,      _lowercase     :							Dict=0.1			,      _lowercase     :							Dict=0.1			,      _lowercase     :							Optional[Any]=5_12			,      _lowercase     :							List[str]=2			,      _lowercase     :							Union[str, Any]=0.02			,      _lowercase     :							List[Any]=1E-12			,      _lowercase     :							List[str]=True			,      _lowercase     :							Optional[Any]=0			,      _lowercase     :							List[Any]=1_04			,      **_lowercase     :							Dict			,      ):



     """simple docstring"""






     super().__init__(pad_token_id=_lowercase			,      **_lowercase )

     SCREAMING_SNAKE_CASE__     				= vocab_size
     SCREAMING_SNAKE_CASE__     				= max_position_embeddings
     SCREAMING_SNAKE_CASE__     				= hidden_size
     SCREAMING_SNAKE_CASE__     				= num_hidden_layers
     SCREAMING_SNAKE_CASE__     				= num_attention_heads
     SCREAMING_SNAKE_CASE__     				= intermediate_size
     SCREAMING_SNAKE_CASE__     				= hidden_act
     SCREAMING_SNAKE_CASE__     				= hidden_dropout_prob
     SCREAMING_SNAKE_CASE__     				= attention_probs_dropout_prob
     SCREAMING_SNAKE_CASE__     				= initializer_range
     SCREAMING_SNAKE_CASE__     				= type_vocab_size
     SCREAMING_SNAKE_CASE__     				= layer_norm_eps
     SCREAMING_SNAKE_CASE__     				= use_cache
     SCREAMING_SNAKE_CASE__     				= question_token_id

import unittest

import torch

from diffusers import DDIMScheduler, TextToVideoZeroPipeline
from diffusers.utils import load_pt, require_torch_gpu, slow

from ..test_pipelines_common import assert_mean_pixel_difference







@slow
@require_torch_gpu
class __snake_case							(		unittest.TestCase						):




   def       __a		(       self     :							List[Any] ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__     				= """runwayml/stable-diffusion-v1-5"""
     SCREAMING_SNAKE_CASE__     				= TextToVideoZeroPipeline.from_pretrained(_lowercase			,      torch_dtype=torch.floataa ).to("""cuda""" )
     SCREAMING_SNAKE_CASE__     				= DDIMScheduler.from_config(pipe.scheduler.config )
     SCREAMING_SNAKE_CASE__     				= torch.Generator(device="""cuda""" ).manual_seed(0 )

     SCREAMING_SNAKE_CASE__     				= """A bear is playing a guitar on Times Square"""
     SCREAMING_SNAKE_CASE__     				= pipe(prompt=_lowercase			,      generator=_lowercase ).images

     SCREAMING_SNAKE_CASE__     				= load_pt(
         """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/text-to-video/A bear is playing a guitar on Times Square.pt""" )

     assert_mean_pixel_difference(_lowercase			,      _lowercase )
