+
    „°ñjf  ã                   ó  € ^ RI t ^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
HtHt ] P                  ! R4      ^	] P                  ! R4      ,           ,          tR tR t ! R R]P"                  4      t ! R	 R
]4      tR R ltR# )é    N)Úoverride)ÚComfyExtensionÚiogffffffò?c                 ó¢   € \         ;QJ d*    R  V P                  4        4       F  '       g   K   R# 	  R# ! R  V P                  4        4       4      # )c              3   óp   "  € T F,  q F$  q" F  p\        V^ ,          \        4      x € K  	  K&  	  K.  	  R# 5i)r   N)Ú
isinstanceÚdict)Ú.0ÚbatchesÚbatchÚts   &   Ú<C:\Ai_Coding\apps\studio\ComfyUI\comfy_extras\nodes_fibo2.pyÚ	<genexpr>Úhas_images.<locals>.<genexpr>   s5   é € Ði±_¨'ÒRYÈÒchÐ^_Œz˜!˜A�$¤×%Ð%ÑchÑ%ÑRYÑ%³_ùs   ‚46TF)ÚanyÚvalues)Útokenss   &r   Ú
has_imagesr      s7   € ß‹3Ñi°V·]±]´_Ói�3Œ3ÐiŠ3Ðiˆ3Ñi°V·]±]´_ÓiÓiÐió    c                 óž  a a€ Ro\        ^@^S,          ^@,          ^4       UUu. uF‹  p\        \        ^@^\        P                  ! RS,          V,          ^,          4      ,          4      ^\        P                  ! RS,          V,          ^,          4      ,          ^,           ^4       F  q!V3NK  	  K�  	  ppp\        VVV 3R lR7      # u uppi )é   gÍÌÌÌÌÌì?gš™™™™™ñ?c           	      ó  <€ \        ^\        V ^ ,          V ^,          ,          S,          SV ^,          ,          V ^ ,          ,          4      ,
          ^	4      \        V ^ ,          V ^,          ,          S,
          4      V ^ ,          ) 3# )é   )ÚroundÚminÚabs)ÚsÚareaÚaspect_ratios   &€€r   Ú<lambda>Útrained_size.<locals>.<lambda>   s‘   ø€ ¤U¨1¬s°1°Qµ4¸!¸A½$µ;ÀÕ3MÈ|Ð^_Ð`aÕ^bÕObÐefÐghÕeiÕOiÓ/jÕ+jÐlmÓ%nÔpsÐtuÐvwÕtxÐ{|Ð}~Õ{Õtð  CGõ  uGó  qHð  KLð  MNõ  KOð  JOñ  %Pr   ©Úkeyi   )ÚrangeÚmaxÚmathÚceilÚfloorr   )r   ÚwÚhÚsizesr   s   f   @r   Útrained_sizer,      s  ù€ à€DÜ" 2 q¨4¥x°2¥~°rÔ:ô  gÑ:˜ÄEÌ#ÈbÐRTÔW[×W`ÒW`ÐadÐgkÕakÐnoÕaoÐrtÕatÓWuÕRuÓJvÐxzô  ~B÷  ~Hò  ~Hð  ILð  OSõ  ISð  VWõ  IWð  Z\õ  I\ó  ~]õ  y]ð  `aõ  yað  ceö  Ef¸q�‹Vñ  Ef‰VÑ:€Eñ  gÜˆuõ  Pô  Qð  Qùó gs   £BC	c                   óP   a € ] tR t^t o ]R 4       t]RV 3R lR ll4       tRtV tR# )ÚTextEncodeFibo2c                óþ  € \         P                  ! R RR\         P                  P                  R4      \         P                  P                  RRR7      \         P                  P                  RRRRR	7      \         P
                  P                  R
RR7      \         P                  P                  R\         P                  P                  \         P                  P                  R4      \        ^^4       Uu. uF  pRV 2NK
  	  up^ R7      RR7      \         P                  P                  R^ ^ \        P                  ^RR7      \         P                  P                  R^ ^ \        P                  ^RR7      \         P                  P                  R^^RR7      .\         P                  P                  RR7      \         P                  P                  RR7      \         P                  P                  RR7      .R7      # u upi )r.   zmodel/conditioning/fiboaJ  Encode a Fibo 2.0 prompt, a structured JSON caption or plain text. With images, the prompt is the edit instruction, or a JSON caption of the result with an edit_instruction key, and the images become reference latents of both outputs when a vae is connected. Sample the latent output, the result's size the images are cropped for.ÚclipÚpromptT)Ú	multilineÚnegative_promptzPEmpty is the null caption Fibo 2.0 was trained with for CFG with edit workflows.)r2   ÚadvancedÚtooltipÚvae)ÚoptionalÚimagesÚimageÚimage_)Únamesr   zóImages to edit, referred to as <image_1>, <image_2> and so on in the instruction. A single image is scaled and center cropped to the result's size, since the edit lines up with it pixel for pixel; several images each to their own trained size.)Útemplater5   ÚwidthzˆWidth of the result. 0 = the size Fibo 2.0 was trained at for the first image's aspect ratio, about 1 megapixel, or 1024 without images.)Údefaultr   r%   Ústepr5   Úheightz‰Height of the result. 0 = the size Fibo 2.0 was trained at for the first image's aspect ratio, about 1 megapixel, or 1024 without images.Ú
