+
    ƒ°ñj‹  ã                   óf   € R t ^ RIt^ RIt^RIHt ^RIHt ^RIHt  ! R R4      t ! R R4      tR# )	až  
This file is part of ComfyUI.
Copyright (C) 2024 Comfy

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
N)Ú
model_base)Úutils)Úlatent_formatsc                   ó&   a € ] tR t^t o R tRtV tR# )Ú
ClipTargetc                ó,   € W n         Wn        / V n        R # ©N)ÚclipÚ	tokenizerÚparams)Úselfr
   r	   s   &&&Ú?C:\Ai_Coding\apps\studio\ComfyUI\comfy\supported_models_base.pyÚ__init__ÚClipTarget.__init__   s   € ØŒ	Ø"ŒØˆŽó    )r	   r   r
   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ÷ð r   r   c                   ó4  a € ] tR t^t o / tRRR^@/t/ t. tRtRt	/ t
]P                  tR.tR.t]P"                  ]P$                  ]P&                  .tRtRtRtRtRR/t]RR	 l4       tRR
 ltR tR tRR ltR t R t!R t"R t#R t$R t%R t&RR lt'R t(Rt)V t*R# )ÚBASEÚ	num_headsÚnum_head_channelsNzfirst_stage_model.zcond_stage_model.g       @Úfp8Fc                óÚ   € V P                    F*  pWA9  g!   V P                   V,          W,          8w  g   K)   R # 	  Ve-   V P                   F  pVP                  V4      V9  g   K   R # 	  R# )FT)Úunet_configÚrequired_keysÚformat)Úsr   Ú
state_dictÚunet_key_prefixÚks   &&&& r   ÚmatchesÚBASE.matches8   sZ   € à—”ˆAØÔ# q§}¡}°QÕ'7¸;½>Ö'IÚñ ð Ò!Ø—_”_�Ø—8‘8˜OÓ,°JÖ>Ú ñ %ñ r   c                ó6   € \         P                  P                  # r   )r   Ú	ModelTypeÚEPS)r   r#   Úprefixs   &&&r   Ú
model_typeÚBASE.model_typeC   s   € Ü×#Ñ#×'Ñ'Ð'r   c                ó.   € V P                   R ,          ^8„  # )Úin_channels)r   )r   s   &r   Úinpaint_modelÚBASE.inpaint_modelF   s   € Ø×Ñ Õ.°Ñ2Ð2r   c                ó<  € VP                  4       V n        V P                  P                  4       V n        V P                  4       V n        V P                  P                  4       V n        V P
                   F#  pV P
                  V,          V P                  V&   K%  	  R # r   )Úcopyr   Úsampling_settingsÚlatent_formatÚoptimizationsÚunet_extra_config)r   r   Úxs   && r   r   ÚBASE.__init__I   s}   € Ø&×+Ñ+Ó-ˆÔØ!%×!7Ñ!7×!<Ñ!<Ó!>ˆÔØ!×/Ñ/Ó1ˆÔØ!×/Ñ/×4Ñ4Ó6ˆÔØ×'Ô'ˆAØ"&×"8Ñ"8¸Õ";ˆD×Ñ˜QÓó (r   c                ó"  € V P                   e4   \        P                  ! W P                   V P                  W4      VR7      pM'\        P                  ! W P                  W4      VR7      pV P                  4       '       d   VP                  4        V# )N)r,   Údevice)Únoise_aug_configr   Ú
