+
    „°ñjñ  ã                   ó  € R t ^ RIt^ RIHt ^ RIt^ RIt^ RIHtH	t	  ! R R]	P                  4      t ! R R]	P                  4      t ! R R	]	P                  4      t ! R
 R]	P                  4      t ! R R]4      tR R ltR# )a¥  
This file is part of ComfyUI.
Copyright (C) 2024 Stability AI

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)Úoverride)ÚComfyExtensionÚioc                   óD   a € ] tR t^t o ]R 4       t]RR l4       tRtV tR# )ÚStableCascade_EmptyLatentImagec                ó  € \         P                  ! R RR\         P                  P                  RRR\        P
                  ^R7      \         P                  P                  RRR\        P
                  ^R7      \         P                  P                  R^*^^€^R	R
7      \         P                  P                  R^^RR7      .\         P                  P                  RR7      \         P                  P                  RR7      .R7      # )r   z!Empty Stable Cascade Latent Imageúmodel/latent/stable cascadeÚwidthi   é   )ÚdefaultÚminÚmaxÚstepÚheightÚcompressionT©r   r   r   r   ÚadvancedÚ
batch_sizei   )r   r   r   Ústage_c©Údisplay_nameÚstage_b©Únode_idr   ÚcategoryÚinputsÚoutputs)r   ÚSchemaÚIntÚInputÚnodesÚMAX_RESOLUTIONÚLatentÚOutput©Úclss   &ÚEC:\Ai_Coding\apps\studio\ComfyUI\comfy_extras\nodes_stable_cascade.pyÚdefine_schemaÚ,StableCascade_EmptyLatentImage.define_schema   sÉ   € ä�yŠyØ4Ø<Ø2ä—‘—‘˜W¨d¸Ä×AUÑAUÐ\]�Ó^Ü—‘—‘˜X¨t¸Ä%×BVÑBVÐ]^�Ó_Ü—‘—‘˜]°B¸AÀ3ÈQÐY]�Ó^Ü—‘—‘˜\°1¸!À�ÓFð	ô —	‘	× Ñ ¨iÐ Ó8Ü—	‘	× Ñ ¨iÐ Ó8ðô
ð 	
ó    c                óÔ   € \         P                  ! V^W#,          W,          .4      p\         P                  ! V^V^,          V^,          .4      p\        P                  ! RV/RV/4      # )é   Úsamples)ÚtorchÚzerosr   Ú
NodeOutput)r%   r	   r   r   r   Úc_latentÚb_latents   &&&&&  r&   ÚexecuteÚ&StableCascade_EmptyLatentImage.execute.   se   € ä—;’; 
¨B°Õ0EÀuÕG[Ð\Ó]ˆÜ—;’; 
¨A¨v¸­{¸EÀQ½JÐGÓHˆÜ�}Š}Ø�xð
ð �xð
óð 	r)   © N)é   ©	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Úclassmethodr'   r2   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r&   r   r      s+   ø‡ € Øñ
ó ð
ð" óó ör)   r   c                   ó@   a € ] tR t^9t o ]R 4       t]R 4       tRtV tR# )ÚStableCascade_StageC_VAEEncodec                ót  € \         P                  ! R RR\         P                  P                  R4      \         P                  P                  R4      \         P
                  P                  R^*^^€^RR7      .\         P                  P                  RR	7      \         P                  P                  R
R	7      .R7      # )rA   z!Stable Cascade Stage C VAE Encoder   ÚimageÚvaer   Tr   r   r   r   r   )r   r   ÚImager   ÚVaer   r"   r#   r$   s   &r&   r'   Ú,StableCascade_StageC_VAEEncode.define_schema:   s�   € ä�yŠyØ4Ø<Ø2ä—‘—‘˜wÓ'Ü—‘—‘˜UÓ#Ü—‘—‘˜]°B¸AÀ3ÈQÐY]�Ó^ðô —	‘	× Ñ ¨iÐ Ó8Ü—	‘	× Ñ ¨iÐ Ó8ðô
ð 	
r)   c                ó*  € VP                   R,          pVP                   R,          pWC,          VP                  ,          pWS,          VP                  ,          p\        P                  P	                  VP                  R^4      WgRR4      P                  ^R4      pVP                  VR,          4      p	\        P                  ! V	P                   ^ ,          ^V^,          ^,          V^,          ^,          .4      p
\        P                  ! RV	/RV
/4      # )é   ÚbicubicÚcenterr,   éþÿÿÿéýÿÿÿéÿÿÿÿ©ºNNNrP   rP   :Né   N)ÚshapeÚdownscale_ratioÚcomfyÚutilsÚcommon_upscaleÚmovedimÚencoder-   r.   r   r/   )r%   rC   rD   r   r	   r   Ú	out_widthÚ
out_heightÚsr0   r1   s   &&&&       r&   r2   Ú&StableCascade_StageC_VAEEncode.executeK   så   € à—‘˜B•ˆØ—‘˜R•ˆØÕ)¨S×-@Ñ-@Õ@ˆ	ØÕ+¨s×/BÑ/BÕBˆ
ä�K‰K×&Ñ& u§}¡}°R¸Ó':¸IÐS\Ð^fÓg×oÑoÐpqÐrtÓuˆà—:‘:˜a �kÓ*ˆÜ—;’; §¡¨qÕ 1°1°vÀµ{ÀaÕ6GÈ%ÐSTÍ*ÐXYÕIYÐZÓ[ˆÜ�}Š}Ø�xð
ð �xð
óð 	r)   r4   Nr6   r>   s   @r&   rA   rA   9   s+   ø‡ € Øñ
ó ð
ð  ñó ör)   rA   c                   ó@   a € ] tR t^]t o ]R 4       t]R 4       tRtV tR# )Ú!StableCascade_StageB_Conditioningc                óè   € \         P                  ! R R\         P                  P                  R4      \         P                  P                  R4      .\         P                  P                  4       .R7      # )r^   z!model/conditioning/stable cascadeÚconditioningr   )r   r   r   r   )r   r   ÚConditioningr   r"   r#   r$   s   &r&   r'   Ú/StableCascade_StageB_Conditioning.define_schema^   sW   € ä�yŠyØ7Ø8ä—‘×%Ñ% nÓ5Ü—	‘	—‘ 	Ó*ðô
 —‘×&Ñ&Ó(ðô

ð 
	
r)   c                óÂ   € . pV FB  pV^,          P                  4       pVR,          VR&   V^ ,          V.pVP                  V4       KD  	  \        P                  ! V4      # )r5   r,   Ústable_cascade_prior)ÚcopyÚappendr   r/   )r%   r`   r   ÚcÚtÚdÚns   &&&    r&   r2   Ú)StableCascade_StageB_Conditioning.executel   sY   € àˆÛˆAØ�!•—	‘	“ˆAØ(/°	Õ(:ˆAÐ$Ñ%Ø�1•�q�	ˆAØ�H‰H�QŽKñ	 ô
 �}Š}˜QÓÐr)   r4   Nr6   r>   s   @r&   r^   r^   ]   s+   ø‡ € Øñ
