+
    ýäûjÂ\  ã                   óX  € R t ^ RIHt ^ RIHt ^ RIHtHtHtH	t	H
t
Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHt ^ RIHtHtHt ^ R	IHt ^ R
IHt ^RI H!t!H"t"H#t#H$t$H%t% ^RI&H't' . ROt( ! R R]PR                  4      t*R R lt+ ! R R]*4      t, ! R R],4      t- ! R R4      t.R# )a€  Extend sequential augmentation containers with child settings and data handlers.

Which class to use:

- ``BasicSequentialBase`` names child modules and stores the recorded parameter list.
- ``SequentialBase`` propagates batch and output-shape settings to compatible children.
- ``ImageSequentialBase`` provides image, mask, box and keypoint dispatch methods for concrete containers.
)ÚOrderedDict)Úzip_longest)ÚAnyÚDictÚIteratorÚListÚOptionalÚTupleN)Únn)Ú_AugmentationBase)Ú_IMAGE_SHAPESÚ_VOLUME_SHAPESÚ_detach_recorded_graph_tensorsÚ_raise_input_rank_error)Ú_autocast_disabledÚ_reconcile_under_autocastÚis_exporting)ÚBoxes)Ú	Keypoints)ÚBoxSequentialOpsÚInputSequentialOpsÚKeypointSequentialOpsÚMaskSequentialOpsÚ_validate_extra_args©Ú	ParamItemÚBasicSequentialBaseÚImageSequentialBaseÚSequentialBasec                   óÆ   a a€ ] tR t^4t oRtV3R lV 3R lltV3R lV 3R lltV3R lR ltV3R lR	 ltV3R
 lR lt	V3R lR lt
V3R lR ltV3R lR ltRtVtV ;t# )r   a¸  Provide child naming and recorded parameters for Kornia sequential containers.

Subclasses construct ``BasicSequentialBase(*modules)`` and use its named children with a list of
:class:`~kornia.augmentation.container.params.ParamItem` records. Use
:class:`~kornia.augmentation.container.ImageSequential` or
:class:`~kornia.augmentation.container.AugmentationSequential` as an application-facing container.

Args:
    *args : a list of kornia augmentation and image operation modules.

See Also:
    - :class:`~kornia.augmentation.container.base.SequentialBase`: adds sequence-wide child settings.
    - :class:`~kornia.augmentation.container.ImageSequential`: is the public image-only container.

c                ó8   <€ V ^8„  d   QhRS[ P                  RR/# )é   ÚargsÚreturnN©r
   ÚModule)ÚformatÚ__classdict__s   "€Ú^C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\augmentation\container\base.pyÚ__annotate__Ú BasicSequentialBase.__annotate__E   s   ø€ ÷ 7ñ 7™bŸi™ið 7¨Dñ 7ó    c                ó&  <€ \        4       p\        V4       F`  w  r4\        V\        P                  4      '       g   \        R V R24      hVP                  VP                  P                   RV 2V/4       Kb  	  \        SV `)  V4       RV n        R# )z1Only nn.Module are supported at this moment. Got Ú.Ú_N)r   Ú	enumerateÚ
isinstancer
   r%   ÚNotImplementedErrorÚupdateÚ	__class__Ú__name__ÚsuperÚ__init__Ú_params)Úselfr"   Ú_argsÚidxÚmodr3   s   &*   €r(   r6   ÚBasicSequentialBase.__init__E   s€   ø€ ä“ˆÜ! $ž‰HˆCÜ˜c¤2§9¡9×-Ò-Ü)Ð,]Ð^aÐ]bÐbcÐ*dÓeÐeØ�L‰L˜SŸ]™]×3Ñ3Ð4°A°c°UÐ;¸SÐAÖBñ (ô 	‰Ñ˜ÔØ26ˆŽr+   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# ©r!   r#   )r   Ústrr   )r&   r'   s   "€r(   r)   r*   O   s   ø€ ÷ Fñ F™d¡3© 8�nñ Fr+   c                ó2   <€ \        \        SV `	  4       4      # ©N)r   r5   Ú__getstate__)r8   r3   s   &€r(   rB   Ú BasicSequentialBase.__getstate__O   s   ø€ ô .¬e©gÑ.BÓ.DÓEÐEr+   c                ó:   <€ V ^8„  d   QhRS[ RS[P                  /# )r!   Útargetr#   )r?   r
   r%   )r&   r'   s   "€r(   r)   r*   T   s   ø€ ÷ $ñ $¡Cð $©B¯I©Iñ $r+   c                óh  € \        V4      ^ 8X  d   V # VP                  R4      pT pV F†  p\        W44      '       g/   \        VP	                  4       R,           V,           R,           4      h\        W44      p\        V\        P                  4      '       d   Ko  \        RV,           R,           4      h	  V# )a  Get submodule.

This code is taken from torch 1.9.0 since it is not introduced
back to torch 1.7.1. We included this for maintaining more
backward torch versions.

Args:
    target: The fully-qualified string name of the submodule
        to look for. (See above example for how to specify a
        fully-qualified string.)

Returns:
    nn.Module: The submodule referenced by ``target``

Raises:
    AttributeError: If the target string references an invalid
        path or resolves to something that is not an
        ``nn.Module``

r-   z has no attribute `Ú`z` is not an nn.Module)	ÚlenÚsplitÚhasattrÚAttributeErrorÚ	_get_nameÚgetattrr0   r
   r%   )r8   rE   Úatomsr;   Úitems   &&   r(   Úget_submoduleÚ!BasicSequentialBase.get_submoduleT   s–   € ô* ˆv‹;˜!ÔØˆKà!Ÿ<™<¨Ó,ˆØˆãˆDÜ˜3×%Ò%Ü$ S§]¡]£_Ð7LÕ%LÈtÕ%SÐVYÕ%YÓZÐZä˜#Ó$ˆCä˜c¤2§9¡9×-Ô-Ü$ S¨4¥ZÐ2IÕ%IÓJÐJñ ð ˆ
