+
    Ci 
                     d    ^ RI t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt	 ^RI
Ht  ! R R]4      tR# )    N)List)Image)BaseSessionc                   \   a  ] tR t^t o RtR tV 3R lR lt]R 4       t]R 4       t	Rt
V tR# )	BiRefNetSessionGeneralzW
This class represents a BiRefNet-General session, which is a subclass of BaseSession.
c                L    ^^\         P                  ! V) 4      ,           ,          # )   )npexp)selfmats   &&]/var/www/html/photoedit/myenv/lib/python3.14/site-packages/rembg/sessions/birefnet_general.pysigmoidBiRefNetSessionGeneral.sigmoid   s    At$%%    c                6   < V ^8  d   QhRS[ RS[S[ ,          /# )   imgreturn)PILImager   )format__classdict__s   "r   __annotate__#BiRefNetSessionGeneral.__annotate__   s      8 h r   c           	        V P                   P                  RV P                  VRRR4      4      pV P                  V^ ,          R,          4      p\        P
                  ! V4      p\        P                  ! V4      pWW,
          Wg,
          ,          p\        P                  ! V4      p\        P                  ! V^,          P                  R4      RR7      pVP                  VP                  \        P                  P                  4      pV.# )	a
  
Predicts the output masks for the input image using the inner session.

Parameters:
    img (PILImage): The input image.
    *args: Additional positional arguments.
    **kwargs: Additional keyword arguments.

Returns:
    List[PILImage]: The list of output masks.
Nuint8L)mode)g
ףp=
?gv/?gCl?)gZd;O?gy&1?g?)   r   )NNNr   r    r    )inner_sessionrun	normalizer   r
   maxminsqueezer   	fromarrayastyperesizesize
ResamplingLANCZOS)	r   r   argskwargsort_outspredmamimasks	   &&*,     r   predictBiRefNetSessionGeneral.predict   s     %%))NN*,A<
 ||HQK
34VVD\VVD\	bg&zz$s
227;#F{{388U%5%5%=%=>vr   c           
        V P                   ! V/ VB  R2p\        P                  ! RV P                  ! V/ VB '       d   RMRVV P                  ! V/ VB RR7       \
        P                  P                  V P                  ! V/ VB V4      # )z
Downloads the BiRefNet-General 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-general-epoch_244.onnxNz$md5:7a35a0141cbbc80de11d9c9a28f52697T)fnamepathprogressbar)namepoochretrievechecksum_disabled
u2net_homeosr8   join)clsr-   r.   r7   s   &*, r   download_models&BiRefNetSessionGeneral.download_models4   s     88T,V,-U3k (($9&99 ;00
	
 ww||CNND;F;UCCr   c                    R# )z
Returns the name of the BiRefNet-General session.

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

Returns:
    str: The name of the session.
zbirefnet-general )rA   r-   r.   s   &*,r   r:   BiRefNetSessionGeneral.nameO   s     "r   rE   N)__name__
__module____qualname____firstlineno____doc__r   r4   classmethodrB   r:   __static_attributes____classdictcell__)r   s   @r   r   r      sD     & @ D D4 " "r   r   )r?   typingr   numpyr
   r;   PILr   	PIL.Imager   baser   r   rE   r   r   <module>rT      s(    	     ' O"[ O"r   