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 )BiRefNetSessionDISzf
    This class represents a BiRefNet-DIS 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-DIS 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.onnxzYhttps://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-DIS-epoch_590.onnxNz$md5:2d4d44102b446f33a4ebb2e56c051f2bT)fnamepathZprogressbar)namepoochretrieveZchecksum_disabledZ
u2net_homeosr   join)clsargskwargsr    r   M/var/www/html/venv/lib/python3.8/site-packages/rembg/sessions/birefnet_dis.pydownload_models   s    

z"BiRefNetSessionDIS.download_modelsc                 O   s   dS )z
        Returns the name of the BiRefNet-DIS session.

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

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