




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       ):
	"""simple docstring"""



	@patch("diffusers.utils.hub_utils.get_full_repo_name"							)
	def 							__UpperCAmelCase							(				self    :					Tuple ,				__lowerCamelCase    :					Mock							) ->					None:
				a   =      "full_repo_name"
				with TemporaryDirectory() as tmpdir:
							# Dummy args values
							a   =      Mock()
							a   =      tmpdir
							a   =      0
							a   =      "hub_token"
							a   =      "dataset_name"
							a   =      0.01
							a   =      10_00_00
							a   =      1_00_00
							a   =      0.01
							a   =      0.02
							a   =      0.03
							a   =      0.0_005
							a   =      0.000_001
							a   =      1
							a   =      10
							a   =      0.001
							a   =      0.1
							a   =      0.2
							a   =      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()							)












from ..utils import DummyObject, requires_backends




class    snake_case__							(metaclass=_UpperCamelCase       ):
				"""simple docstring"""



				SCREAMING_SNAKE_CASE_	:							List[str]										= ["""torch""", """transformers""", """k_diffusion"""]





				def __init__(				self    :					Optional[int] ,				*__lowerCamelCase    :					Union[str, Any] ,				**__lowerCamelCase    :					List[Any]							) ->					Optional[Any]:
							requires_backends(self ,				["torch", "transformers", "k_diffusion"]							)





				@classmethod
				def 							__UpperCAmelCase							(				cls    :					str ,				*__lowerCamelCase    :					Union[str, Any] ,				**__lowerCamelCase    :					Tuple							) ->					List[Any]:
							requires_backends(cls ,				["torch", "transformers", "k_diffusion"]							)





				@classmethod
				def 							__UpperCAmelCase							(				cls    :					Optional[Any] ,				*__lowerCamelCase    :					List[str] ,				**__lowerCamelCase    :					int							) ->					Dict:
							requires_backends(cls ,				["torch", "transformers", "k_diffusion"]							)






