o
    ۷i
                     @   s
  d Z ddlZddlZddlZddlZddlZddlm	Z	m
Z
 ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZmZ d
dlmZ ejdk rTddlZnddlmZ ze a W n e!yk   da Y nw e"e#Z$h dZ%e%&dhZ'ej()dd* Z+ej()dd* Z,ej()dd* Z-ej()dd* Z.ej()dd* Z/e/e%v Z/ej0ej1ej2ej3ej4ej5dZ6dej7v pe8dd ej(D Z9dde:de;de<e;e:f fddZ=e,e'v re+e%vre=d\Z>Z?n	e$@d  dZ>d!Z?d!ZAd!ZBe-e'v r7ejCDd"duoejCDd#duZEeEr6zeFd"ZAeFd#ZBe$@d$eA d%eB d& W n ejGy5   dZEY nw ndZEe.e'v rEe=d'\ZHZIne$@d( dZHd!ZJejCDd)duZKeKrd*ZLdZJeLD ]ZMzeFeMZJW  n ejGyu   Y q_w eJduZKeKre$Nd+eJ  z.d,ZLdZOeLD ]ZMzeFeMZOW  n ejGy   Y qw eOduZPePre$Nd-eO  W n ejGy   dZPY nw ejCDd.duZQzeFd/ZRe$Nd0eR  W n ejGy   dZQY nw ejCDd1duZSzeFd2ZTe$Nd3eT  W n ejGy
   dZSY nw e=d4\ZUZVe=d5\ZWZXe=d6\ZYZZe=d7\Z[Z\e=d8\Z]Z^e=d9\Z_Z`e=d:\ZaZbe=d;\ZcZde=d<\ZeZfe=d=\ZgZhe=d>\ZiZje=d?\ZkZle=d@\ZmZne=dA\ZoZpe=dB\ZqZre=dC\ZsZte=dD\ZuZve=dE\ZwZxe=dF\ZyZze=dG\Z{Z|e=dH\Z}Z~e=dI\ZZe=dJ\ZZe=dK\ZZe=dL\ZZe=dM\ZZe=dN\ZZe=dF\ZyZze=dOdPdQ\ZZe=dR\ZZe=dS\ZZe=dT\ZZe=dU\ZZe=dV\ZZe=dW\ZZe=dX\ZZe=dYdPdQ\ZZe=dZ\ZZe=d[dPdQ\ZZe=d\\ZZd]d^ Zd_d` Zdadb Zdcdd Zdedf Zdgdh Zdidj Zdkdl Zdmdn Zdodp Zdqdr Zdsdt Zdudv Zdwdx Zdydz Zd{d| Zd}d~ Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZe	d.eeffd#eeffd:eeffdeeffdeeffdIeeffdeeffd7eeffd;eeffdJeeffd<eeffd=eeffd>eeffd?eeffdHeeffdAeeffdeeffdBeeffd'eeffdFeeffd@eeffdGeeffdMeeffdNeeffdeeffdReeffdSeeffdTeeffgZdd܄ ZG ddބ deZde:eB de:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fddZede:de:fdd Z ede:de:fddZede:de:fddZdd ZG dd deZG d	d
 d
eZdS (  zD
Import utilities: Utilities related to imports and our lazy inits.
    N)OrderedDictdefaultdict)	lru_cache)chain)