SD21UNCLIPr,   Ú	BaseModelr0   Úset_inpaint)r   r#   r+   r;   Úouts   &&&& r   Ú	get_modelÚBASE.get_modelQ   sw   € Ø× Ñ Ò,Ü×'Ò'¨×.CÑ.CÐPT×P_ÑP_Ð`jÓPsð  }Cô  D‰Cä×&Ò& t¿¹È
Ó8[ÐdjÔkˆCØ×Ñ×ÒØ�O‰OÔØˆ
r   c                ót   € \         P                  ! YP                   Uu/ uF  q"R bK  	  upRR7      pV# u upi )Ú T)Úfilter_keys)r   Ústate_dict_prefix_replaceÚtext_encoder_key_prefix)r   r#   r%   s   && r   Úprocess_clip_state_dictÚBASE.process_clip_state_dictZ   sB   € Ü×4Ò4°Z×QmÒQmÓAnÑQmÈAÀRÂ%ÑQmÑAnð  }Aô  Bˆ
ØÐùò Bos   Ÿ5
c                ó   € V# r   © ©r   r#   s   &&r   Úprocess_unet_state_dictÚBASE.process_unet_state_dict^   ó   € ØÐr   c                ó   € V# r   rK   rL   s   &&r   Úprocess_vae_state_dictÚBASE.process_vae_state_dicta   rO   r   c                óX   € R V P                   ^ ,          /p\        P                  ! W4      # ©rD   )rG   r   rF   ©r   r#   Úreplace_prefixs   && r   Ú"process_clip_state_dict_for_savingÚ'BASE.process_clip_state_dict_for_savingd   s(   € Ø˜d×:Ñ:¸1Õ=Ð>ˆÜ×.Ò.¨zÓJÐJr   c                ól   € / pV P                   e   V P                   VR&   \        P                  ! W4      # ©NrD   )Úclip_vision_prefixr   rF   rU   s   && r   Ú)process_clip_vision_state_dict_for_savingÚ.BASE.process_clip_vision_state_dict_for_savingh   s4   € ØˆØ×"Ñ"Ò.Ø!%×!8Ñ!8ˆN˜2ÑÜ×.Ò.¨zÓJÐJr   c                ó6   € R R/p\         P                  ! W4      # )rD   zmodel.diffusion_model.)r   rF   rU   s   && r   Ú"process_unet_state_dict_for_savingÚ'BASE.process_unet_state_dict_for_savingn   s   € ØÐ6Ð7ˆÜ×.Ò.¨zÓJÐJr   c                óX   € R V P                   ^ ,          /p\        P                  ! W4      # rT   )Úvae_key_prefixr   rF   rU   s   && r   Ú!process_vae_state_dict_for_savingÚ&BASE.process_vae_state_dict_for_savingr   s(   € Ø˜d×1Ñ1°!Õ4Ð5ˆÜ×.Ò.¨zÓJÐJr   c                ó.   € WP                   R &   W n        R# )ÚdtypeN)r   Úmanual_cast_dtype)r   rf   rg   r;   s   &&&&r   Úset_inference_dtypeÚBASE.set_inference_dtypev   s   € Ø$)×Ñ˜Ñ!Ø!2Ör   c                óP   € \         P                  ! R P                  V4      4       R# )zb
WARNING, you accessed {} from the model config object which doesn't exist. Please fix your code.
N)ÚloggingÚwarningr!   )r   Únames   &&r   Ú__getattr__ÚBASE.__getattr__z   s.   € Ü�ŠÐ~÷  Fñ  Fð  GKó  Lô  	MÙr   )r5   rg   r6   r4   r   éÿÿÿÿrZ   rT   )rD   Nr   )+r   r   r   r   r   r7   r    Úclip_prefixr[   r<   r4   r   ÚLatentFormatr5   rb   rG   ÚtorchÚfloat16Úbfloat16Úfloat32Úsupported_inference_dtypesÚmemory_usage_factorrg   Úcustom_operationsÚquant_configr6   Úclassmethodr&   r,   r0   r   rA   rH   rM   rQ   rW   r\   r_   rc   rh   rn   r   r   r   s   @r   r   r      së   ø‡ € Ø€Kà�RØ˜RðÐð
 €Mà€KØÐØÐØÐØ"×/Ñ/€MØ*Ð+€NØ2Ð3ÐØ"'§-¡-°·±ÀÇÁÐ!OÐàÐàÐØÐØ€LØ˜E�N€Màóó ðô(ò3ò<ôòòòòKòKòKòKô3÷ð r   r   )	Ú__doc__rs   rk   rD   r   r   r   r   r   rK   r   r   Ú<module>r}      s1   ðñó$ Û Ý Ý Ý ÷ñ ÷]ó ]r   