U
    !?h                     @   s0   d dl Z d dlZddlmZ G dd deZdS )    N   )BiRefNetSessionGeneralc                   @   s(   e Zd ZdZedd Zedd ZdS )BiRefNetSessionHRSODzh
    This class represents a BiRefNet-HRSOD session, which is a subclass of BiRefNetSessionGeneral.
    c                 O   sT   | j || d}tjd| j||r(dnd|| j||dd tj| j|||S )a"  
        Downloads the BiRefNet-HRSOD model file from a specific URL and saves it.

        Parameters:
            *args: Additional positional arguments.
            **kwargs: Additional keyword arguments.

        Returns:
            str: The path to the downloaded model file.
        z.onnxz_https://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-HRSOD_DHU-epoch_115.onnxNz$md5:c017ade5de8a50ff0fd74d790d268ddaT)fnamepathZprogressbar)namepoochretrieveZchecksum_disabledZ
u2net_homeosr   join)clsargskwargsr    r   O/var/www/html/venv/lib/python3.8/site-packages/rembg/sessions/birefnet_hrsod.pydownload_models   s    

z$BiRefNetSessionHRSOD.download_modelsc                 O   s   dS )z
        Returns the name of the BiRefNet-HRSOD session.

        Parameters:
            *args: Additional positional arguments.
            **kwargs: Additional keyword arguments.

        Returns:
            str: The name of the session.
        zbirefnet-hrsodr   )r   r   r   r   r   r   r   (   s    zBiRefNetSessionHRSOD.nameN)__name__
__module____qualname____doc__classmethodr   r   r   r   r   r   r      s
   
r   )r
   r    r   r   r   r   r   r   <module>   s   