ModuleType)Any)is_jinja_available)Versionparse   )logging)      >   1ONYESTRUEAUTOUSE_TF	USE_TORCHUSE_FLAXUSE_SAFETENSORSDIFFUSERS_SLOW_IMPORTFALSE)>z>=z==z!=z<=<zgoogle.colabc                 c   s    | ]}| d V  qdS )COLAB_N)
startswith).0k r    R/home/ubuntu/vllm_env/lib/python3.10/site-packages/diffusers/utils/import_utils.py	<genexpr>;   s    r"   Fpkg_nameget_dist_namereturnc           
   
   C   s`  t j| d u}d}|rtd u r^ttaz7t D ]0}|dp!d	 }dd |j
p+g D d h }tdd |}|p;|D ]}t| |jd  q<qW n ty] }	 zW Y d }	~	nd }	~	ww z<|r| tv rt|  rtt|  d	krtd
|  dt|  d   t|  d } t| }td|  d|  W ||fS  ttjfy   d}Y ||fS w ||fS )NN/Aztop_level.txt c                 S   s.   h | ]}t |jd kr|jd nt|qS )r   r   )lenpartsinspectgetmodulename)r   fr    r    r!   	<setcomp>K   s    "z(_is_package_available.<locals>.<setcomp>c                 S   s   d| vS )N.r    namer    r    r!   <lambda>N   s    z'_is_package_available.<locals>.<lambda>Namer   z)Multiple distributions found for package z. Picked distribution: r   zSuccessfully imported z	 version F)	importlibutil	find_spec_package_mapr   listimportlib_metadatadistributions	read_textsplitfilesfilterappendmetadata	Exceptionr(   loggerwarningversiondebugImportErrorPackageNotFoundError)
r#   r$   
pkg_existspkg_versiondist_top_level_declared_inferred_opt_names_top_level_inferredpkg_r    r    r!   _is_package_available>   sJ   	
rO   torchz*Disabling PyTorch because USE_TORCH is setr&   jaxflaxzJAX version z, Flax version z available.safetensorsz4Disabling Safetensors because USE_SAFETENSORS is setonnxruntime)rT   zonnxruntime-cannzonnxruntime-directmlort_nightly_directmlzonnxruntime-gpuort_nightly_gpuzonnxruntime-migraphxzonnxruntime-openvinozonnxruntime-qnnzonnxruntime-rocmzonnxruntime-trainingzonnxruntime-vitisaiz*Successfully imported onnxruntime version )zopencv-pythonzopencv-contrib-pythonzopencv-python-headlesszopencv-contrib-python-headlessz"Successfully imported cv2 version bs4beautifulsoup4z#Successfully imported ftfy version imwatermarkzinvisible-watermarkz2Successfully imported invisible-watermark version 	torch_xla	torch_npu	torch_mlutransformershuggingface_hubkernelsinflect	unidecodenote_seqwandbtensorboardcompelsentencepiecetorchsdepefttorchvision
matplotlibtimmbitsandbytesimageioftfyscipylibrosa
acceleratexformersgguftorchaooptimumT)r$   pytorch_retinafacebetter_profanitynltkcosmos_guardrailsageattention
flash_attnflash_attn_3aiterkorniamodeloptavc                   C      t S N)_torch_availabler    r    r    r!   is_torch_available      r   c                   C   r   r   )_torch_xla_availabler    r    r    r!   is_torch_xla_available   r   r   c                   C   r   r   )_torch_npu_availabler    r    r    r!   is_torch_npu_available   r   r   c                   C   r   r   )_torch_mlu_availabler    r    r    r!   is_torch_mlu_available   r   r   c                   C   r   r   )_flax_availabler    r    r    r!   is_flax_available   r   r   c                   C   r   r   )_transformers_availabler    r    r    r!   is_transformers_available   r   r   c                   C   r   r   )_inflect_availabler    r    r    r!   is_inflect_available  r   r   c                   C   r   r   )_unidecode_availabler    r    r    r!   is_unidecode_available  r   r   c                   C   r   r   )_onnx_availabler    r    r    r!   is_onnx_available  r   r   c                   C   r   r   )_opencv_availabler    r    r    r!   is_opencv_available  r   r   c                   C   r   r   )_scipy_availabler    r    r    r!   is_scipy_available  r   r   c                   C   r   r   )_librosa_availabler    r    r    r!   is_librosa_available  r   r   c                   C   r   r   )_xformers_availabler    r    r    r!   is_xformers_available  r   r   c                   C   r   r   )_accelerate_availabler    r    r    r!   is_accelerate_available   r   r   c                   C   r   r   )_kernels_availabler    r    r    r!   is_kernels_available$  r   r   c                   C   r   r   )_note_seq_availabler    r    r    r!   is_note_seq_available(  r   r   c                   C   r   r   )_wandb_availabler    r    r    r!   is_wandb_available,  r   r   c                   C   r   r   )_tensorboard_availabler    r    r    r!   is_tensorboard_available0  r   r   c                   C   r   r   )_compel_availabler    r    r    r!   is_compel_available4  r   r   c                   C   r   r   )_ftfy_availabler    r    r    r!   is_ftfy_available8  r   r   c                   C   r   r   )_bs4_availabler    r    r    r!   is_bs4_available<  r   r   c                   C   r   r   )_torchsde_availabler    r    r    r!   is_torchsde_available@  r   r   c                   C   r   r   )_invisible_watermark_availabler    r    r    r!    is_invisible_watermark_availableD  r   r   c                   C   r   r   )_peft_availabler    r    r    r!   is_peft_availableH  r   r   c                   C   r   r   )_torchvision_availabler    r    r    r!   is_torchvision_availableL  r   r   c                   C   r   r   )_matplotlib_availabler    r    r    r!   is_matplotlib_availableP  r   r   c                   C   r   r   )_safetensors_availabler    r    r    r!   is_safetensors_availableT  r   r   c                   C   r   r   )_bitsandbytes_availabler    r    r    r!   is_bitsandbytes_availableX  r   r   c                   C   r   r   )_is_google_colabr    r    r    r!   is_google_colab\  r   r   c                   C   r   r   )_sentencepiece_availabler    r    r    r!   is_sentencepiece_available`  r   r   c                   C   r   r   )_imageio_availabler    r    r    r!   is_imageio_availabled  r   r   c                   C   r   r   )_gguf_availabler    r    r    r!   is_gguf_availableh  r   r   c                   C   r   r   )_torchao_availabler    r    r    r!   is_torchao_availablel  r   r   c                   C   r   r   )_optimum_quanto_availabler    r    r    r!   is_optimum_quanto_availablep  r   r   c                   C   r   r   )_nvidia_modelopt_availabler    r    r    r!   is_nvidia_modelopt_availablet  r   r   c                   C   r   r   )_timm_availabler    r    r    r!   is_timm_availablex  r   r   c                   C   r   r   )_pytorch_retinaface_availabler    r    r    r!   is_pytorch_retinaface_available|  r   r   c                   C   r   r   )_better_profanity_availabler    r    r    r!   is_better_profanity_available  r   r   c                   C   r   r   )_nltk_availabler    r    r    r!   is_nltk_available  r   r   c                   C   r   r   )_cosmos_guardrail_availabler    r    r    r!   is_cosmos_guardrail_available  r   r   c                   C   s   t dd dD S )Nc                 s   s    | ]	}t j|V  qd S r   )r3   r4   r5   )r   libr    r    r!   r"     s    z#is_hpu_available.<locals>.<genexpr>)habana_frameworkszhabana_frameworks.torch)allr    r    r    r!   is_hpu_available  s   r   c                   C   r   r   )_sageattention_availabler    r    r    r!   is_sageattention_available  r   r   c                   C   r   r   )_flash_attn_availabler    r    r    r!   is_flash_attn_available  r   r   c                   C   r   r   )_flash_attn_3_availabler    r    r    r!   is_flash_attn_3_available  r   r   c                   C   r   r   )_aiter_availabler    r    r    r!   is_aiter_available  r   r   c                   C   r   r   )_kornia_availabler    r    r    r!   is_kornia_available  r   r   c                   C   r   r   )_av_availabler    r    r    r!   is_av_available  r   r   z
{0} requires the FLAX library but it was not found in your environment. Checkout the instructions on the
installation page: https://github.com/google/flax and follow the ones that match your environment.
z
{0} requires the inflect library but it was not found in your environment. You can install it with pip: `pip install
inflect`
z
{0} requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
z
{0} requires the onnxruntime library but it was not found in your environment. You can install it with pip: `pip
install onnxruntime`
z
{0} requires the OpenCV library but it was not found in your environment. You can install it with pip: `pip
install opencv-python`
z{
{0} requires the scipy library but it was not found in your environment. You can install it with pip: `pip install
scipy`
z
{0} requires the librosa library but it was not found in your environment.  Checkout the instructions on the
installation page: https://librosa.org/doc/latest/install.html and follow the ones that match your environment.
z
{0} requires the transformers library but it was not found in your environment. You can install it with pip: `pip
install transformers`
z
{0} requires the unidecode library but it was not found in your environment. You can install it with pip: `pip install
Unidecode`
z
{0} requires the note-seq library but it was not found in your environment. You can install it with pip: `pip
install note-seq`
z{
{0} requires the wandb library but it was not found in your environment. You can install it with pip: `pip
install wandb`
z
{0} requires the tensorboard library but it was not found in your environment. You can install it with pip: `pip
install tensorboard`
z}
{0} requires the compel library but it was not found in your environment. You can install it with pip: `pip install compel`
z
{0} requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:
`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.
a8  
{0} requires the ftfy library but it was not found in your environment. Checkout the instructions on the
installation section: https://github.com/rspeer/python-ftfy/tree/master#installing and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.
z
{0} requires the torchsde library but it was not found in your environment. You can install it with pip: `pip install torchsde`
z
{0} requires the invisible-watermark library but it was not found in your environment. You can install it with pip: `pip install invisible-watermark>=0.2.0`
zy
{0} requires the peft library but it was not found in your environment. You can install it with pip: `pip install peft`
z
{0} requires the safetensors library but it was not found in your environment. You can install it with pip: `pip install safetensors`
z
{0} requires the sentencepiece library but it was not found in your environment. You can install it with pip: `pip install sentencepiece`
z
{0} requires the bitsandbytes library but it was not found in your environment. You can install it with pip: `pip install bitsandbytes`
z
{0} requires the imageio library and ffmpeg but it was not found in your environment. You can install it with pip: `pip install imageio imageio-ffmpeg`
zy
{0} requires the gguf library but it was not found in your environment. You can install it with pip: `pip install gguf`
z
{0} requires the torchao library but it was not found in your environment. You can install it with pip: `pip install
torchao`
z
{0} requires the optimum-quanto library but it was not found in your environment. You can install it with pip: `pip
install optimum-quanto`
z
{0} requires the pytorch_retinaface library but it was not found in your environment. You can install it with pip: `pip install pytorch_retinaface`
z
{0} requires the better_profanity library but it was not found in your environment. You can install it with pip: `pip install better_profanity`
zy
{0} requires the nltk library but it was not found in your environment. You can install it with pip: `pip install nltk`
onnxopencvinvisible_watermarkquantoc                    s   t |ttfs
|g}t| dr| jn| jj dd |D } fdd|D }|r/td| dv r@tdd	r@td
  d dv rQtddrStd  dd S d S )N__name__c                 s   s    | ]}t | V  qd S r   )BACKENDS_MAPPING)r   backendr    r    r!   r"   m  s    z$requires_backends.<locals>.<genexpr>c                    s    g | ]\}}| s|  qS r    )format)r   	availablemsgr/   r    r!   
<listcomp>n  s     z%requires_backends.<locals>.<listcomp>r'   )%VersatileDiffusionTextToImagePipelineVersatileDiffusionPipeline$VersatileDiffusionDualGuidedPipeline%StableDiffusionImageVariationPipelineUnCLIPPipeliner   z4.25.0z9You need to install `transformers>=4.25` in order to use z/: 
```
 pip install --upgrade transformers 
```) StableDiffusionDepth2ImgPipeline"StableDiffusionPix2PixZeroPipelinez4.26.0z9You need to install `transformers>=4.26` in order to use )	
isinstancer7   tuplehasattrr   	__class__rE   joinis_transformers_version)objbackendschecksfailedr    r/   r!   requires_backendsh  s(   


r   c                       s    e Zd ZdZ fddZ  ZS )DummyObjectz
    Metaclass for the dummy objects. Any class inheriting from it will return the ImportError generated by
    `requires_backend` each time a user tries to access any method of that class.
    c                    s0   | dr|dvrt | |S t| | j d S )NrN   )_load_connected_pipes_is_onnx)r   super__getattr__r   	_backends)clskeyr   r    r!   r    s   zDummyObject.__getattr__)r   
__module____qualname____doc__r  __classcell__r    r    r	  r!   r    s    r  library_or_version	operationrequirement_versionc                 C   sV   |t  vrtdtt   d| t | }t| tr$tt| } || t|S )a  
    Compares a library version to some requirement using a given operation.

    Args:
        library_or_version (`str` or `packaging.version.Version`):
            A library name or a version to check.
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`.
        requirement_version (`str`):
            The version to compare the library version against
    z`operation` must be one of z, received )	STR_OPERATION_TO_FUNCkeys
