CoolFace
Apppublic

fred-dev/comfy_ui_ali

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
diffusers_load.cpython-312.pyc14 linesDownload Raw Back to __pycache__
1�

2���g���"�ddlZddlZd�Zdd�Zy)�Nc��|D]E}tjj||�}tjj|�s�C|cSy)N)�os�path�join�exists)r�	filenames�f�ps    �_/Users/fredrodrigues/Library/CloudStorage/Dropbox/Code/comfyui_hardware/comfy/diffusers_load.py�3first_filers:��
���G�G�L�L��q�!��
�7�7�>�>�!���H���c��gd�}ttjj|d�|�}ttjj|d�|�}gd�}ttjj|d�|�}ttjj|d�|�}	|g}4|	�|5j	|	�t6jj|�}d}|r!t7jj|8|��}d}
|r?t9jj|�}t10jj|��}
|||
fS)	N)z(diffusion_pytorch_model.fp16.safetensorsz#diffusion_pytorch_model.safetensorsz diffusion_pytorch_model.fp16.binzdiffusion_pytorch_model.bin�unet�vae)zmodel.fp16.safetensorszmodel.safetensorszpytorch_model.fp16.binzpytorch_model.bin�text_encoder�text_encoder_2)�embedding_directory)�sd)rrrr�append�comfyr�load_diffusion_model�	load_clip�utils�load_torch_file�VAE)�11model_path�12output_vae�output_clipr�diffusion_model_names�	unet_path�vae_path�text_encoder_model_names�text_encoder1_path�text_encoder2_path�text_encoder_pathsr�cliprrs               r�load_diffusersr's��s���2�7�7�<�<�13�F�;�=R�S�I��"�'�'�,�,�z�5�9�;P�Q�H�}��#�B�G�G�L�L��^�$L�Nf�g��#�B�G�G�L�L��=M�$N�Ph�i��,�-���%��!�!�"4�5��8�8�(�(��3�D��D���x�x�!�!�"4�J]�!�^��14�C��
�[�[�
(�
(��
2���h�h�l�l�b�l�!���$���r
)TTN)r�comfy.sdrrr'�r
r�<module>r*s��	���r