ó ð
ð ñ ó ö r)   r^   c                   ó@   a € ] tR t^wt o ]R 4       t]R 4       tRtV tR# )Ú'StableCascade_SuperResolutionControlnetc                ój  € \         P                  ! R RR\         P                  P                  R4      \         P                  P                  R4      .\         P                  P                  RR7      \         P                  P                  RR7      \         P                  P                  RR7      .R	7      # )
rm   zexperimental/stable cascadeTrC   rD   Úcontrolnet_inputr   r   r   )r   r   Úis_experimentalr   r   )r   r   rE   r   rF   r#   r"   r$   s   &r&   r'   Ú5StableCascade_SuperResolutionControlnet.define_schemax   s…   € ä�yŠyØ=Ø2Ø ä—‘—‘˜wÓ'Ü—‘—‘˜UÓ#ðô
 —‘—‘Ð-?�Ó@Ü—	‘	× Ñ ¨iÐ Ó8Ü—	‘	× Ñ ¨iÐ Ó8ðô
ð 	
r)   c                óœ  € VP                   R,          pVP                   R,          pVP                   ^ ,          pVP                  VR,          4      P                  ^R4      p\        P                  ! V^V^,          V^,          .4      p\        P                  ! V^V^,          V^,          .4      p\
        P                  ! VRV/RV/4      # )rI   r,   rL   rM   rO   rN   )rR   rX   rW   r-   r.   r   r/   )	r%   rC   rD   r	   r   r   ro   r0   r1   s	   &&&      r&   r2   Ú/StableCascade_SuperResolutionControlnet.execute‰   s±   € à—‘˜B•ˆØ—‘˜R•ˆØ—[‘[ •^ˆ
ØŸ:™: e¨H¥oÓ6×>Ñ>¸qÀ"ÓEÐä—;’; 
¨B°¸"µ¸eÀr½kÐJÓKˆÜ—;’; 
¨A¨v¸­{¸EÀQ½JÐGÓHˆÜ�}Š}Ð-Ø�xð0
ð �xð
óð 	r)   r4   Nr6   r>   s   @r&   rm   rm   w   s+   ø‡ € Øñ
ó ð
ð  ñó ör)   rm   c                   ó<   a € ] tR t^™t o ]V 3R lR l4       tRtV tR# )ÚStableCascadeExtensionc                óT   <€ V ^8„  d   QhRS[ S[S[P                  ,          ,          /# ©rI   Úreturn)ÚlistÚtyper   Ú	ComfyNode)Úformatr?   s   "€r&   Ú__annotate__Ú#StableCascadeExtension.__annotate__›   s"   ø€ ÷ 
ñ 
¡T©$©r¯|©|Õ*<Õ%=ñ 
r)   c              ƒ  ó6   "  € \         \        \        \        .# 5i©N)r   r^   rA   rm   )Úselfs   &r&   Úget_node_listÚ$StableCascadeExtension.get_node_listš   s   é € ô +Ü-Ü*Ü3ð	
ð 	
ùs   ‚r4   N)r7   r8   r9   r:   r   r‚   r<   r=   r>   s   @r&   ru   ru   ™   s   ø‡ € Ø÷
ó ö
r)   ru   c                ó$   € V ^8„  d   QhR\         /# rw   ©ru   )r|   s   "r&   r}   r}   £   s   € ÷ $ñ $Ô 6ñ $r)   c               ƒ   ó   "  € \        4       # 5ir€   r…   r4   r)   r&   Úcomfy_entrypointr‡   £   s   é € Ü!Ó#Ð#ùs   ‚)Ú__doc__r-   Útyping_extensionsr   Úcomfy.utilsrT   r    Úcomfy_api.latestr   r   r{   r   rA   r^   rm   ru   r‡   r4   r)   r&   Ú<module>rŒ      sn   ðñó$ Ý &ã Û ß /ô R§\¡\ô ô<! R§\¡\ô !ôH ¨¯©ô  ô4¨b¯l©lô ôD
˜^ô 
÷$r)   