ValueErrorr7   r   strr
   r8   rC   )r  r  r  r    r    r!   compare_versions  s   
r  rC   c                 C   s   t tt| |S )a	  
    Compares the current PyTorch version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A string version of PyTorch
    )r  r
   _torch_versionr  rC   r    r    r!   is_torch_version  s   r  c                 C      t sdS ttt| |S )a  
    Compares the current torch_xla version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A string version of torch_xla
    F)r   r  r
   _torch_xla_versionr  r    r    r!   is_torch_xla_version     r  c                 C   r  )a  
    Compares the current Transformers version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _transformers_versionr  r    r    r!   r     r  r   c                 C   r  )z
    Compares the current Kernels version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _kernels_versionr  r    r    r!   is_kernels_version  r  r  c                 C   r  )a  
    Compares the current Hugging Face Hub version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)_hf_hub_availabler  r
   _hf_hub_versionr  r    r    r!   is_hf_hub_version  r  r"  c                 C   r  a  
    Compares the current Accelerate version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _accelerate_versionr  r    r    r!   is_accelerate_version  r  r%  c                 C   r  )z
    Compares the current PEFT version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _peft_versionr  r    r    r!   is_peft_version  r  r'  c                 C   r  )a  
    Args:
    Compares the current bitsandbytes version to a given reference with an operation.
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _bitsandbytes_versionr  r    r    r!   is_bitsandbytes_version  s   
r)  c                 C   r  r#  )r   r  r
   _gguf_versionr  r    r    r!   is_gguf_version&  r  r+  c                 C   r  )z
    Compares the current torchao version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _torchao_versionr  r    r    r!   is_torchao_version6  r  r-  c                 C   r  r#  )r   r  r
   _optimum_quanto_versionr  r    r    r!   is_optimum_quanto_versionF  r  r/  c                 C   r  )a  
    Compares the current Nvidia ModelOpt version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _nvidia_modelopt_versionr  r    r    r!   is_nvidia_modelopt_versionV  r  r1  c                 C   r  )z
    Compares the current xformers version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _xformers_versionr  r    r    r!   is_xformers_versionf  r  r3  c                 C   r  )a  
    Compares the current sageattention version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _sageattention_versionr  r    r    r!   is_sageattention_versionv  r  r5  c                 C   r  )a  
    Compares the current flash-attention version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _flash_attn_versionr  r    r    r!   is_flash_attn_version  r  r7  c                 C   r  )z
    Compares the current aiter version to a given reference with an operation.

    Args:
        operation (`str`):
            A string representation of an operator, such as `">"` or `"<="`
        version (`str`):
            A version string
    F)r   r  r
   _aiter_versionr  r    r    r!   is_aiter_version  r  r9  c                 C   s0   i }t | D ]}|drqt| |||< q|S )a  
    Returns a dict of object names and values in a module, while skipping private/internal objects

    Args:
        module (ModuleType):
            Module to extract the objects from.

    Returns:
        dict: Dictionary of object names and corresponding values
    rN   )dirr   getattr)moduleobjectsr0   r    r    r!   get_objects_from_module  s   
