





"""simple docstring"""





import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils





class       snake_case		(       unittest.TestCase       ):

      @patch('''diffusers.utils.hub_utils.get_full_repo_name'''						)
      def 						SCREAMING_SNAKE_CASE_      (      self       :Optional[int]						,							_lowerCamelCase       :Mock						):
       __SCREAMING_SNAKE_CASE			:      Tuple 							=	'''full_repo_name'''
       with TemporaryDirectory() as tmpdir:
        # Dummy args values
        __SCREAMING_SNAKE_CASE			:      str 							=	Mock()
        __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	tmpdir
        __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	0
        __SCREAMING_SNAKE_CASE			:      Optional[int] 							=	'''hub_token'''
        __SCREAMING_SNAKE_CASE			:      int 							=	'''dataset_name'''
        __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	0.0_1
        __SCREAMING_SNAKE_CASE			:      List[Any] 							=	1_0_0_0_0_0
        __SCREAMING_SNAKE_CASE			:      List[str] 							=	1_0_0_0_0
        __SCREAMING_SNAKE_CASE			:      int 							=	0.0_1
        __SCREAMING_SNAKE_CASE			:      Any 							=	0.0_2
        __SCREAMING_SNAKE_CASE			:      Dict 							=	0.0_3
        __SCREAMING_SNAKE_CASE			:      Any 							=	0.0_0_0_5
        __SCREAMING_SNAKE_CASE			:      List[Any] 							=	0.0_0_0_0_0_1
        __SCREAMING_SNAKE_CASE			:      int 							=	1
        __SCREAMING_SNAKE_CASE			:      List[Any] 							=	1_0
        __SCREAMING_SNAKE_CASE			:      List[Any] 							=	0.0_0_1
        __SCREAMING_SNAKE_CASE			:      List[str] 							=	0.1
        __SCREAMING_SNAKE_CASE			:      int 							=	0.2
        __SCREAMING_SNAKE_CASE			:      Dict 							=	True

        # Model card mush be rendered and saved
        diffusers.utils.hub_utils.create_model_card(_lowerCamelCase						,							model_name='''model_name'''						)
        self.assertTrue((Path(_lowerCamelCase						) / '''README.md''').is_file()						)








"""simple docstring"""





from ..utils import DummyObject, requires_backends





class       snake_case		(       metaclass=__UpperCAmelCase       ):
      lowerCamelCase__      =			['''torch''', '''transformers''', '''invisible_watermark''']

      def __init__(      self       :Optional[int]						,							*_lowerCamelCase       :int						,							**_lowerCamelCase       :Any						):
       requires_backends(self						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Dict						,							*_lowerCamelCase       :Optional[Any]						,							**_lowerCamelCase       :int						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)



      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Optional[int]						,							*_lowerCamelCase       :Optional[Any]						,							**_lowerCamelCase       :Union[str, Any]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)







class       snake_case		(       metaclass=__UpperCAmelCase       ):
      lowerCamelCase__      =			['''torch''', '''transformers''', '''invisible_watermark''']

      def __init__(      self       :Dict						,							*_lowerCamelCase       :Dict						,							**_lowerCamelCase       :Optional[Any]						):
       requires_backends(self						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :Optional[int]						,							*_lowerCamelCase       :int						,							**_lowerCamelCase       :Optional[int]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)



      @classmethod
      def 						SCREAMING_SNAKE_CASE_      (      cls       :List[Any]						,							*_lowerCamelCase       :Dict						,							**_lowerCamelCase       :List[str]						):
       requires_backends(cls						,							['''torch''', '''transformers''', '''invisible_watermark''']						)

