
import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir





@dataclass
class 							UpperCAmelCase   :




		'''simple docstring'''





		snake_case_      					=  42





class 							UpperCAmelCase   (						unittest.TestCase						):




		'''simple docstring'''





		def        UpperCamelCase_						( self      :				str				):
						__A         =				get_tests_dir("fixtures/test_sentencepiece.model"				)
						__A         =				get_tests_dir("fixtures/test_sentencepiece_with_bytefallback.model"				)

						__A         =				FakeOriginalTokenizer(vocab_file=A				)

						with warnings.catch_warnings(record=A				) as w:
										__A         =				SpmConverter(A				)
						self.assertEqual(len(A				)							,0				)

						__A         =				FakeOriginalTokenizer(vocab_file=A				)

						with warnings.catch_warnings(record=A				) as w:
										__A         =				SpmConverter(A				)
						self.assertEqual(len(A				)							,1				)

						self.assertIn(
						    "The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option"
						    " which is not implemented in the fast tokenizers."							,str(w[0].message				)							,)


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


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