+
    Wåûjì4  ã                   óx   € ^ RI t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 R.tR R	 lt ! R
 R4      tR# )é    N)Ú
deprecated©ÚTensor)Úconstraints)Úlazy_property©Ú_sizeÚDistributionc                ó<   € V ^8„  d   QhR\         R\        R\        /# )é   ÚvalidÚerror_messageÚreturn)r   ÚstrÚbool)Úformats   "Ú\C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\torch\distributions\distribution.pyÚ__annotate__r      s!   € ÷ +ñ +¤vð +¼cð +Ädñ +ó    c                 óþ   € \         P                  P                  4       '       d<   \         P                  ! \         P                  ! V 4      P                  4       V4       R # \        \         P                  ! V 4      4      # ©T)ÚtorchÚcompilerÚis_exportingÚ_assert_asyncÚ_is_all_trueÚcpur   )r   r   s   &&r   Ú_all_true_or_runtime_assertr      sR   € Ü‡~�~×"Ñ"×$Ò$Ü×ÒœE×.Ò.¨uÓ5×9Ñ9Ó;¸]ÔKÙÜ”×"Ò" 5Ó)Ó*Ð*r   c                   ó  a a€ ] tR t^t oRtRtRtRt]V3R lR l4       t	]
P                  ! 4       ]
P                  ! 4       R3V3R lV 3R llltR7V3R	 lR
 llt]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]V3R lR l4       t]
P                  ! 4       3V3R lR llt]
P                  ! 4       3V3R lR llt]! R]R 7      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R8V3R) lR* lltV3R+ lR, lt V3R- lR. lt!]
P                  ! 4       3V3R/ lR0 llt"V3R1 lR2 lt#R7R3 lt$V3R4 lR5 lt%R6t&Vt'V ;t(# )9r
   a;  
Distribution is the abstract base class for probability distributions.

Args:
    batch_shape (torch.Size): The shape over which parameters are batched.
    event_shape (torch.Size): The shape of a single sample (without batching).
    validate_args (bool, optional): Whether to validate arguments. Default: None.
FTc                ó$   <€ V ^8„  d   QhRS[ RR/# ©r   Úvaluer   N)r   )r   Ú__classdict__s   "€r   r   ÚDistribution.__annotate__%   s   ø€ ÷ ,ñ ,©ð ,°$ñ ,r   c                ó6   € V R9  d   \         hV \        n        R# )a]  
Sets whether validation is enabled or disabled.

The default behavior mimics Python's ``assert`` statement: validation
is on by default, but is disabled if Python is run in optimized mode
(via ``python -O``). Validation may be expensive, so you may want to
disable it once a model is working.

Args:
    value (bool): Whether to enable validation.
N)TF)Ú
ValueErrorr
   Ú_validate_args)r"   s   &r   Úset_default_validate_argsÚ&Distribution.set_default_validate_args$   s   € ð ˜Ô%ÜÐØ&+ŒÖ#r   Nc                óf   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[R,          RR/# )r   Úbatch_shapeÚevent_shapeÚvalidate_argsNr   )r   ÚSizer   )r   r#   s   "€r   r   r$   5   s?   ø€ ÷ )ñ )á—Z‘Zð)ñ —Z‘Zð)ñ ˜d•{ð	)ð
 
