





import gc
import unittest

import numpy as np
import torch
from torch.backends.cuda import sdp_kernel

from diffusers import (
    CMStochasticIterativeScheduler,
    ConsistencyModelPipeline,
    UNetaDModel,
)
from diffusers.utils import randn_tensor, slow, torch_device
from diffusers.utils.testing_utils import enable_full_determinism, require_torch_a, require_torch_gpu

from ..pipeline_params import UNCONDITIONAL_IMAGE_GENERATION_BATCH_PARAMS, UNCONDITIONAL_IMAGE_GENERATION_PARAMS
from ..test_pipelines_common import PipelineTesterMixin


enable_full_determinism()





class 		_A(   snake_case_							,					unittest.TestCase  ):


				"""simple docstring"""


				UpperCamelCase       :    Tuple          =      ConsistencyModelPipeline
				UpperCamelCase       :    Union[str, Any]          =      UNCONDITIONAL_IMAGE_GENERATION_PARAMS
				UpperCamelCase       :    Dict          =      UNCONDITIONAL_IMAGE_GENERATION_BATCH_PARAMS

				# Override required_optional_params to remove num_images_per_prompt
				UpperCamelCase       :    Union[str, Any]          =      frozenset(
				    [
				        '''num_inference_steps''',
				        '''generator''',
				        '''latents''',
				        '''output_type''',
				        '''return_dict''',
				        '''callback''',
				        '''callback_steps''',
				    ]  )



				@property
				def    UpperCAmelCase_						(     self	):
									__A      :		str         =							UNetaDModel.from_pretrained(
									    'diffusers/consistency-models-test'	,   subfolder='test_unet'	,   )
									return unet



				@property
				def    UpperCAmelCase_						(     self	):
									__A      :		int         =							UNetaDModel.from_pretrained(
									    'diffusers/consistency-models-test'	,   subfolder='test_unet_class_cond'	,   )
									return unet



				def    UpperCAmelCase_						(     self	,   _A=False	):
									if class_cond:
														__A      :		str         =							self.dummy_cond_unet
									else:
														__A      :		Optional[Any]         =							self.dummy_uncond_unet

									# Default to CM multistep sampler
									__A      :		Optional[int]         =							CMStochasticIterativeScheduler(
									    num_train_timesteps=40	,   sigma_min=0.0_0_2	,   sigma_max=80.0	,   )

									__A      :		Tuple         =							{
									    'unet': unet,
									    'scheduler': scheduler,
									}

									return components



				def    UpperCAmelCase_						(     self	,   _A	,   _A=0	):
									if str(_A	).startswith('mps'	):
														__A      :		List[Any]         =							torch.manual_seed(_A	)
									else:
														__A      :		Any         =							torch.Generator(device=_A	).manual_seed(_A	)

									__A      :		Optional[Any]         =							{
									    'batch_size': 1,
									    'num_inference_steps': None,
									    'timesteps': [22, 0],
									    'generator': generator,
									    'output_type': 'np',
									}

									return inputs



				def    UpperCAmelCase_						(     self	):
									__A      :		Optional[int]         =							'cpu'  # ensure determinism for the device-dependent torch.Generator
									__A      :		str         =							self.get_dummy_components()
									__A      :		List[str]         =							ConsistencyModelPipeline(**_A	)
									__A      :		Any         =							pipe.to(_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		Optional[int]         =							self.get_dummy_inputs(_A	)
									__A      :		Optional[int]         =							pipe(**_A	).images
									assert image.shape == (1, 32, 32, 3)

									__A      :		Any         =							image[0, -3:, -3:, -1]
									__A      :		int         =							np.array([0.3_5_7_2, 0.6_2_7_3, 0.4_0_3_1, 0.3_9_6_1, 0.4_3_2_1, 0.5_7_3_0, 0.5_2_6_6, 0.4_7_8_0, 0.5_0_0_4]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3



				def    UpperCAmelCase_						(     self	):
									__A      :		Dict         =							'cpu'  # ensure determinism for the device-dependent torch.Generator
									__A      :		int         =							self.get_dummy_components(class_cond=_A	)
									__A      :		Union[str, Any]         =							ConsistencyModelPipeline(**_A	)
									__A      :		Optional[int]         =							pipe.to(_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		Tuple         =							self.get_dummy_inputs(_A	)
									__A      :		List[str]         =							0
									__A      :		Optional[Any]         =							pipe(**_A	).images
									assert image.shape == (1, 32, 32, 3)

									__A      :		str         =							image[0, -3:, -3:, -1]
									__A      :		List[Any]         =							np.array([0.3_5_7_2, 0.6_2_7_3, 0.4_0_3_1, 0.3_9_6_1, 0.4_3_2_1, 0.5_7_3_0, 0.5_2_6_6, 0.4_7_8_0, 0.5_0_0_4]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3



				def    UpperCAmelCase_						(     self	):
									__A      :		str         =							'cpu'  # ensure determinism for the device-dependent torch.Generator
									__A      :		str         =							self.get_dummy_components()
									__A      :		Optional[Any]         =							ConsistencyModelPipeline(**_A	)
									__A      :		Tuple         =							pipe.to(_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		Dict         =							self.get_dummy_inputs(_A	)
									__A      :		Optional[Any]         =							1
									__A      :		Any         =							None
									__A      :		Optional[int]         =							pipe(**_A	).images
									assert image.shape == (1, 32, 32, 3)

									__A      :		int         =							image[0, -3:, -3:, -1]
									__A      :		Tuple         =							np.array([0.5_0_0_4, 0.5_0_0_4, 0.4_9_9_4, 0.5_0_0_8, 0.4_9_7_6, 0.5_0_1_8, 0.4_9_9_0, 0.4_9_8_2, 0.4_9_8_7]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3





				def    UpperCAmelCase_						(     self	):
									__A      :		Any         =							'cpu'  # ensure determinism for the device-dependent torch.Generator
									__A      :		Optional[Any]         =							self.get_dummy_components(class_cond=_A	)
									__A      :		Tuple         =							ConsistencyModelPipeline(**_A	)
									__A      :		Any         =							pipe.to(_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		List[Any]         =							self.get_dummy_inputs(_A	)
									__A      :		Tuple         =							1
									__A      :		Dict         =							None
									__A      :		Optional[Any]         =							0
									__A      :		int         =							pipe(**_A	).images
									assert image.shape == (1, 32, 32, 3)

									__A      :		Dict         =							image[0, -3:, -3:, -1]
									__A      :		Optional[Any]         =							np.array([0.5_0_0_4, 0.5_0_0_4, 0.4_9_9_4, 0.5_0_0_8, 0.4_9_7_6, 0.5_0_1_8, 0.4_9_9_0, 0.4_9_8_2, 0.4_9_8_7]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3





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


				"""simple docstring"""


				def    UpperCAmelCase_						(     self	):
									super().tearDown()
									gc.collect()
									torch.cuda.empty_cache()



				def    UpperCAmelCase_						(     self	,   _A=0	,   _A=False	,   _A="cpu"	,   _A=torch.floataa	,   _A=(1, 3, 64, 64)	):
									__A      :		Dict         =							torch.manual_seed(_A	)

									__A      :		Dict         =							{
									    'num_inference_steps': None,
									    'timesteps': [22, 0],
									    'class_labels': 0,
									    'generator': generator,
									    'output_type': 'np',
									}

									if get_fixed_latents:
														__A      :		Dict         =							self.get_fixed_latents(seed=_A	,   device=_A	,   dtype=_A	,   shape=_A	)
														__A      :		int         =							latents

									return inputs



				def    UpperCAmelCase_						(     self	,   _A=0	,   _A="cpu"	,   _A=torch.floataa	,   _A=(1, 3, 64, 64)	):
									if type(_A	) == str:
														__A      :		List[str]         =							torch.device(_A	)
									__A      :		int         =							torch.Generator(device=_A	).manual_seed(_A	)
									__A      :		Union[str, Any]         =							randn_tensor(_A	,   generator=_A	,   device=_A	,   dtype=_A	)
									return latents



				def    UpperCAmelCase_						(     self	):
									__A      :		Any         =							UNetaDModel.from_pretrained('diffusers/consistency_models'	,   subfolder='diffusers_cd_imagenet64_l2'	)
									__A      :		int         =							CMStochasticIterativeScheduler(
									    num_train_timesteps=40	,   sigma_min=0.0_0_2	,   sigma_max=80.0	,   )
									__A      :		Tuple         =							ConsistencyModelPipeline(unet=_A	,   scheduler=_A	)
									pipe.to(torch_device=_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		Any         =							self.get_inputs()
									__A      :		int         =							pipe(**_A	).images
									assert image.shape == (1, 64, 64, 3)

									__A      :		List[str]         =							image[0, -3:, -3:, -1]

									__A      :		Optional[int]         =							np.array([0.0_8_8_8, 0.0_8_8_1, 0.0_6_6_6, 0.0_4_7_9, 0.0_2_9_2, 0.0_1_9_5, 0.0_2_0_1, 0.0_1_6_3, 0.0_2_5_4]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 2e-2



				def    UpperCAmelCase_						(     self	):
									__A      :		List[str]         =							UNetaDModel.from_pretrained('diffusers/consistency_models'	,   subfolder='diffusers_cd_imagenet64_l2'	)
									__A      :		List[Any]         =							CMStochasticIterativeScheduler(
									    num_train_timesteps=40	,   sigma_min=0.0_0_2	,   sigma_max=80.0	,   )
									__A      :		Union[str, Any]         =							ConsistencyModelPipeline(unet=_A	,   scheduler=_A	)
									pipe.to(torch_device=_A	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		List[str]         =							self.get_inputs()
									__A      :		Tuple         =							1
									__A      :		List[str]         =							None
									__A      :		Tuple         =							pipe(**_A	).images
									assert image.shape == (1, 64, 64, 3)

									__A      :		Dict         =							image[0, -3:, -3:, -1]

									__A      :		int         =							np.array([0.0_3_4_0, 0.0_1_5_2, 0.0_0_6_3, 0.0_2_6_7, 0.0_2_2_1, 0.0_1_0_7, 0.0_4_1_6, 0.0_1_8_6, 0.0_2_1_7]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 2e-2



				@require_torch_a
				def    UpperCAmelCase_						(     self	):
									__A      :		str         =							UNetaDModel.from_pretrained('diffusers/consistency_models'	,   subfolder='diffusers_cd_imagenet64_l2'	)
									__A      :		Optional[int]         =							CMStochasticIterativeScheduler(
									    num_train_timesteps=40	,   sigma_min=0.0_0_2	,   sigma_max=80.0	,   )
									__A      :		int         =							ConsistencyModelPipeline(unet=_A	,   scheduler=_A	)
									pipe.to(torch_device=_A	,   torch_dtype=torch.floataa	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		str         =							self.get_inputs(get_fixed_latents=_A	,   device=_A	)
									# Ensure usage of flash attention in torch 2.0
									with sdp_kernel(enable_flash=_A	,   enable_math=_A	,   enable_mem_efficient=_A	):
														__A      :		List[str]         =							pipe(**_A	).images
									assert image.shape == (1, 64, 64, 3)

									__A      :		int         =							image[0, -3:, -3:, -1]

									__A      :		List[str]         =							np.array([0.1_8_7_5, 0.1_4_2_8, 0.1_2_8_9, 0.2_1_5_1, 0.2_0_9_2, 0.1_4_7_7, 0.1_8_7_7, 0.1_6_4_1, 0.1_3_5_3]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3





				@require_torch_a
				def    UpperCAmelCase_						(     self	):
									__A      :		int         =							UNetaDModel.from_pretrained('diffusers/consistency_models'	,   subfolder='diffusers_cd_imagenet64_l2'	)
									__A      :		int         =							CMStochasticIterativeScheduler(
									    num_train_timesteps=40	,   sigma_min=0.0_0_2	,   sigma_max=80.0	,   )
									__A      :		List[str]         =							ConsistencyModelPipeline(unet=_A	,   scheduler=_A	)
									pipe.to(torch_device=_A	,   torch_dtype=torch.floataa	)
									pipe.set_progress_bar_config(disable=_A	)

									__A      :		Any         =							self.get_inputs(get_fixed_latents=_A	,   device=_A	)
									__A      :		int         =							1
									__A      :		Optional[int]         =							None
									# Ensure usage of flash attention in torch 2.0
									with sdp_kernel(enable_flash=_A	,   enable_math=_A	,   enable_mem_efficient=_A	):
														__A      :		int         =							pipe(**_A	).images
									assert image.shape == (1, 64, 64, 3)

									__A      :		List[str]         =							image[0, -3:, -3:, -1]

									__A      :		List[str]         =							np.array([0.1_6_6_3, 0.1_9_4_8, 0.2_2_7_5, 0.1_6_8_0, 0.1_2_0_4, 0.1_2_4_5, 0.1_8_5_8, 0.1_3_3_8, 0.2_0_9_5]	)

									assert np.abs(image_slice.flatten() - expected_slice	).max() < 1e-3






import unittest

from transformers import AlbertTokenizer, AlbertTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


__A							=get_tests_dir('''fixtures/spiece.model''')




@require_sentencepiece
@require_tokenizers
class        _SCREAMING_SNAKE_CASE	( snake_case_     ,			unittest.TestCase		):
	lowerCAmelCase__   =					AlbertTokenizer
	lowerCAmelCase__   =					AlbertTokenizerFast
	lowerCAmelCase__   =					True
	lowerCAmelCase__   =					True
	lowerCAmelCase__   =					True



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Any:
					super().setUp()

					# We have a SentencePiece fixture for testing
					lowerCamelCase_         =     AlbertTokenizer(lowercase					)
					tokenizer.save_pretrained(self.tmpdirname					)



	def        SCREAMING_SNAKE_CASE_(       self		,    lowercase					)							->			str:
					lowerCamelCase_         =     "this is a test"
					lowerCamelCase_         =     "this is a test"
					return input_text, output_text



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Dict:
					lowerCamelCase_         =     "<pad>"
					lowerCamelCase_         =     0

					self.assertEqual(self.get_tokenizer()._convert_token_to_id(lowercase					)		,    lowercase					)
					self.assertEqual(self.get_tokenizer()._convert_id_to_token(lowercase					)		,    lowercase					)



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Any:
					lowerCamelCase_         =     list(self.get_tokenizer().get_vocab().keys()					)

					self.assertEqual(vocab_keys[0]		,    "<pad>"					)
					self.assertEqual(vocab_keys[1]		,    "<unk>"					)
					self.assertEqual(vocab_keys[-1]		,    "▁eloquent"					)
					self.assertEqual(len(lowercase					)		,    30000					)



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Union[str, Any]:
					self.assertEqual(self.get_tokenizer().vocab_size		,    30000					)



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Union[str, Any]:
					if not self.test_rust_tokenizer:
									return

					lowerCamelCase_         =     self.get_tokenizer()
					lowerCamelCase_         =     self.get_rust_tokenizer()

					lowerCamelCase_         =     "I was born in 92000, and this is falsé."

					lowerCamelCase_         =     tokenizer.tokenize(lowercase					)
					lowerCamelCase_         =     rust_tokenizer.tokenize(lowercase					)
					self.assertListEqual(lowercase		,    lowercase					)

					lowerCamelCase_         =     tokenizer.encode(lowercase		,    add_special_tokens=lowercase					)
					lowerCamelCase_         =     rust_tokenizer.encode(lowercase		,    add_special_tokens=lowercase					)
					self.assertListEqual(lowercase		,    lowercase					)

					lowerCamelCase_         =     self.get_rust_tokenizer()
					lowerCamelCase_         =     tokenizer.encode(lowercase					)
					lowerCamelCase_         =     rust_tokenizer.encode(lowercase					)
					self.assertListEqual(lowercase		,    lowercase					)



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Optional[Any]:
					lowerCamelCase_         =     AlbertTokenizer(lowercase		,    keep_accents=lowercase					)

					lowerCamelCase_         =     tokenizer.tokenize("This is a test"					)
					self.assertListEqual(lowercase		,    ["▁this", "▁is", "▁a", "▁test"]					)

					self.assertListEqual(tokenizer.convert_tokens_to_ids(lowercase					)		,    [48, 25, 21, 1289]					)

					lowerCamelCase_         =     tokenizer.tokenize("I was born in 92000, and this is falsé."					)
					self.assertListEqual(
					    lowercase		,    ["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "é", "."]					)
					lowerCamelCase_         =     tokenizer.convert_tokens_to_ids(lowercase					)
					self.assertListEqual(lowercase		,    [31, 23, 386, 19, 561, 3050, 15, 17, 48, 25, 8256, 18, 1, 9]					)

					lowerCamelCase_         =     tokenizer.convert_ids_to_tokens(lowercase					)
					self.assertListEqual(
					    lowercase		,    ["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "<unk>", "."]		,    )



	def        SCREAMING_SNAKE_CASE_(       self					)							->			Any:
					lowerCamelCase_         =     AlbertTokenizer(lowercase					)

					lowerCamelCase_         =     tokenizer.encode("sequence builders"					)
					lowerCamelCase_         =     tokenizer.encode("multi-sequence build"					)

					lowerCamelCase_         =     tokenizer.build_inputs_with_special_tokens(lowercase					)
					lowerCamelCase_         =     tokenizer.build_inputs_with_special_tokens(lowercase		,    lowercase					)

					assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
					assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
					    tokenizer.sep_token_id
					]



	@slow
	def        SCREAMING_SNAKE_CASE_(       self					)							->			Optional[Any]:
					# fmt: off
					lowerCamelCase_         =     {"attention_mask": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "input_ids": [[2, 21970, 13, 5, 6092, 167, 28, 7103, 2153, 673, 8, 7028, 12051, 18, 17, 7103, 2153, 673, 8, 3515, 18684, 8, 4461, 6, 1927, 297, 8, 12060, 2607, 18, 13, 5, 4461, 15, 10538, 38, 8, 135, 15, 822, 58, 15, 993, 10363, 15, 1460, 8005, 4461, 15, 993, 255, 2328, 9, 9, 9, 6, 26, 1112, 816, 3260, 13, 5, 103, 2377, 6, 17, 1112, 816, 2782, 13, 5, 103, 10641, 6, 29, 84, 2512, 2430, 782, 18684, 2761, 19, 808, 2430, 2556, 17, 855, 1480, 9477, 4091, 128, 11712, 15, 7103, 2153, 673, 17, 24883, 9990, 9, 3], [2, 11502, 25, 1006, 20, 782, 8, 11809, 855, 1732, 19393, 18667, 37, 367, 21018, 69, 1854, 34, 11860, 19124, 27, 156, 225, 17, 193, 4141, 19, 65, 9124, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 14, 2231, 886, 2385, 17659, 84, 14, 16792, 1952, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "token_type_ids": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
					# fmt: on

					self.tokenizer_integration_test_util(
					    expected_encoding=lowercase		,    model_name="albert-base-v2"		,    revision="6b6560eaf5ff2e250b00c50f380c5389a9c2d82e"		,    )