batch_sizei   )r>   r   r%   Úpositive)Údisplay_nameÚnegativeÚlatent)Únode_idÚcategoryÚdescriptionÚinputsÚoutputs)r   ÚSchemaÚClipÚInputÚStringÚVaeÚAutogrowÚTemplateNamesÚImager$   ÚIntÚnodesÚMAX_RESOLUTIONÚConditioningÚOutputÚLatent)ÚclsÚis   & r   Údefine_schemaÚTextEncodeFibo2.define_schema   s¡  € ä�yŠyØ%Ø.ð eä—‘—‘˜fÓ%Ü—	‘	—‘ °D�Ó9Ü—	‘	—‘Ð 1¸TÈDð  [m�ó  nÜ—‘—‘˜U¨T�Ó2Ü—‘×!Ñ!ØÜŸ[™[×6Ñ6ÜŸ™Ÿ™ wÓ/Ü5:¸1¸b´\ÓB±\° ¨ s›|±\ÑBØð 7ó ð
 Rð "ó ô —‘—‘˜W¨a°Q¼E×<PÑ<PÐWYð  dn�ó  oÜ—‘—‘˜X¨q°a¼U×=QÑ=QÐXZð  ep�ó  qÜ—‘—‘˜\°1¸!À�ÓFð!ô& —‘×&Ñ&°JÐ&Ó?Ü—‘×&Ñ&°JÐ&Ó?Ü—	‘	× Ñ ¨hÐ Ó7ðô-
ð 	
ùò Cs   Ã3G:"Nc                ób   <€ V ^8„  d   QhRS[ P                  P                  RS[ P                  /# )é   r8   Úreturn)r   rP   ÚTypeÚ
NodeOutput)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚTextEncodeFibo2.__annotate__>   s<   ø€ ÷ Fñ FÉÏÉ×IYÑIYð Fñ  GI÷  GTñ  GTñ Fr   c	           
     ó  € T;'       g    / p\        VR  R7       U	u. uF  q•V	,          f   K  WY,          NK  	  pp	V U
Uu. uF0  p
\        V
P                  ^ ,          4       F  qºW»^,            NK  	  K2  	  pp
p\        V4      ^ 8”  dC   \	        V^ ,          P                  ^,          V^ ,          P                  ^,          ,          4      MRp\        ^T;'       g
    V^ ,          ^,          ^,          4      \        ^T;'       g
    V^,          ^,          ^,          4      rv\        V4      ^8X  d   Wg3.MCV U
u. uF7  p
\	        V
P                  ^,          V
P                  ^,          ,          4      NK9  	  up
p\        W]4       U
Uu. uFx  w  r®V
P                  ^,          V
P                  ^,          3V8X  d   T
ME\        P                  P                  ! V
P                  R^4      .VORNRN5!  P                  ^R4      NKz  	  pp
pVP                  W%R7      pVP                  V4      p\        V4      ^ 8X  dz   \        V4      '       di   VP                  VP                  VRR7      4      p\        P                  ! VR\         R,
          /4      \        P                  ! VR	\         /4      ,           pTP                  TP                  VP#                  4       '       d4   \        P$                  P&                  P(                  P+                  V4      MR
4      4      pVef   \        V4      ^ 8”  dV   V U
u. uF  q¤P-                  V
4      NK  	  pp
\        P                  ! VRV/RR7      p\        P                  ! VRV/RR7      p\.        P0                  ! V^€V^,          V^,          .\        P2                  P5                  4       R7      p\6        P8                  ! VVRV/4      # u up	i u upp
i u up
i u upp
i u up
i )c                 óF   € \        V P                  R ^4      R,          4      # )Ú_éÿÿÿÿ)ÚintÚrsplit)Úns   &r   r    Ú)TextEncodeFibo2.execute.<locals>.<lambda>@   s   € ÌÈAÏHÉHÐUXÐZ[ÓL\Ð]_ÕL`ÔHar   r"   ÚlanczosÚcenter)r8   F)Útext_imagesÚend_percentg�íµ ÷Æ°>Ústart_percentÚ Úreference_latentsT)Úappend)ÚdeviceÚsamples)r   r   ri   )Úsortedr$   ÚshapeÚlenr,   r%   ÚzipÚcomfyÚutilsÚcommon_upscaleÚmovedimÚtokenizeÚencode_from_tokens_scheduledr   Únode_helpersÚconditioning_set_valuesÚTEXT_IMAGES_STARTÚstripÚtext_encodersÚfibo2ÚTEMPLATErb   ÚencodeÚtorchÚzerosÚmodel_managementÚintermediate_devicer   ra   )rY   r0   r1   r3   r6   r8   r=   r@   rA   Únamer9   rZ   r>   r+   Úsizer   rB   ÚbaserD   Úref_latentsrE   s   &&&&&&&&&            r   ÚexecuteÚTextEncodeFibo2.execute=   s¨  € à—�˜2ˆÜ+1°&Ñ>aÕ+bÓÑ+b 4ÐmqÕfr”,�&—,�,Ñ+bˆÐÙ.4ÔT©f U¼eÀEÇKÁKÐPQÅNÖ>S¸˜˜a�%“.Ñ>S‘.©fˆÑTô LOÈvË;ÐYZÌ?”,˜v a�yŸ™¨qÕ1°F¸1µI·O±OÀAÕ4FÕFÔGÐ`lˆÜ˜B ×!4Ð!4¨'°!­*¸Õ ;¸bÕ @ÓAÄ3ÀrÈF×L`ÐL`ÐV]Ð^_ÕV`ÐegÕKgÐjlÕKlÓCmˆvÜ%(¨£[°AÔ%5�%�Ñ!Ñw}Ó;~Ñw}Ðns¼LÈÏÉÐUVÍÐZ_×ZeÑZeÐfgÕZhÕIhÖ<iÑw}Ñ;~ˆä%(¨Ô%7ô9Ù%7‘k�eð "ŸK™K¨�N¨E¯K©K¸­NÐ;¸tÔC‘%ÌÏÉ×IcÒIcÐdi×dqÑdqÐrtÐvwÓdxð  JVÐ{ð  JVð  BKð  JVð  MUó  JV÷  J^ñ  J^ð  _`ð  bdó  Jeò  eÙ%7ð 	ñ 9ð —‘˜v�Ó5ˆØ×4Ñ4°VÓ<ˆÜˆv‹;˜!Ô¤
¨6× 2Ò 2Ø×4Ñ4°T·]±]À6ÐW\°]Ó5]Ó^ˆDä$×<Ò<¸TÀMÔSdÐgkÕSkÐClÓmÜ&×>Ò>¸xÈ/Ô[lÐImÓnõoˆHð ×4Ñ4°T·]±]ð  BQ÷  BWñ  BW÷  BYò  BYÄ5×CVÑCV×C\ÑC\×CeÑCe×ClÑClÐm|ÔC}ð  _aó  6bó  cˆàŠ?œs 6›{¨QœÙ:@ÓA¹&°Ÿ:™: eÖ,¹&ˆKÐAÜ#×;Ò;¸HÐGZÐ\gÐFhÐquÔvˆHÜ#×;Ò;¸HÐGZÐ\gÐFhÐquÔvˆHÜ—’˜j¨#¨v¸­|¸UÀb½[ÐIÔRW×RhÑRh×R|ÑR|ÓR~ÔˆÜ�}Š}˜X x°)¸VÐ1DÓEÐEùò3 @ùÛTùò
 <ùó9ùò Bs#   �O(®O(Á6O-Ä;=O3Æ	A>O8Ì7O>© )rs   NNr   r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Úclassmethodr[   r’   Ú__static_attributes__Ú__classdictcell__©rc   s   @r   r.   r.      s3   ø‡ € àñ
ó ð
ð< ÷Fñ Fó öFr   r.   c                   ó<   a € ] tR t^\t o ]V 3R lR l4       tRtV tR# )ÚFibo2Extensionc                óT   <€ V ^8„  d   QhRS[ S[S[P                  ,          ,          /# ©r^   r_   )ÚlistÚtyper   Ú	ComfyNode)rb   rc   s   "€r   rd   ÚFibo2Extension.__annotate__^   s"   ø€ ÷ 
ñ 
¡T©$©r¯|©|Õ*<Õ%=ñ 
r   c              ƒ  ó   "  € \         .# 5i©N)r.   )Úselfs   &r   Úget_node_listÚFibo2Extension.get_node_list]   s   é € ô ð
ð 	
ùs   ‚
r”   N)r•   r–   r—   r˜   r   r¨   rš   r›   rœ   s   @r   rž   rž   \   s   ø‡ € Ø÷
ó ö
r   rž   c                ó$   € V ^8„  d   QhR\         /# r    ©rž   )rb   s   "r   rd   rd   d   s   € ÷ ñ ¤ñ r   c               ƒ   ó   "  € \        4       # 5ir¦   r«   r”   r   r   Úcomfy_entrypointr­   d   s   é € ÜÓÐùs   ‚)r&   rŠ   Útyping_extensionsr   Úcomfy.model_managementr|   Úcomfy.text_encoders.fibo2Úcomfy.utilsr‚   rT   Úcomfy_api.latestr   r   Úexpr„   r   r,   r£   r.   rž   r­   r”   r   r   Ú<module>r´      sr   ðÛ ã Ý &ã Û  Û Û Û ß /ð —H’H˜T“N a¨$¯(ª(°4«.Õ&8Õ9Ð òjòQô=F�b—l‘lô =Fô@
�^ô 
÷r   