r>  c                   @   s   e Zd ZdZdS )OptionalDependencyNotAvailablezh
    An error indicating that an optional dependency of Diffusers was not found in the environment.
    N)r   r
  r  r  r    r    r    r!   r?    s    r?  c                       sV   e Zd ZdZd fdd	Z fddZdedefd	d
ZdefddZ	dd Z
  ZS )_LazyModulezu
    Module class that surfaces all objects but only performs associated imports when the objects are requested.
    Nc           	         s   t  | t| | _i | _| D ]\}}|D ]}|| j|< qqt| tt|	   | _
|| _|| _tj|g| _|d u rFi n|| _|| _|| _d S r   )r  __init__setr  _modules_class_to_moduleitemsr7   r   values__all____file____spec__ospathdirname__path___objects_name_import_structure)	selfr0   module_fileimport_structuremodule_specextra_objectsr  rF  valuer	  r    r!   rA    s   
z_LazyModule.__init__c                    s,   t   }| jD ]}||vr|| q|S r   )r  __dir__rG  r>   )rQ  resultattrr	  r    r!   rW    s   


z_LazyModule.__dir__r0   r%   c                 C   sz   || j v r
| j | S || jv r| |}n || j v r*| | j| }t||}ntd| j d| t| || |S )Nzmodule z has no attribute )	rN  rC  _get_modulerD  r  r;  AttributeErrorr   setattr)rQ  r0   rV  r<  r    r    r!   r    s   


z_LazyModule.__getattr__module_namec              
   C   sL   z
t d| | jW S  ty% } ztd| j d| d| |d }~ww )Nr.   zFailed to import z@ because of the following error (look up to see its traceback):
)r3   import_moduler   r@   RuntimeError)rQ  r]  er    r    r!   rZ    s   z_LazyModule._get_modulec                 C   s   | j | j| j| jffS r   )r   rO  rH  rP  )rQ  r    r    r!   
__reduce__  s   z_LazyModule.__reduce__)NN)r   r
  r  r  rA  rW  r  r   r  rZ  ra  r  r    r    r	  r!   r@    s    		r@  )F(  r  importlib.utilr3   r*   operatoroprJ  syscollectionsr   r   	functoolsr   cache	itertoolsr   typesr   typingr   huggingface_hub.utilsr   packaging.versionr	   r
   r'   r   version_infor8   importlib.metadatar?   packages_distributionsr6   r@   
get_loggerr   rA   ENV_VARS_TRUE_VALUESunionENV_VARS_TRUE_AND_AUTO_VALUESenvirongetupperr   r   USE_JAXr   r   gtgeeqneleltr  modulesanyr   r  boolr   rO   r   r  info_jax_version_flax_versionr4   r5   r   rC   rF   r   _safetensors_version_onnxruntime_versionr   
candidatesrM   rD   _opencv_versionr   r   _bs4_versionr   _invisible_watermark_versionr   r  r   _torch_npu_versionr   _torch_mlu_versionr   r  r   r!  r   r  r   _inflect_versionr   _unidecode_versionr   _note_seq_versionr   _wandb_versionr   _tensorboard_versionr   _compel_versionr   _sentencepiece_versionr   _torchsde_versionr   r&  r   _torchvision_versionr   _matplotlib_versionr   _timm_versionr   r(  r   _imageio_versionr   _ftfy_versionr   _scipy_versionr   _librosa_versionr   r$  r   r2  r   r*  r   r,  r   r.  r   _pytorch_retinaface_versionr   _better_profanity_versionr   _nltk_versionr   _cosmos_guardrail_versionr   r4  r   r6  r   _flash_attn_3_versionr   r8  r   _kornia_versionr   r0  r   _av_versionr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   FLAX_IMPORT_ERRORINFLECT_IMPORT_ERRORPYTORCH_IMPORT_ERRORONNX_IMPORT_ERROROPENCV_IMPORT_ERRORSCIPY_IMPORT_ERRORLIBROSA_IMPORT_ERRORTRANSFORMERS_IMPORT_ERRORUNIDECODE_IMPORT_ERRORNOTE_SEQ_IMPORT_ERRORWANDB_IMPORT_ERRORTENSORBOARD_IMPORT_ERRORCOMPEL_IMPORT_ERRORBS4_IMPORT_ERRORFTFY_IMPORT_ERRORTORCHSDE_IMPORT_ERROR INVISIBLE_WATERMARK_IMPORT_ERRORPEFT_IMPORT_ERRORSAFETENSORS_IMPORT_ERRORSENTENCEPIECE_IMPORT_ERRORBITSANDBYTES_IMPORT_ERRORIMAGEIO_IMPORT_ERRORGGUF_IMPORT_ERRORTORCHAO_IMPORT_ERRORQUANTO_IMPORT_ERRORPYTORCH_RETINAFACE_IMPORT_ERRORBETTER_PROFANITY_IMPORT_ERRORNLTK_IMPORT_ERRORr   r   typer  r  r  r  r   r  r"  r%  r'  r)  r+  r-  r/  r1  r3  r5  r7  r9  r>  BaseExceptionr?  r@  r    r    r    r!   <module>   s>  


"$

"



































"