a
    þd@  ã                   @   s>   d dl mZ eƒ rddlmZ ddlmZ dedœdd	„Zd
S )é   )Úis_tqdm_availableé    )Útqdmé   )ÚPartialStateT)Úmain_process_onlyc                 O   s8   t ƒ stdƒ‚d}| r"tƒ jdk}t|i |¤d|i¤ŽS )zÛ
    Wrapper around `tqdm.tqdm` that optionally displays only on the main process.

    Args:
        main_process_only (`bool`, *optional*):
            Whether to display the progress bar only on the main process
    zZAccelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.Fr   Údisable)r   ÚImportErrorr   Zlocal_process_indexÚ_tqdm)r   ÚargsÚkwargsr   © r   ú^/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/accelerate/utils/tqdm.pyr      s    r   N)T)Zimportsr   Z	tqdm.autor   r
   Ústater   Úboolr   r   r   r   Ú<module>   s   