a
    Aþd–	  ã                   @   sÞ  d dl Z d dlZd dlmZmZmZmZmZ d dlZ	dd„ Z
ej d e¡ dZe j ed¡de j e¡gZeD ]*Ze j e j ed¡¡rne j e¡Z qšqnedus°J de› ƒ‚e
ƒ  ed	d
g fe j ed¡dddgfe j ed¡ddg fe j ed¡ddg fe j ed¡dddgfgZi ZeD ]¸\ZZZZe j e j eee¡¡Ze j e¡snede› de› ejd nhe j e¡Zdev r”ej d e¡ n:dev rÂej d e¡ d dlZej d ¡ nej e¡ eee< q dS )é    N)Úmodels_pathÚscript_pathÚ	data_pathÚextensions_dirÚextensions_builtin_dirc                  C   s>   G dd„ dƒ} | ƒ }d|_ |tjd< | ƒ }d|_|tjd< dS )zWcreate fake modules that SDXL wants to import but doesn't actually use for our purposesc                   @   s   e Zd ZdS )z mute_sdxl_imports.<locals>.DummyN)Ú__name__Ú
__module__Ú__qualname__© r
   r
   ú5/var/www/html/stable-diffusion-webui/modules/paths.pyÚDummy   s   r   Nztaming.modules.losses.lpipszsgm.data)ZLPIPSÚsysÚmodulesZStableDataModuleFromConfig)r   Úmoduler
   r
   r   Úmute_sdxl_imports   s    
r   z*repositories/stable-diffusion-stability-aiÚ.zldm/models/diffusion/ddpm.pyz*Couldn't find Stable Diffusion in any of: ÚldmzStable Diffusionz../generative-modelsÚsgmzStable Diffusion XLz../CodeFormerzinference_codeformer.pyÚ
CodeFormerz../BLIPzmodels/blip.pyÚBLIPz../k-diffusionzk_diffusion/sampling.pyZk_diffusionZatstartz	Warning: z not found at path )Úfile) Úosr   Úmodules.paths_internalr   r   r   r   r   Zmodules.safer   r   ÚpathÚinsertZsd_pathÚjoinÚdirnameZpossible_sd_pathsZpossible_sd_pathÚexistsÚabspathÚ	path_dirsÚpathsÚdZ
must_existÚwhatÚoptionsZmust_exist_pathÚprintÚstderrr   ÚpopÚappendr
   r
   r
   r   Ú<module>   sB   
û

