from transformers.models.cpm.tokenization_cpm import CpmTokenizer
from transformers.testing_utils import custom_tokenizers

from ..xlnet.test_modeling_xlnet import XLNetModelTest





@custom_tokenizers
class 					__snake_case    (     _lowerCamelCase      ):




					def      __a     (  self       ,			__UpperCamelCase       ,			__UpperCamelCase       ,			__UpperCamelCase       ,			__UpperCamelCase       ,			__UpperCamelCase						)	->    Tuple:



									'''simple docstring'''







									return True




					def      __a     (  self						)	->    List[str]:



									'''simple docstring'''







									snake_case__   :      List[str]   				= CpmTokenizer.from_pretrained('TsinghuaAI/CPM-Generate'						)
									snake_case__   :      str   				= 'Hugging Face大法好，谁用谁知道。'
									snake_case__   :      Optional[Any]   				= 'Hugging Face大法好,谁用谁知道。<unk>'
									snake_case__   :      Optional[Any]   				= '▁Hu gg ing ▁ ▂ ▁F ace ▁大法 ▁好 ▁ , ▁谁 ▁用 ▁谁 ▁知 道 ▁ 。'.split()

									snake_case__   :      Union[str, Any]   				= tokenizer.tokenize(__UpperCamelCase						)
									self.assertListEqual(__UpperCamelCase       ,			__UpperCamelCase						)

									snake_case__   :      str   				= tokens + [tokenizer.unk_token]

									snake_case__   :      Optional[int]   				= [13789, 13283, 1421, 8, 10, 1164, 13608, 16528, 63, 8, 9, 440, 108, 440, 121, 90, 8, 12, 0]
									self.assertListEqual(tokenizer.convert_tokens_to_ids(__UpperCamelCase						)       ,			__UpperCamelCase						)

									snake_case__   :      str   				= tokenizer.decode(__UpperCamelCase						)
									self.assertEqual(__UpperCamelCase       ,			__UpperCamelCase						)



from ...utils import is_transformers_available
from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline


if is_transformers_available():
				from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline


