






import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


UpperCAmelCase__            =	2 << 20  # 2mb
UpperCAmelCase__            =	get_logger(__name__)






class 	lowercase_      (			lowercase     ):






      '''simple docstring'''




      def    __lowerCAmelCase      (   self   :		str						)					->Optional[int]:




       """simple docstring"""


       a							=   self._options.get_all_options().get('''runner'''						)
       return runner in [None, "DirectRunner", "PortableRunner"]
def 		_a					(   a				:Optional[Any]			,							a				:int			,							a				:List[str]=False				)							->    int:
 a							=   FileSystems
 if fs.exists(a				):
  if force_upload:
   logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""				)
  else:
   logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""				)
   return
 with fs.create(a				) as remote_file:
  with open(a			,							'''rb'''				) as local_file:
   a							=   local_file.read(a				)
   while chunk:
    remote_file.write(a				)
    a							=   local_file.read(a				)

def 		_a					(   a				:Dict			,							a				:Any			,							a				:List[str]=False				)							->    List[str]:
 a							=   FileSystems
 if os.path.exists(a				):
  if force_download:
   logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""				)
  else:
   logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""				)
   return
 with fs.open(a				) as remote_file:
  with open(a			,							'''wb'''				) as local_file:
   a							=   remote_file.read(a				)
   while chunk:
    local_file.write(a				)
    a							=   remote_file.read(a				)










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


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