ñ)r   c                ó  <€ Wn         W n        Ve   W0n        V P                  '       Ed    V P                  pVP                  4        Fá  w  rV\        P                  ! V4      '       d   K#  WPP                  9  d,   \        \        \        V 4      V4      \        4      '       d   K^  \        W4      pVP!                  V4      p\#        VR4      '       d   KŽ  \%        RV R\        V4      P&                   R\)        VP*                  4       R	\-        V 4       R
\-        V4       RV 24      h	  \.        S	V `a  4        R #   \         d:    / p\
        P                  ! T P                   R2R,           R,           ^R7        ELHi ; i)Nz$ does not define `arg_constraints`. zAPlease set `arg_constraints = {}` or initialize the distribution z2with `validate_args=False` to turn off validation.©Ú
stacklevelz:Expected parameter to satisfy its distribution constraint.zExpected parameter z (ú
 of shape z) of distribution z to satisfy the constraint ú, but found invalid values:
)Ú_batch_shapeÚ_event_shaper'   Úarg_constraintsÚNotImplementedErrorÚwarningsÚwarnÚ	__class__Úitemsr   Úis_dependentÚ__dict__Ú
isinstanceÚgetattrÚtyper   Úcheckr   r&   Ú__name__ÚtupleÚshapeÚreprÚsuperÚ__init__)
Úselfr+   r,   r-   r6   ÚparamÚ
constraintr"   r   r:   s
   &&&&     €r   rG   ÚDistribution.__init__5   s‚  ø€ ð (ÔØ'ÔØÒ$Ø"/ÔØ××Ñð	Ø"&×"6Ñ"6�ð &5×%:Ñ%:Ö%<Ñ!�Ü×+Ò+¨J×7Ò7ÙØ§¡Ô-´*ÜœD ›J¨Ó.´÷3ò 3ñ Ü Ó,�Ø"×(Ñ(¨Ó/�Ü2ØØP÷ô ô %Ø-¨e¨Wð 5Ü  ›K×0Ñ0Ð1°¼EÀ%Ç+Á+Ó<NÐ;Oð P+Ü+/°«:¨,ð 75Ü59¸*Ó5EÐ4Fð G6Ø6;°Wð	>óð ñ &=ô( 	‰ÑÖøô9 'ô Ø"$�Ü—’Ø—~‘~Ð&Ð&JÐKØYõZàJõKð  !÷	ð ðús   ¬D= Ä=A FÆ Fc                ó    <€ V ^8„  d   QhRS[ /# )r   r+   r   )r   r#   s   "€r   r   r$   `   s   ø€ ÷ "ñ "¡%ñ "r   c                ó   € \         h)a¸  
Returns a new distribution instance (or populates an existing instance
provided by a derived class) with batch dimensions expanded to
`batch_shape`. This method calls :class:`~torch.Tensor.expand` on
the distribution's parameters. As such, this does not allocate new
memory for the expanded distribution instance. Additionally,
this does not repeat any args checking or parameter broadcasting in
`__init__.py`, when an instance is first created.

Args:
    batch_shape (torch.Size): the desired expanded size.
    _instance: new instance provided by subclasses that
        need to override `.expand`.

Returns:
    New distribution instance with batch dimensions expanded to
    `batch_shape`.
