"""simple docstring"""



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 SCREAMING_SNAKE_CASE     (    unittest.TestCase	):







 """simple docstring"""


 def        _lowerCAmelCase				(   self		:      List[Any]				)				->			Any:




    '''simple docstring'''






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

    a__     				=		'A bear is playing a guitar on Times Square'
    a__     				=		pipe(prompt=_snake_case					,   generator=_snake_case				).images

    a__     				=		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(_snake_case					,   _snake_case				)



"""simple docstring"""



from typing import TYPE_CHECKING

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


__magic_name__    				=					{"configuration_hubert": ["HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "HubertConfig"]}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __magic_name__    				=					[
         "HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "HubertForCTC",
         "HubertForSequenceClassification",
         "HubertModel",
         "HubertPreTrainedModel",
     ]


try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __magic_name__    				=					[
         "TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "TFHubertForCTC",
         "TFHubertModel",
         "TFHubertPreTrainedModel",
     ]

if TYPE_CHECKING:
     from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_hubert import (
              HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
              HubertForCTC,
              HubertForSequenceClassification,
              HubertModel,
              HubertPreTrainedModel,
          )

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_hubert import (
              TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
              TFHubertForCTC,
              TFHubertModel,
              TFHubertPreTrainedModel,
          )


else:
     import sys

     __magic_name__    				=					_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


