+
    õäûjÒ  ã                  óP   € ^ RI Ht ^ RIHt ^ RIt] ! R R4      4       tR R ltR# )é    )Úannotations)Ú	dataclassNc                  ó€   € ] tR t^t$ Rt^ tR]R&    ^tR]R&    RtR]R&    R t	]
R	 R
 l4       tR R ltR R ltRtR# )ÚSizeRequirementsz7
A set of requirements for the size of an input image.
ÚintÚminimumÚmultiple_ofFÚboolÚsquarec                	ó"  € V P                   ^ 8¼  g   Q R4       hV P                  ^8¼  g   Q R4       hV P                   V P                  ,          ^ 8w  d=   V P                   V P                  ,          ^,           V P                  ,          V n         R# R# )r   zminimum must be >= 0zmultiple_of must be >= 1N)r   r	   ©Úselfs   &ÚWC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\spandrel\__helpers\size_req.pyÚ__post_init__ÚSizeRequirements.__post_init__'   sv   € Ø�|‰|˜qÔ Ð8Ð"8Ó8Ð Ø×Ñ 1Ô$Ð@Ð&@Ó@Ð$à�<‰<˜$×*Ñ*Õ*¨aÔ/Ø ŸL™L¨D×,<Ñ,<Õ<¸qÕ@ÀD×DTÑDTÕTˆDŽLñ 0ó    c               ó   € V ^8„  d   QhRR/# )é   Úreturnr
   © )Úformats   "r   Ú__annotate__ÚSizeRequirements.__annotate__/   s   € ÷ Oñ O�dñ Or   c                ó€   € V P                   ^ 8H  ;'       d)    V P                  ^8H  ;'       d    V P                  '       * # )zq
Returns True if no size requirements are specified.

If True, then `check` is guaranteed to always return True.
)r   r	   r   r   s   &r   ÚnoneÚSizeRequirements.none.   s4   € ð �|‰|˜qÑ ×NÐN T×%5Ñ%5¸Ñ%:×NÐNÀ4Ç;Á;¼ÐNr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úwidthr   Úheightr   r
   r   )r   s   "r   r   r   7   s!   € ÷ 9ñ 9˜3ð 9¨ð 9°ñ 9r   c                ó*   € V P                  W4      R8H  # )zK
Returns whether the given width and height satisfy the size requirements.
)r   r   )Úget_padding)r   r   r   s   &&&r   ÚcheckÚSizeRequirements.check7   s   € ð ×Ñ Ó.°&Ñ8Ð8r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   r   r   ztuple[int, int]r   )r   s   "r   r   r   =   s!   € ÷ %ñ % ð %¨cð %°oñ %r   c                ó
  € R R lp\        V P                  V4      p\        V P                  V4      pV! W@P                  4      pV! WPP                  4      pV P                  '       d   \        WE4      ;rEWA,
          WR,
          3# )zÓ
Given an image size, this returns the minimum amount of padding necessary to satisfy the size requirements. The returned padding is in the format `(pad_width, pad_height)` and is guaranteed to be non-negative.
c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úxr   Úmodr   r   )r   s   "r   r   Ú2SizeRequirements.get_padding.<locals>.__annotate__B   s!   € ÷ 	(ñ 	(˜3ð 	( Sð 	(¨Sñ 	(r   c                óL   € W,          ^ 8X  d   V # W,          ^,           V,          # )r   r   )r'   r(   s   &&r   Úceil_moduloÚ1SizeRequirements.get_padding.<locals>.ceil_moduloB   s!   € Ø�w˜!Œ|Ø�Ø•H˜q•L CÕ'Ð'r   )Úmaxr   r	   r   )r   r   r   r+   ÚwÚhs   &&&   r   r!   ÚSizeRequirements.get_padding=   sm   € õ
	(ô
 �T—\‘\ 5Ó)ˆÜ�T—\‘\ 6Ó*ˆá˜×+Ñ+Ó,ˆÙ˜×+Ñ+Ó,ˆà�;�;ˆ;Ü˜“IÐˆAà�y˜!�*Ð$Ð$r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__annotations__r	   r   r   Úpropertyr   r"   r!   Ú__static_attributes__r   r   r   r   r      se   ‡ ñð €GˆSÓðð €K�Óðð €FˆDÓðòUð ôOó ðOõ9÷%ñ %r   r   c               ó    € V ^8„  d   QhRRRR/# )r   Útztorch.TensorÚreqr   r   )r   s   "r   r   r   S   s   € ÷ ñ �,ð Ð%5ñ r   c                óÈ  € V P                   R,          pV P                   R,          pVP                  W#4      w  rEV'       g	   V'       d—   \        WB^,
          4      p\        WS^,
          4      p\        P                  P
                  P                  V ^ V^ V3R4      p WF,          pWW,          p\        P                  P
                  P                  V ^ V^ V3R4      p RV 3# RV 3# )é   ÚreflectÚ	replicateTFéÿÿÿÿéþÿÿÿ)Úshaper!   ÚminÚtorchÚnnÚ
functionalÚpad)r:   r;   r.   r/   Úpad_wÚpad_hÚreflect_pad_wÚreflect_pad_hs   &&      r   Ú
pad_tensorrL   S   s¿   € Ø	�‰��€AØ	�‰��€Aà—?‘? 1Ó(�L€Eç—ä˜E q¥5Ó)ˆÜ˜E q¥5Ó)ˆÜ�H‰H×Ñ×#Ñ# A¨¨=¸!¸]Ð'KÈYÓWˆð 	ÕˆØÕˆÜ�H‰H×Ñ×#Ñ# A¨¨5°!°UÐ';¸[ÓIˆà�Qˆwˆà�aˆxˆr   )Ú
__future__r   Údataclassesr   rD   r   rL   r   r   r   Ú<module>rO      s0   ðÝ "å !ã ð ÷G%ð G%ó ðG%÷Tr   