©r7   )rH   r+   Ú	_instances   &&&r   ÚexpandÚDistribution.expand`   s
   € ô& "Ð!r   c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   r   ©r   r.   )r   r#   s   "€r   r   r$   v   ó   ø€ ÷ !ñ !™UŸZ™Zñ !r   c                ó   € V P                   # )z6
Returns the shape over which parameters are batched.
)r4   ©rH   s   &r   r+   ÚDistribution.batch_shapeu   ó   € ð
 × Ñ Ð r   c                ó4   <€ V ^8„  d   QhRS[ P                  /# rS   rT   )r   r#   s   "€r   r   r$   }   rU   r   c                ó   € V P                   # )z:
Returns the shape of a single sample (without batching).
)r5   rW   s   &r   r,   ÚDistribution.event_shape|   rY   r   c                óJ   <€ V ^8„  d   QhRS[ S[S[P                  3,          /# rS   )Údictr   r   Ú
Constraint)r   r#   s   "€r   r   r$   „   s$   ø€ ÷ "ñ "¡¡c©;×+AÑ+AÐ&AÕ!Bñ "r   c                ó   € \         h)zâ
Returns a dictionary from argument names to
:class:`~torch.distributions.constraints.Constraint` objects that
should be satisfied by each argument of this distribution. Args that
are not tensors need not appear in this dict.
rN   rW   s   &r   r6   ÚDistribution.arg_constraintsƒ   ó
   € ô "Ð!r   c                óB   <€ V ^8„  d   QhRS[ P                  R,          /# )r   r   N)r   r_   )r   r#   s   "€r   r   r$   Ž   s   ø€ ÷ "ñ "™×/Ñ/°$Õ6ñ "r   c                ó   € \         h)zq
Returns a :class:`~torch.distributions.constraints.Constraint` object
representing this distribution's support.
rN   rW   s   &r   ÚsupportÚDistribution.support�   ó
   € ô "Ð!r   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$   –   s   ø€ ÷ "ñ "‘fñ "r   c                ó   € \         h)z'
Returns the mean of the distribution.
rN   rW   s   &r   ÚmeanÚDistribution.mean•   ó
   € ô
 "Ð!r   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$   �   s   ø€ ÷ Oñ O‘fñ Or   c                ó2   € \        V P                   R24      h)z'
Returns the mode of the distribution.
z does not implement mode)r7   r:   rW   s   &r   ÚmodeÚDistribution.modeœ   s   € ô
 " T§^¡^Ð$4Ð4LÐ"MÓNÐNr   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$   ¤   s   ø€ ÷ "ñ "™&ñ "r   c                ó   € \         h)z+
Returns the variance of the distribution.
rN   rW   s   &r   ÚvarianceÚDistribution.variance£   rl   r   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$   «   s   ø€ ÷ $ñ $™ñ $r   c                ó6   € V P                   P                  4       # )z5
Returns the standard deviation of the distribution.
)rs   ÚsqrtrW   s   &r   ÚstddevÚDistribution.stddevª   s   € ð
 �}‰}×!Ñ!Ó#Ð#r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r   Úsample_shaper   ©r	   r   )r   r#   s   "€r   r   r$   ±   s   ø€ ÷ .ñ .¡5ð .¹Fñ .r   c                óœ   € \         P                  ! 4       ;_uu_ 4        V P                  V4      uuRRR4       #   + '       g   i     R# ; i)z|
Generates a sample_shape shaped sample or sample_shape shaped batch of
samples if the distribution parameters are batched.
N)r   Úno_gradÚrsample©rH   r|   s   &&r   ÚsampleÚDistribution.sample±   s'   € ô
 �]Š]�_�_Ø—<‘< Ó-÷ �_�_‹_ús	   ž:ºA	c                ó&   <€ V ^8„  d   QhRS[ RS[/# r{   r}   )r   r#   s   "€r   r   r$   ¹   s   ø€ ÷ "ñ "¡Eð "¹Vñ "r   c                ó   € \         h)zœ
Generates a sample_shape shaped reparameterized sample or sample_shape
shaped batch of reparameterized samples if the distribution parameters
are batched.
rN   r�   s   &&r   r€   ÚDistribution.rsample¹   rg   r   z=`sample_n(n)` will be deprecated. Use `sample((n,))` instead.)Úcategoryc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Únr   )Úintr   )r   r#   s   "€r   r   r$   Å   s   ø€ ÷ -ñ -™#ð -¡&ñ -r   c                óN   € V P                  \        P                  ! V34      4      # )zY
Generates n samples or n batches of samples if the distribution
parameters are batched.
)r‚   r   r.   )rH   r‰   s   &&r   Úsample_nÚDistribution.sample_nÁ   s   € ð �{‰{œ5Ÿ:š: q dÓ+Ó,Ð,r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©r   r"   r   r   )r   r#   s   "€r   r   r$   Ì   s   ø€ ÷ "ñ "™fð "©ñ "r   c                ó   € \         h)zk
Returns the log of the probability density/mass function evaluated at
`value`.

Args:
    value (Tensor):
rN   ©rH   r"   s   &&r   Úlog_probÚDistribution.log_probÌ   rb   r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r�   r   )r   r#   s   "€r   r   r$   Ö   s   ø€ ÷ "ñ "™ð "¡Fñ "r   c                ó   € \         h)z_
Returns the cumulative density/mass function evaluated at
`value`.

Args:
    value (Tensor):
rN   r‘   s   &&r   ÚcdfÚDistribution.cdfÖ   rb   r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r�   r   )r   r#   s   "€r   r   r$   à   s   ø€ ÷ "ñ "™&ð "¡Vñ "r   c                ó   € \         h)zg
Returns the inverse cumulative density/mass function evaluated at
`value`.

Args:
    value (Tensor):
rN   r‘   s   &&r   ÚicdfÚDistribution.icdfà   rb   r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   rP   r   )r   r   )r   r#   s   "€r   r   r$   ê   s   ø€ ÷ "ñ "©ð "¹ñ "r   c                ó   € \         h)aò  
Returns tensor containing all values supported by a discrete
distribution. The result will enumerate over dimension 0, so the shape
of the result will be `(cardinality,) + batch_shape + event_shape`
(where `event_shape = ()` for univariate distributions).

Note that this enumerates over all batched tensors in lock-step
`[[0, 0], [1, 1], ...]`. With `expand=False`, enumeration happens
along dim 0, but with the remaining batch dimensions being
singleton dimensions, `[[0], [1], ..`.

To iterate over the full Cartesian product use
`itertools.product(m.enumerate_support())`.

Args:
    expand (bool): whether to expand the support over the
        batch dims to match the distribution's `batch_shape`.

Returns:
    Tensor iterating over dimension 0.
rN   )rH   rP   s   &&r   Úenumerate_supportÚDistribution.enumerate_supportê   s
   € ô, "Ð!r   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$     s   ø€ ÷ "ñ "™ñ "r   c                ó   € \         h)zg
Returns entropy of distribution, batched over batch_shape.

Returns:
    Tensor of shape batch_shape.
rN   rW   s   &r   ÚentropyÚDistribution.entropy  s
   € ô "Ð!r   c                ó    <€ V ^8„  d   QhRS[ /# rS   r   )r   r#   s   "€r   r   r$     s   ø€ ÷ )ñ )™Fñ )r   c                óJ   € \         P                  ! V P                  4       4      # )zj
Returns perplexity of distribution, batched over batch_shape.

Returns:
    Tensor of shape batch_shape.
)r   Úexpr¢   rW   s   &r   Ú
perplexityÚDistribution.perplexity  s   € ô �yŠy˜Ÿ™›Ó(Ð(r   c                ó:   <€ V ^8„  d   QhRS[ RS[P                  /# r{   )r	   r   r.   )r   r#   s   "€r   r   r$     s#   ø€ ÷ Pñ P©Eð PÁUÇZÁZñ Pr   c                óÜ   € \        V\        P                  4      '       g   \        P                  ! V4      p\        P                  ! WP                  ,           V P                  ,           4      # )a@  
Returns the size of the sample returned by the distribution, given
a `sample_shape`. Note, that the batch and event shapes of a distribution
instance are fixed at the time of construction. If this is empty, the
returned shape is upcast to (1,).

Args:
    sample_shape (torch.Size): the size of the sample to be drawn.
)r>   r   r.   r4   r5   r�   s   &&r   Ú_extended_shapeÚDistribution._extended_shape  sF   € ô ˜,¬¯
©
×3Ò3Ü Ÿ:š: lÓ3ˆLÜ�zŠz˜,×):Ñ):Õ:¸T×=NÑ=NÕNÓOÐOr   c                ó$   <€ V ^8„  d   QhRS[ RR/# r!   r   )r   r#   s   "€r   r   r$   "  s   ø€ ÷ 5ñ 5¡fð 5°ñ 5r   c                ó  € \        V\        P                  4      '       g   \        R4      h\	        VP                  4       4      \	        V P                  4      ,
          pVP                  4       VR V P                  8w  d+   \        RVP                  4        RV P                   R24      hVP                  4       pV P                  V P                  ,           p\        \        V4      \        V4      4       F/  w  rVV^8w  g   K  V^8w  g   K  WV8w  g   K  \        RV RV R24      h	   V P                  pTf   \        R4      hTP!                  T4      p\#        TR4      '       gS   \        R\%        T4      P&                   R\)        TP*                  4       R\-        T4       R\-        T 4       RT 2
4      hR#   \         d8    \        P                  ! T P                   R2R,           R	,           ^R
7        R# i ; i)aÂ  
Argument validation for distribution methods such as `log_prob`,
`cdf` and `icdf`. The rightmost dimensions of a value to be
scored via these methods must agree with the distribution's batch
and event shapes.

Args:
    value (Tensor): the tensor whose log probability is to be
        computed by the `log_prob` method.
Raises
    ValueError: when the rightmost dimensions of `value` do not match the
        distribution's batch and event shapes.
z/The value argument to log_prob must be a TensorNz5The right-most size of value must match event_shape: z vs Ú.z9Value is not broadcastable with batch_shape+event_shape: z% does not define `support` to enable z;sample validation. Please initialize the distribution with z-`validate_args=False` to turn off validation.r0   zsupport is unexpectedly NonezEExpected value argument to be within the support of its distribution.zExpected value argument (r2   z) to be within the support (z) of the distribution r3   )r>   r   r   r&   ÚlenÚsizer5   r4   ÚzipÚreversedre   r7   r8   r9   r:   ÚAssertionErrorrA   r   r@   rB   rC   rD   rE   )	rH   r"   Úevent_dim_startÚactual_shapeÚexpected_shapeÚiÚjre   r   s	   &&       r   Ú_validate_sampleÚDistribution._validate_sample"  sò  € ô ˜%¤§¡×.Ò.ÜÐNÓOÐOä˜eŸj™j›lÓ+¬c°$×2CÑ2CÓ.DÕDˆØ�:‰:‹<˜Ð(Ð)¨T×->Ñ->Ô>ÜØGÈÏ
É
ËÀ~ÐUYÐZ^×ZkÑZkÐYlÐlmÐnóð ð —z‘z“|ˆØ×*Ñ*¨T×->Ñ->Õ>ˆÜœ Ó.´¸Ó0HÖI‰DˆAØ�AŽv˜!˜qž& Q¦VÜ ØOÐP\È~Ð]aÐbpÐaqÐqrÐsóð ñ Jð
		Ø—l‘lˆGð Š?Ü Ð!?Ó@Ð@Ø—‘˜eÓ$ˆÜ*ØØS÷
ò 
ô ðÜ˜“K×(Ñ(Ð)¨´E¸%¿+¹+Ó4FÐ3Gð H-Ü-1°'«]¨Oð <'Ü'+¨D£z lð 3.Ø.3¨Wð	6óð ñ	
øô #ô 	Ü�MŠMØ—>‘>Ð"Ð"GÐHØOõPàAõBð õ	ò ð	ús   Ä*F< Æ<>G>Ç=G>c                óò   € VfU   \        V 4      P                  VP                  8w  d1   \        RV P                  P                   RVP                   R24      hVf   V P                  \        V 4      4      # T# )Nz	Subclass z of zR that defines a custom __init__ method must also define a custom .expand() method.)r@   rG   r7   r:   rB   Ú__new__)rH   ÚclsrO   s   &&&r   Ú_get_checked_instanceÚ"Distribution._get_checked_instanceY  sp   € ØÒ¤ d£×!4Ñ!4¸¿¹Ô!DÜ%Ø˜DŸN™N×3Ñ3Ð4°D¸¿¹¸ð G>ð >óð ð ,5Ò+<ˆt�|‰|œD ›JÓ'ÐKÀ)ÐKr   c                ó    <€ V ^8„  d   QhRS[ /# rS   )r   )r   r#   s   "€r   r   r$   a  s   ø€ ÷ Añ A™#ñ Ar   c           	     óÂ  € V P                    Uu. uF  qV P                  9   g   K  VNK  	  ppR P                  V Uu. uFb  pT RV P                  V,          P                  4       ^8X  d   V P                  V,          M V P                  V,          P	                  4        2NKd  	  up4      pV P
                  P                  R,           V,           R,           # u upi u upi )z, z: Ú(Ú))r6   r=   ÚjoinÚnumelr±   r:   rB   )rH   ÚkÚparam_namesÚpÚargs_strings   &    r   Ú__repr__ÚDistribution.__repr__a  sÃ   € Ø"&×"6Ò"6ÓMÑ"6˜Q¸t¿}¹}Ñ:L—q�qÑ"6ˆÐMØ—i‘iñ %óá$�Að �#�R¨D¯M©M¸!Õ,<×,BÑ,BÓ,DÈÔ,I˜Ÿ™ aÖ(ÈtÏ}É}Ð]^ÕO_×OdÑOdÓOfÐgÓhÙ$ñó
ˆð �~‰~×&Ñ&¨Õ,¨{Õ:¸SÕ@Ð@ùò Nùòs   �C¦C½A(C)r4   r5   r'   )Nr   ))rB   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úhas_rsampleÚhas_enumerate_supportr'   Ústaticmethodr(   r   r.   rG   rP   Úpropertyr+   r,   r6   re   rj   ro   rs   rx   r‚   r€   r   ÚFutureWarningrŒ   r’   r–   rš   rž   r¢   r§   r«   rº   r¿   rË   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r:   r#   s   @@r   r
   r
      s»  ù‡ € ñð €KØ!ÐØ€Nà÷,ó ð,ð$ #(§*¢*£,Ø"'§*¢*£,Ø%)÷	)õ )÷V"ò "ð* ÷!ó ð!ð ÷!ó ð!ð ÷"ó ð"ð ÷"ó ð"ð ÷"ó ð"ð ÷Oó ðOð ÷"ó ð"ð ÷$ó ð$ð ,1¯:ª:«<÷ .ò .ð -2¯JªJ«L÷ "ò "ñ ØGØô÷-ó	ð-÷"ð "÷"ð "÷"ð "÷"ò "÷0"ð "÷)ð )ð 5:·J²J³L÷ Pò P÷5ð 5ônL÷A÷ Að Ar   )r8   Útyping_extensionsr   r   r   Útorch.distributionsr   Útorch.distributions.utilsr   Útorch.typesr	   Ú__all__r   r
   © r   r   Ú<module>rß      s7   ðã Ý (ã Ý Ý +Ý 3Ý ð Ð
€õ+÷SAó SAr   