r+   c                ó   <€ V ^8„  d   QhRR/# ©r!   r#   N© )r&   r'   s   "€r(   r)   r*   z   s   ø€ ÷ ñ ˜Tñ r+   c                ó8   € \        4       '       d   R# RV n        R# )z!Reset self._params state to None.N)r   r7   ©r8   s   &r(   Úclear_stateÚBasicSequentialBase.clear_statez   s   € ä�>Š>ÙØˆŽr+   c                óJ   <€ V ^8„  d   QhRS[ P                  RS[S[,          /# ©r!   Úbatch_shaper#   ©ÚtorchÚSizer   r   )r&   r'   s   "€r(   r)   r*   �   ó#   ø€ ÷ 	"ñ 	"©e¯j©jð 	"¹TÁ)½_ñ 	"r+   c                ó   € \         h)z‹Generate parameters for a forward pass.

Args:
    batch_shape: Input batch shape.

Returns:
    Per-module parameters in execution order.
©r1   ©r8   r[   s   &&r(   Úforward_parametersÚ&BasicSequentialBase.forward_parameters�   ó
   € ô "Ð!r+   c                ót   <€ V ^8„  d   QhRS[ P                  RS[S[S[S[P                  3,          ,          /# )r!   Úindicesr#   )r]   ÚTensorr   r	   r?   r
   r%   )r&   r'   s   "€r(   r)   r*   Œ   s4   ø€ ÷ ñ ©u¯|©|ð ÁÉÉsÑTV×T]ÑT]È~ÕI^Õ@_ñ r+   c              #  óf   "  € \        V P                  4       4      pV F  pW#,          x € K  	  R# 5i)z›Yield child modules selected by index.

Args:
    indices: Indices of children to fetch.

Yields:
    ``(name, module)`` pairs matching ``indices`` order.
N)ÚlistÚnamed_children)r8   rg   Úmodulesr:   s   &&  r(   Úget_children_by_indicesÚ+BasicSequentialBase.get_children_by_indicesŒ   s,   é € ô �t×*Ñ*Ó,Ó-ˆÛˆCØ•,Ôó ùs   ‚/1c                óp   <€ V ^8„  d   QhRS[ S[,          RS[S[S[S[P                  3,          ,          /# ©r!   Úparamsr#   )r   r   r   r	   r?   r
   r%   )r&   r'   s   "€r(   r)   r*   ™   s:   ø€ ÷ Vñ V©T±)­_ð VÁÉ%ÑPSÑUW×U^ÑU^ÐP^ÕJ_ÕA`ñ Vr+   c              #  óö   "  € \        V P                  4       4      pV FU  pV\        \        V P                  4       4      P                  4       4      P	                  VP
                  4      ,          x € KW  	  R# 5i)zÅYield child modules referenced by a list of params.

Args:
    params: Parameter items whose ``name`` fields identify the children.

Yields:
    ``(name, module)`` pairs matching ``params`` order.
N)rj   rk   ÚdictÚkeysÚindexÚname)r8   rq   rl   Úparams   &&  r(   Úget_children_by_paramsÚ*BasicSequentialBase.get_children_by_params™   sZ   é € ô �t×*Ñ*Ó,Ó-ˆãˆEØœ$œt D×$7Ñ$7Ó$9Ó:×?Ñ?ÓAÓB×HÑHÈÏÉÓTÕUÔUó ùs   ‚A7A9c                óp   <€ V ^8„  d   QhRS[ S[S[S[P                  3,          ,          RS[ S[,          /# )r!   Únamed_modulesr#   )r   r	   r?   r
   r%   r   )r&   r'   s   "€r(   r)   r*   §   s4   ø€ ÷ (ñ (±(¹5ÁÁbÇiÁiÀÕ;PÕ2Qð (ÑV^Ñ_hÕViñ (r+   c              #  ó@   "  € V F  w  r#\        VR4      x € K  	  R# 5i)z¦Create placeholder params for a module iterator.

Args:
    named_modules: Modules that will be executed.

Yields:
    :class:`ParamItem` entries with ``data=None``.
Nr   )r8   r{   rv   r.   s   &&  r(   Úget_params_by_moduleÚ(BasicSequentialBase.get_params_by_module§   s    é € ó %‰GˆDÜ˜D $Ó'Ô'ó %ùs   ‚)r7   )r4   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r6   rB   rP   rW   rc   rm   rx   r}   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r3   r'   s   @@r(   r   r   4   sd   ù‡ € ñ÷ 7ó 7÷Fó F÷
$ð $÷Lð ÷	"ð 	"÷ð ÷Vð V÷(÷ (ð (r+   c                óx   € V ^8„  d   QhR\         P                  R\         P                  R\         P                  /# )r!   ÚaÚbr#   ©r]   rh   )r&   s   "r(   r)   r)   µ   s-   € ÷ ñ ¤§¡ð ´%·,±,ð Ä5Ç<Á<ñ r+   c                ó¸   € \        W4      w  r\        V P                  P                  4      ;_uu_ 4        W,          uuRRR4       #   + '       g   i     R# ; i)a>  Return ``a @ b`` outside a caller's autocast region, which would round the chained matrix to half precision.

Up to 0.34 off in bfloat16 for two ``RandomAffine`` on float32 input, and returned in that dtype (#6601). Operands
of different half and float32 dtypes, which autocast would have reconciled, meet in float32.
N)r   r   ÚdeviceÚtype)rˆ   r‰   s   &&r(   Ú_chain_transform_matricesrŽ   µ   s7   € ô % QÓ*�D€AÜ	˜AŸH™HŸM™M×	*Õ	*Ø�u÷ 
+×	*×	*Ó	*ús   µAÁA	c                   ó  a a€ ] tR t^Àt oRtRRRR/V3R lV 3R llltRV3R lR llt]V3R	 lR
 l4       t]P                  V3R lR l4       t]V3R lR l4       t
]
P                  V3R lR l4       t
RV3R lR lltRtVtV ;t# )r   aÜ  Propagate batch and shape flags through a Kornia sequential container.

A subclass constructs ``SequentialBase(*modules, same_on_batch=..., keepdim=...)``; the supplied non-``None``
flags override compatible child augmentations, including nested sequential containers. Use
:class:`~kornia.augmentation.container.ImageSequential` to process an image tensor.

Args:
    *args : a list of kornia augmentation and image operation modules.
    same_on_batch: apply the same transformation across the batch.
        If None, it will not overwrite the function-wise settings.
    keepdim: whether to keep the output shape the same as input (True) or broadcast it
        to the batch form (False). If None, it will not overwrite the function-wise settings.

See Also:
    - :class:`~kornia.augmentation.container.base.BasicSequentialBase`: provides child and parameter bookkeeping.
    - :class:`~kornia.augmentation.container.base.ImageSequentialBase`: supplies data-type-specific operations.

Úsame_on_batchNÚkeepdimc                ód   <€ V ^8„  d   QhRS[ P                  RS[S[,          RS[S[,          RR/# )r!   r"   r�   r‘   r#   N)r
   r%   r   Úbool)r&   r'   s   "€r(   r)   ÚSequentialBase.__annotate__Ô   s9   ø€ ÷ >ñ >™bŸi™ið >¹Á½ð >ÑX`ÑaeÕXfð >Ðrvñ >r+   c               ó`   <€ \         SV `  ! V!   Wn        W n        V P	                  WR 7       R# ©)r‘   N)r5   r6   Ú_same_on_batchÚ_keepdimÚupdate_attribute)r8   r�   r‘   r"   r3   s   &$$*€r(   r6   ÚSequentialBase.__init__Ô   s,   ø€ ä‰Ò˜$ÒØ+ÔØŒØ×Ñ˜mÐÖ=r+   c                óJ   <€ V ^8„  d   QhRS[ S[,          RS[ S[,          RR/# )r!   r�   r‘   r#   N©r   r“   )r&   r'   s   "€r(   r)   r”   Û   s1   ø€ ÷ =ñ =á¡•~ð=ñ ™$•ð=ð 
ñ	=r+   c                óú   € V P                  4        Ff  p\        V\        \        P                  34      '       d   Ve   Wn        Ve   W#n        \        V\        4      '       g   KU  VP                  W4       Kh  	  R# )zŸPropagate sequence-level flags to child augmentation modules.

Args:
    same_on_batch: Override for ``same_on_batch``.
    keepdim: Override for ``keepdim``.
N)	Úchildrenr0   r   ÚKÚMixAugmentationBaseV2r�   r‘   r   r™   )r8   r�   r‘   r;   s   &&& r(   r™   ÚSequentialBase.update_attributeÛ   s_   € ð —=‘=–?ˆCÜ˜#Ô 1´1×3JÑ3JÐK×LÒLØ Ò,Ø(5Ô%ØÒ&Ø")”KÜ˜#œ~×.Ô.Ø×$Ñ$ ]Ö<ó #r+   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r>   rœ   )r&   r'   s   "€r(   r)   r”   ð   s   ø€ ÷ #ñ #™x©�~ñ #r+   c                ó   € V P                   # )z4Return the sequence-level ``same_on_batch`` setting.)r—   rV   s   &r(   r�   ÚSequentialBase.same_on_batchï   s   € ð ×"Ñ"Ð"r+   c                ó4   <€ V ^8„  d   QhRS[ S[,          RR/# )r!   r�   r#   Nrœ   )r&   r'   s   "€r(   r)   r”   õ   s   ø€ ÷ ;ñ ;©8±D­>ð ;¸dñ ;r+   c                ó6   € Wn         V P                  VR 7       R# ))r�   N)r—   r™   )r8   r�   s   &&r(   r�   r¤   ô   s   € à+ÔØ×Ñ¨MÐÖ:r+   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# r>   rœ   )r&   r'   s   "€r(   r)   r”   ú   s   ø€ ÷ ñ ™¡$�ñ r+   c                ó   € V P                   # )z.Return the sequence-level ``keepdim`` setting.)r˜   rV   s   &r(   r‘   ÚSequentialBase.keepdimù   s   € ð �}‰}Ðr+   c                ó4   <€ V ^8„  d   QhRS[ S[,          RR/# )r!   r‘   r#   Nrœ   )r&   r'   s   "€r(   r)   r”   ÿ   s   ø€ ÷ /ñ /™x©�~ð /°$ñ /r+   c                ó6   € Wn         V P                  VR 7       R# r–   )r˜   r™   )r8   r‘   s   &&r(   r‘   r©   þ   s   € àŒØ×Ñ gÐÖ.r+   c                ó”   <€ V ^8„  d   QhRS[ P                  RS[S[S[3,          RS[S[ P                  S[ P                  3,          /# )r!   ÚinputÚ	dim_ranger#   )r]   rh   r	   Úintr^   )r&   r'   s   "€r(   r)   r”     sG   ø€ ÷ &ñ &¡%§,¡,ð &¹5ÁÁcÀ½?ð &ÑX]Ñ^c×^hÑ^hÑjo×jtÑjtÐ^tÕXuñ &r+   c                ót  € VP                   p\        V4      V^ ,          8  g   \        V4      V^,          8”  dG   R\        R\        /P	                  \        V4      V^ ,           RV^,           R24      p\        W44       \        VP                   4      V^,          8  d   VR,          pK,  W1P                   3# )zÒFill torch.Tensor dim to the upper bound of dim_range.

A rank outside ``dim_range`` raises :class:`~kornia.core.exceptions.InputRankError` with the message an
augmentation itself gives for that input (#4424).
z to z dimensionsN©r!   é   )é   é   )ÚshaperH   r   r   ÚgetÚtupler   )r8   r­   r®   Ú	ori_shapeÚaccepteds   &&&  r(   Úautofill_dimÚSequentialBase.autofill_dim  s™   € ð —K‘Kˆ	Üˆy‹>˜I a�LÔ(¬C°	«N¸YÀq½\Ô,IØ¤¨v´~ÐF×JÑJÜ�iÓ  Y¨q¥\ N°$°yÀµ|°nÀKÐ"PóˆHô $ IÔ8Ü�%—+‘+Ó ¨1¥Ô-Ø˜$•KŠEØŸ+™+Ð%Ð%r+   )r˜   r—   ©NN)r±   )r4   r   r€   r�   r‚   r6   r™   Úpropertyr�   Úsetterr‘   rº   rƒ   r„   r…   r†   s   @@r(   r   r   À   s–   ù‡ € ñð&>Èð >Ðim÷ >õ >÷=ò =ð( ÷#ó ð#ð ×Ñ÷;ó ð;ð ÷ó ðð ‡^�^÷/ó ð/÷&÷ &ò &r+   c                   óP  a € ] tR tRt o RtV 3R lR ltR!V 3R lR lltV 3R lR	 ltR"V 3R
 lR lltR"V 3R lR llt	R"V 3R lR llt
R"V 3R lR lltR"V 3R lR lltR"V 3R lR lltR"V 3R lR lltR"V 3R lR lltR"V 3R lR lltR#V 3R lR lltR#V 3R lR lltR tV tR# )$r   i  a  Define image, mask, box and keypoint operations for a sequential container.

Subclasses provide child selection and parameter sampling; these methods apply the resulting parameter records to
their corresponding data type. Use :class:`~kornia.augmentation.container.AugmentationSequential` for public
multi-input augmentation, or :class:`~kornia.augmentation.container.ImageSequential` for images only.

See Also:
    - :class:`~kornia.augmentation.container.ImageSequential`: processes image tensors through its children.
    - :class:`~kornia.augmentation.container.AugmentationSequential`: applies the operations to aligned data types.

c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r!   r­   r#   rŠ   )r&   r'   s   "€r(   r)   Ú ImageSequentialBase.__annotate__!  s#   ø€ ÷ "ñ "¡U§\¡\ð "±e·l±lñ "r+   c                ó   € \         h)zReturn identity matrix.ra   )r8   r­   s   &&r(   Úidentity_matrixÚ#ImageSequentialBase.identity_matrix!  ó   € ä!Ð!r+   Nc                ó¶   <€ V ^8„  d   QhRS[ P                  RS[S[S[,          ,          RS[RS[S[S[S[3,          ,          RS[S[ P                  ,          /# )r!   r­   rq   Ú	recomputeÚ
extra_argsr#   )	r]   rh   r   r   r   r“   r   r?   r   )r&   r'   s   "€r(   r)   rÁ   %  s`   ø€ ÷ "ñ "á�|‰|ð"ñ ™™i�Õ)ð"ñ ð	"ñ
 ™T¡#¡s (�^Õ,ð"ñ 
‘%—,‘,Õ	ñ"r+   c                ó   € \         h)ai  Compute the transformation matrix according to the provided parameters.

Args:
    input: the input torch.Tensor.
    params: params for the sequence.
    recompute: if to recompute the transformation matrix according to the params.
        default: False.
    extra_args: Optional dictionary of extra arguments with specific options for different input types.
ra   )r8   r­   rq   rÇ   rÈ   s   &&&&&r(   Úget_transformation_matrixÚ-ImageSequentialBase.get_transformation_matrix%  s
   € ô  "Ð!r+   c                óJ   <€ V ^8„  d   QhRS[ P                  RS[S[,          /# rZ   r\   )r&   r'   s   "€r(   r)   rÁ   7  r_   r+   c                ó   € \         h)z{Generate parameters for child modules.

Args:
    batch_shape: Input batch shape.

Returns:
    Per-module parameter list.
ra   rb   s   &&r(   rc   Ú&ImageSequentialBase.forward_parameters7  re   r+   c                ó€   <€ V ^8„  d   QhRS[ S[S[,          ,          RS[S[S[S[P                  3,          ,          /# rp   )r   r   r   r   r	   r?   r
   r%   )r&   r'   s   "€r(   r)   rÁ   B  s=   ø€ ÷ "ñ "©8±D¹µOÕ+Dð "ÑPXÑY^Ñ_bÑdf×dmÑdmÐ_mÕYnÕPoñ "r+   c                ó   € \         h)z$Get module sequence by input params.ra   )r8   rq   s   &&r(   Úget_forward_sequenceÚ(ImageSequentialBase.get_forward_sequenceB  rÅ   r+   c          	      ó�   <€ V ^8„  d   QhRS[ P                  RS[S[,          RS[S[S[S[3,          ,          RS[ P                  /# ©r!   r­   rq   rÈ   r#   ©r]   rh   r   r   r   r   r?   r   )r&   r'   s   "€r(   r)   rÁ   F  sK   ø€ ÷ ñ Ù—\‘\ðÙ+/±	­?ðÙHPÑQUÑVYÑ[^ÐV^ÕQ_ÕH`ðá	�‰ñr+   c                ó*  € \        WV4      p\        4       '       g   . V n        V Fé  pV P                  VP                  4      p\
        P                  ! WWCR7      p\        4       '       d   KH  \        V\        P                  4      '       d>   VP                  pV P                  P                  Vf   RMVP                  4       4       K¥  \        V4      \        P                  J g   KÄ  V P                  P                  VP                  4       Kë  	  V# )zØApply the sequence to an input tensor.

Args:
    input: Input tensor.
    params: Parameters aligned with the execution sequence.
    extra_args: Optional per-input-type overrides.

Returns:
    Transformed tensor.
©Úmodulerw   rÈ   N)r   r   Ú_sequence_matricesrP   rv   r   Ú	transformr0   rŸ   ÚAugmentationSequentialÚtransform_matrixÚappendÚcloner�   ÚImageSequentialÚextend)r8   r­   rq   rÈ   rw   rØ   Úmatrixs   &&&&   r(   Útransform_inputsÚ$ImageSequentialBase.transform_inputsF  sÇ   € ô *¨$¸FÓCˆ
Ü�~Š~ØDFˆDÔ#ÛˆEØ×'Ñ'¨¯
©
Ó3ˆFÜ&×0Ò0°ÈUÔjˆEÜ—>”>Ü˜f¤a×&>Ñ&>×?Ò?à#×4Ñ4�FØ×+Ñ+×2Ñ2¸6º>±4ÈvÏ|É|Ë~Ö^Ü˜&“\¤Q×%6Ñ%6Õ6Ø×+Ñ+×2Ñ2°6×3LÑ3LÖMñ ð ˆr+   c          	      ó�   <€ V ^8„  d   QhRS[ P                  RS[S[,          RS[S[S[S[3,          ,          RS[ P                  /# rÔ   rÕ   )r&   r'   s   "€r(   r)   rÁ   b  óK   ø€ ÷ ñ Ù—\‘\ðÙ+/±	­?ðÙHPÑQUÑVYÑ[^ÐV^ÕQ_ÕH`ðá	�‰ñr+   c                óÖ   € \        WV4      p\        \        V P                  V4      4      RRR1,          VRRR1,          4       F   w  w  rEp\        P
                  ! WWcR7      pK"  	  V# )a  Apply inverse transforms for an input tensor.

Args:
    input: Tensor produced by :meth:`transform_inputs`.
    params: Parameters used during forward execution.
    extra_args: Optional per-input-type overrides.

Returns:
    Tensor mapped back through inverse operations.
Nr×   éÿÿÿÿ)r   r   rj   rÑ   r   Úinverse©r8   r­   rq   rÈ   r.   rØ   rw   s   &&&&   r(   Úinverse_inputsÚ"ImageSequentialBase.inverse_inputsb  si   € ô *¨$¸FÓCˆ
Ü"-¬d°4×3LÑ3LÈVÓ3TÓ.UÑVZÐXZÐVZÕ.[Ð]cÑdhÐfhÐdhÕ]iÖ"jÑ‰KˆQ˜Ü&×.Ò.¨uÈ5ÔhŠEñ #kàˆr+   c          	      ó�   <€ V ^8„  d   QhRS[ P                  RS[S[,          RS[S[S[S[3,          ,          RS[ P                  /# rÔ   rÕ   )r&   r'   s   "€r(   r)   rÁ   t  sK   ø€ ÷ ñ Ù—\‘\ðÙ+/±	­?ðÙHPÑQUÑVYÑ[^ÐV^ÕQ_ÕH`ðá	�‰ñr+   c                ó–   € \        WV4      pV F6  pV P                  VP                  4      p\        P                  ! WWCR7      pK8  	  V# )zÙApply the sequence to mask tensors.

Args:
    input: Mask tensor.
    params: Parameters aligned with the execution sequence.
    extra_args: Optional per-input-type overrides.

Returns:
    Transformed mask tensor.
r×   )r   rP   rv   r   rÚ   ©r8   r­   rq   rÈ   rw   rØ   s   &&&&  r(   Útransform_masksÚ#ImageSequentialBase.transform_maskst  sG   € ô *¨$¸FÓCˆ
ÛˆEØ×'Ñ'¨¯
©
Ó3ˆFÜ%×/Ò/°ÈEÔiŠEñ ð ˆr+   c          	      ó�   <€ V ^8„  d   QhRS[ P                  RS[S[,          RS[S[S[S[3,          ,          RS[ P                  /# rÔ   rÕ   )r&   r'   s   "€r(   r)   rÁ   ‡  rå   r+   c                óÖ   € \        WV4      p\        \        V P                  V4      4      RRR1,          VRRR1,          4       F   w  w  rEp\        P
                  ! WWcR7      pK"  	  V# )a  Apply inverse transforms for mask tensors.

Args:
    input: Mask tensor produced by :meth:`transform_masks`.
    params: Parameters used during forward execution.
    extra_args: Optional per-input-type overrides.

Returns:
    Inverse-transformed mask tensor.
Nr×   rç   )r   r   rj   rÑ   r   rè   ré   s   &&&&   r(   Úinverse_masksÚ!ImageSequentialBase.inverse_masks‡  si   € ô *¨$¸FÓCˆ
Ü"-¬d°4×3LÑ3LÈVÓ3TÓ.UÑVZÐXZÐVZÕ.[Ð]cÑdhÐfhÐdhÕ]iÖ"jÑ‰KˆQ˜Ü%×-Ò-¨eÈ%ÔgŠEñ #kàˆr+   c          	      óh   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[S[S[3,          ,          RS[ /# rÔ   ©r   r   r   r   r   r?   r   )r&   r'   s   "€r(   r)   rÁ   ™  s?   ø€ ÷ ñ ÙðÙ$(©¥OðÙAIÉ$ÉsÑTWÈxÍ.ÕAYðá	ñr+   c                ó–   € \        WV4      pV F6  pV P                  VP                  4      p\        P                  ! WWCR7      pK8  	  V# )zØApply the sequence to bounding boxes.

Args:
    input: Bounding boxes.
    params: Parameters aligned with the execution sequence.
    extra_args: Optional per-input-type overrides.

Returns:
    Transformed boxes.
r×   )r   rP   rv   r   rÚ   rî   s   &&&&  r(   Útransform_boxesÚ#ImageSequentialBase.transform_boxes™  sG   € ô *¨$¸FÓCˆ
ÛˆEØ×'Ñ'¨¯
©
Ó3ˆFÜ$×.Ò.¨uÈ5ÔhŠEñ ð ˆr+   c          	      óh   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[S[S[3,          ,          RS[ /# rÔ   rö   )r&   r'   s   "€r(   r)   rÁ   ¬  s?   ø€ ÷ ñ ÙðÙ$(©¥OðÙAIÉ$ÉsÑTWÈxÍ.ÕAYðá	ñr+   c                óÖ   € \        WV4      p\        \        V P                  V4      4      RRR1,          VRRR1,          4       F   w  w  rEp\        P
                  ! WWcR7      pK"  	  V# )züApply inverse transforms for bounding boxes.

Args:
    input: Boxes produced by :meth:`transform_boxes`.
    params: Parameters used during forward execution.
    extra_args: Optional per-input-type overrides.

Returns:
    Inverse-transformed boxes.
Nr×   rç   )r   r   rj   rÑ   r   rè   ré   s   &&&&   r(   Úinverse_boxesÚ!ImageSequentialBase.inverse_boxes¬  si   € ô *¨$¸FÓCˆ
Ü"-¬d°4×3LÑ3LÈVÓ3TÓ.UÑVZÐXZÐVZÕ.[Ð]cÑdhÐfhÐdhÕ]iÖ"jÑ‰KˆQ˜Ü$×,Ò,¨UÈÔfŠEñ #kàˆr+   c          	      óh   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[S[S[3,          ,          RS[ /# rÔ   ©r   r   r   r   r   r?   r   )r&   r'   s   "€r(   r)   rÁ   ¾  sA   ø€ ÷ ñ ÙðÙ(,©Y­ðÙEMÉdÑSVÑX[ÐS[ÍnÕE]ðá	ñr+   c                ó–   € \        WV4      pV F6  pV P                  VP                  4      p\        P                  ! WWCR7      pK8  	  V# )zÒApply the sequence to keypoints.

Args:
    input: Keypoints.
    params: Parameters aligned with the execution sequence.
    extra_args: Optional per-input-type overrides.

Returns:
    Transformed keypoints.
r×   )r   rP   rv   r   rÚ   rî   s   &&&&  r(   Útransform_keypointsÚ'ImageSequentialBase.transform_keypoints¾  sH   € ô *¨$¸FÓCˆ
ÛˆEØ×'Ñ'¨¯
©
Ó3ˆFÜ)×3Ò3°EÐPUÔmŠEñ ð ˆr+   c          	      óh   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[S[S[3,          ,          RS[ /# rÔ   rÿ   )r&   r'   s   "€r(   r)   rÁ   Ñ  sA   ø€ ÷ ñ ÙðÙ(,©Y­ðÙEMÉdÑSVÑX[ÐS[ÍnÕE]ðá	ñr+   c                óÖ   € \        WV4      p\        \        V P                  V4      4      RRR1,          VRRR1,          4       F   w  w  rEp\        P
                  ! WWcR7      pK"  	  V# )ag  Apply inverse transforms for keypoints.

Args:
    input: Keypoints produced by :meth:`transform_keypoints` (conceptually
        ``(B, N, 2)`` coordinates, where the last dimension stores
        ``(x, y)``.
    params: Parameters used during forward execution.
    extra_args: Optional per-input-type overrides.

Returns:
    Inverse-transformed keypoints.
Nr×   rç   )r   r   rj   rÑ   r   rè   ré   s   &&&&   r(   Úinverse_keypointsÚ%ImageSequentialBase.inverse_keypointsÑ  si   € ô *¨$¸FÓCˆ
Ü"-¬d°4×3LÑ3LÈVÓ3TÓ.UÑVZÐXZÐVZÕ.[Ð]cÑdhÐfhÐdhÕ]iÖ"jÑ‰KˆQ˜Ü)×1Ò1°%ÈeÔkŠEñ #kàˆr+   c          	      ó    <€ V ^8„  d   QhRS[ P                  RS[S[S[,          ,          RS[S[S[S[3,          ,          RS[ P                  /# rÔ   ©r]   rh   r   r   r   r   r?   r   )r&   r'   s   "€r(   r)   rÁ   å  sV   ø€ ÷ Iñ IÙ—\‘\ðIÙ+3±D¹µOÕ+DðIÙYaÑbfÑgjÑloÐgoÕbpÕYqðIá	�‰ñIr+   c                óz   € Vf&   V P                   f   \        R4      hV P                   pV P                  WVR7      # )z�Inverse transformation.

Used to inverse a torch.Tensor according to the performed transformation by a forward pass, or with respect to
provided parameters.
zrNo parameters available for inversing, please run a forward pass first or passing valid params into this function.)rÈ   )r7   Ú
ValueErrorrê   )r8   r­   rq   rÈ   s   &&&&r(   rè   ÚImageSequentialBase.inverseå  sG   € ð Š>Ø�|‰|Ò#Ü ðBóð ð —\‘\ˆFà×"Ñ" 5¸ZÐ"ÓHÐHr+   c          	      ó    <€ V ^8„  d   QhRS[ P                  RS[S[S[,          ,          RS[S[S[S[3,          ,          RS[ P                  /# rÔ   r  )r&   r'   s   "€r(   r)   rÁ   ÷  sP   ø€ ÷ ñ Ù—\‘\ðÙ+3±D¹µOÕ+DðÙYaÑbfÑgjÑloÐgoÕbpÕYqðá	�‰ñr+   c                óÐ   € V P                  4        Vf)   TpV P                  VRR7      w  rVV P                  V4      pV P                  WVR7      p\	        4       '       g   W n        V# )a  Run the sequential augmentation pipeline.

Args:
    input: Input tensor.
    params: Optional precomputed parameters. If omitted, parameters are
        sampled from ``input``.
    extra_args: Optional per-input-type overrides.

Returns:
    Augmented tensor.
)r®   )rq   rÈ   r±   )rW   rº   rc   râ   r   r7   )r8   r­   rq   rÈ   Úinpr.   Ú	out_shapes   &&&&   r(   ÚforwardÚImageSequentialBase.forward÷  sg   € ð 	×ÑÔàŠ>ØˆCØ×,Ñ,¨S¸FÐ,ÓC‰LˆAØ×,Ñ,¨YÓ7ˆFà×%Ñ% eÀzÐ%ÓRˆä�~Š~Ø!ŒLØˆr+   )r7   rÙ   )NFNrA   r¼   )r4   r   r€   r�   r‚   rÃ   rÊ   rc   rÑ   râ   rê   rï   ró   rø   rü   r  r  rè   r  rƒ   r„   )r'   s   @r(   r   r     s�   ø‡ € ñ
÷"ð "÷"ò "÷$	"ð 	"÷"ò "÷ò ÷8ò ÷$ò ÷&ò ÷$ò ÷&ò ÷$ò ÷&ò ÷(Iò I÷$÷ ð r+   c                   óÌ   a a€ ] tR tRt oRtRtRtV3R lV 3R lltV3R lR lt]	V3R lR	 l4       t
V3R
 lR ltV3R lR ltV3R lR ltV3R lR ltV3R ltRtVtV ;t# )ÚTransformMatrixMinIni  z'Enables computation matrix computation.Úsilentc                ó   <€ V ^8„  d   QhRR/# rS   rT   )r&   r'   s   "€r(   r)   Ú!TransformMatrixMinIn.__annotate__  s   ø€ ÷ Dñ D¨4ñ Dr+   c                óD   <€ \         SV `  ! V/ VB  R V n        . V n        R # rA   )r5   r6   Ú_transform_matrixÚ_transform_matrices)r8   r"   Úkwargsr3   s   &*,€r(   r6   ÚTransformMatrixMinIn.__init__  s%   ø€ Ü‰Ò˜$Ð) &Ò)Ø9=ˆÔØACˆÖ r+   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r!   Útransformation_matrix_moder#   N)r?   )r&   r'   s   "€r(   r)   r    s    ø€ ÷ Eñ EÉCð EÐTXñ Er+   c                óJ   € 0 RmpW9  d   \        RV RV R24      hWn        R# )Úsilencez)`transformation_matrix` has to be one of z. Got r-   N>   ÚskipÚrigidr  r  )r
  Ú_transformation_matrix_arg)r8   r  Ú!_valid_transformation_matrix_argss   && r(   Ú!_parse_transformation_matrix_modeÚ6TransformMatrixMinIn._parse_transformation_matrix_mode  s@   € Ú,RÐ)Ø%ÔNÜØ;Ð<]Ð;^ð _Ø1Ð2°!ð5óð ð +EÖ'r+   c                óD   <€ V ^8„  d   QhRS[ S[P                  ,          /# r>   ©r   r]   rh   )r&   r'   s   "€r(   r)   r  (  s   ø€ ÷ &ñ &¡(©5¯<©<Õ"8ñ &r+   c                óð   € V P                   f^   \        V P                  4      ^ 8w  dD   V P                  ^ ,          V n         V P                  R,           F  pV P                  V4       K  	  V P                   # )N:é   NN)r  rH   r  Ú_update_transform_matrix)r8   Úmats   & r(   rÜ   Ú%TransformMatrixMinIn.transform_matrix'  sg   € ð ×!Ñ!Ò)¬c°$×2JÑ2JÓ.KÈqÔ.PØ%)×%=Ñ%=¸aÕ%@ˆDÔ"Ø×/Ñ/°×3Ð3�Ø×-Ñ-¨cÖ2ñ 4à×%Ñ%Ð%r+   c                ó8   <€ V ^8„  d   QhRS[ P                  RR/# ©r!   rØ   r#   Nr$   )r&   r'   s   "€r(   r)   r  1  s   ø€ ÷ *ñ *¹B¿I¹Ið *È$ñ *r+   c                ó   € \        V4      hrA   ra   ©r8   rØ   s   &&r(   Ú%_update_transform_matrix_for_valid_opÚ:TransformMatrixMinIn._update_transform_matrix_for_valid_op1  s   € Ü! &Ó)Ð)r+   c                ó8   <€ V ^8„  d   QhRS[ P                  RR/# r.  r$   )r&   r'   s   "€r(   r)   r  4  s   ø€ ÷ 	ñ 	¹¿¹ð 	Àtñ 	r+   c                óÈ   € V P                   R 8X  d   R# \        WP                  4      '       d   V P                  V4       R# V P                   R8X  d   \	        RV R24      hR# )r   Nr!  zNon-rigid module `z‚` is not supported under `rigid` computation mode. Please either update the module or change the `transformation_matrix` argument.)r"  r0   Ú$_valid_ops_for_transform_computationr1  ÚRuntimeErrorr0  s   &&r(   Ú"_update_transform_matrix_by_moduleÚ7TransformMatrixMinIn._update_transform_matrix_by_module4  se   € Ø×*Ñ*¨fÔ4ÙÜ�f×GÑG×HÒHØ×6Ñ6°vÖ>Ø×,Ñ,°Ô7ÜØ$ V Hð -bð bóð ñ 8r+   c                óH   <€ V ^8„  d   QhRS[ S[P                  ,          RR/# )r!   rÜ   r#   Nr'  )r&   r'   s   "€r(   r)   r  ?  s)   ø€ ÷ iñ i¹Á%Ç,Á,Õ9Oð iÐTXñ ir+   c                óŠ   € \        4       '       d   R # V P                  f	   Wn        R # \        WP                  4      V n        R # rA   )r   r  rŽ   )r8   rÜ   s   &&r(   r*  Ú-TransformMatrixMinIn._update_transform_matrix?  s2   € Ü�>Š>ÙØ×!Ñ!Ò)Ø%5Ö"ä%>Ð?O×QgÑQgÓ%hˆDÖ"r+   c                ó   <€ V ^8„  d   QhRR/# rS   rT   )r&   r'   s   "€r(   r)   r  G  s   ø€ ÷ &ñ &¨tñ &r+   c                óF   € \        4       '       d   R # R V n        . V n        R # rA   )r   r  r  rV   s   &r(   Ú_reset_transform_matrix_stateÚ2TransformMatrixMinIn._reset_transform_matrix_stateG  s   € Ü�>Š>ÙØ!%ˆÔØ#%ˆÖ r+   c                óF   <€ V ^8„  d   Qh/ S[ S[R3,          ;R&   S[;R&   # )r!   .r5  r"  )r	   r   r?   )r&   r'   s   "€r(   r)   r    s'   ø‡ ‚ ñ +0±°S°­/Ñ>ñ ñ !$Ñ.ò	 r+   )r  r  r"  rT   )r4   r   r€   r�   r‚   r5  r"  r6   r$  r½   rÜ   r1  r7  r*  r>  Ú__annotate_func__rƒ   r„   r…   r†   s   @@r(   r  r    sr   ù‡ € Ù1à<>Ð(Ø&.Ð÷Dó D÷
Eð Eð ÷&ó ð&÷*ð *÷	ð 	÷ið i÷&ð &÷i … r+   r  )r   r   r   )/r‚   Úcollectionsr   Ú	itertoolsr   Útypingr   r   r   r   r   r	   r]   r
   Úkornia.augmentationÚaugmentationrŸ   Úkornia.augmentation.baser   Ú!kornia.augmentation.utils.helpersr   r   r   r   Úkornia.core.utilsr   r   r   Úkornia.geometry.boxesr   Úkornia.geometry.keypointsr   Úopsr   r   r   r   r   rq   r   Ú__all__Ú
Sequentialr   rŽ   r   r   r  rT   r+   r(   Ú<module>rO     sŒ   ðñ$õ $Ý !ß =× =ã Ý å Ý 6÷ó ÷ ZÑ YÝ 'Ý /ç uÕ uÝ â
J€ô~(˜"Ÿ-™-ô ~(õBôQ&Ð(ô Q&ôh|˜.ô |÷~8&ó 8&r+   