+
    œ°³j4$  ã                   ó  € ^ RI t^ RIt^ RIHu Ht ^RIHt ^RI	H
t
Ht ^RIHtHtHt ^RIHtHtHt ^RIHtHt ^RIHt ]P2                  ! ]4      t ! R R	]R
R7      t]]! RR7       ! R R]4      4       4       tR.tR# )é    N)ÚBatchFeature)Ú
ImageInputÚmake_nested_list_of_images)ÚProcessingKwargsÚProcessorMixinÚUnpack)Ú
AddedTokenÚPreTokenizedInputÚ	TextInput)Úauto_docstringÚlogging)Úrequiresc                   ó2   € ] tR t^$tRRRR^0RR/RRR//tR	tR
# )ÚPI0ProcessorKwargsÚtext_kwargsÚpaddingÚ
max_lengthÚpadding_sideÚrightÚcommon_kwargsÚreturn_tensorsÚpt© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú	_defaultsÚ__static_attributes__r   ó    Úg/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/pi0/processing_pi0.pyr   r   $   s-   † àØ�|Ø˜"Ø˜Gð
ð
 	Ð*¨DÐ1ð„Ir    r   F)Útotal)Úbackendsc                   ól   a a€ ] tR t^/t oRV 3R llt]RV3R lR ll4       t]V 3R l4       tRt	Vt
V ;t# )ÚPI0Processorc           	     ó¨  <€ VP                   R ,          VP                   R,          uV n        V n        VP                  R. RO4      pVP                  R. RO4      pVP                  R. RO4      pVP                  R. RO4      p\        P
                  ! V4      V n        \        P
                  ! V4      V n        \        P
                  ! V4      V n        \        P
                  ! V4      V n	        VP                  R^ 4      V n
        VP                  R^24      V n        \        VR4      '       g   \        R	4      hVP                  V n        \        VR
4      '       gW   R
V n        \!        V P                  RRR7      p	RV	./p
VP#                  V
4       VP%                  V P                  4      V n        M"VP&                  V n        VP                  V n        TP)                  \+        R4       Uu. uF
  pRVR R2NK  	  up\+        ^€4       Uu. uF
  pRVR R2NK  	  up,           4       RVn        RVn        \0        SV `e  WVR7       R# u upi u upi )ÚheightÚwidthÚ
state_meanÚ	state_stdÚactions_meanÚactions_stdÚmax_state_dimÚ
chunk_sizeÚimage_seq_lengthz;Image processor is missing an `image_seq_length` attribute.z<image>FT)Ú
normalizedÚspecialÚadditional_special_tokensi   z<locz0>4Ú>z<segz0>3)Úchat_templateN)gù g³ês¥¿grŠŽäò¢?g•Ô	h"lê?g‡§WÊ2D@g\ AñcÌá¿gZd;ßOÅ¿gB>èÙ¬úœ?g“©‚QI�¿)gt$—ÿ�~»?gL¦
F%uÂ?g.ÿ!ýöuÐ?g/n£¼Ö?gëâ6Àó?g¶óýÔxéÖ?gÌ]KÈ=‹?gF%uš‹?)gÂ&S£’?gâX·Ñ ®?gW[±¿ìž¬¿gHPüs×r?gàœ¥½Ág?gÒ Þ	Š¿gHPüs·¿)g®GázÒ?g`åÐ"ÛùÖ?gÁ9#J{ƒ×?gvOjM£?g>yX¨5Í«?g46<½R¶?gèj+ö—Ýï?)Úsizer'   r(   ÚgetÚtorchÚtensorr)   r*   r+   r,   r-   r.   ÚhasattrÚ
ValueErrorr/   Úimage_tokenr	   Úadd_special_tokensÚconvert_tokens_to_idsÚimage_token_idÚ
add_tokensÚrangeÚadd_bos_tokenÚadd_eos_tokenÚsuperÚ__init__)ÚselfÚimage_processorÚ	tokenizerr4   Úkwargsr)   r*   r+   r,   r;   Útokens_to_addÚiÚ	__class__s   &&&&,       €r!   rD   ÚPI0Processor.__init__2   sø  ø€ Ø"1×"6Ñ"6°xÕ"@À/×BVÑBVÐW^ÕB_ÐˆŒ�T”ZØ—Z‘Z Ò.rÓsˆ
Ø—J‘J˜{Ò,lÓmˆ	Ø—z‘z .Ò2mÓnˆØ—j‘j Ò0hÓiˆäŸ,š, zÓ2ˆŒÜŸš iÓ0ˆŒÜ!ŸLšL¨Ó6ˆÔÜ Ÿ<š<¨Ó4ˆÔØ#ŸZ™Z¨¸Ó<ˆÔØ Ÿ*™* \°2Ó6ˆŒÜ�Ð(:×;Ò;ÜÐZÓ[Ð[à /× @Ñ @ˆÔä�y )×,Ò,ð  )ˆDÔÜ$ T×%5Ñ%5À%ÐQUÔVˆKØ8¸;¸-ÐHˆMØ×(Ñ(¨Ô7Ø"+×"AÑ"AÀ$×BRÑBRÓ"SˆDÕà"+×":Ñ":ˆDÔØ(×4Ñ4ˆDÔà×Ñ´u¸T´{ÓC±{°!  Q s G¨1›o±{ÑCÔ`eÐfiÔ`jÓFkÑ`jÐ[\ÈÈaÐPSÈWÐTUÃÑ`jÑFkÕkÔlØ"'ˆ	ÔØ"'ˆ	Ôä‰Ñ˜À=ÐÖQùò	 DùÒFks   Ç-I
ÈI
c                ó¶  <€ V ^8„  d   QhRS[ S[S[ ,          ,          S[S[S[ ,          ,          ,          R,          RS[S[,          S[S[,          ,          S[S[,          ,          R,          RS[S[P
                  ,          S[P                  ,          R,          RS[S[P
                  ,          S[P                  ,          R,          RS[S[	,          RS[
/# )é   ÚimagesNÚtextÚactionsÚstaterH   Úreturn)r   Úlistr   r
   ÚnpÚndarrayr7   ÚTensorr   r   r   )ÚformatÚ__classdict__s   "€r!   Ú__annotate__ÚPI0Processor.__annotate__W   sÉ   ø€ ÷ WKñ WKá™T¡*Õ-Õ-±±T¹*Õ5EÕ0FÕFÈÕMðWKñ Ñ+Õ+©d±9­oÕ=ÁÑEVÕ@WÕWÐZ^Õ^ðWKñ ™Ÿ
™
Õ"¡U§\¡\Õ1°DÕ8ð	WKñ
 ‘b—j‘jÕ ¡5§<¡<Õ/°$Õ6ðWKñ Ñ+Õ,ðWKñ 
ñWKr    c                ó¨  € V P                   ! \        3RV P                  P                  /VB pVf   \        P                  R4       Rp\        V\        4      '       d   V.p\        V4      p\        V4      \        V4      8w  d%   \        R\        V4       R\        V4       R24      hVR,          P                  R	R4      pVR
,          P                  R	R4       . p	\        W'4       F^  w  r«V P                  V P                  ,          \        V4      ,           V P                  P                   V
 R2p
V	P!                  V
4       K`  	  V P                  ! V	3/ VR,          B p\#        R V 4       4      p\$        P&                  ! \        V4      V3\$        P(                  R7      p\$        P&                  ! \        V4      V^V P*                  V P,                  4      p\/        V4       FF  w  ppV P0                  ! V3R	R/VR
,          B p\        V4      pRVVRV13&   VR,          VVRV13&   KH  	  / VCRVRV/CpVeÇ   \$        P2                  ! V4      V P4                  ,
          V P6                  R,           ,          pVP8                  R,          V P:                  8  d<   \<        P>                  ! V^ V P:                  VP8                  R,          ,
          34      pVPA                  RV PB                  V P:                  4      VR&   Ve¼   \$        P2                  ! V4      V PD                  ,
          V PF                  R,           ,          pVP8                  R,          V P:                  8  d<   \<        P>                  ! V^ V P:                  VP8                  R,          ,
          34      pVPA                  RV P:                  4      VR&   \I        VVR7      # )aÃ  
actions (`list | np.ndarray | torch.Tensor`, *optional*):
    Actions to be predicted by the model. If provided, padding, mean and std normalization will be applied.
state (`list | np.ndarray | torch.Tensor`, *optional*):
    Robotic states to be predicted by the model. If provided, padding, mean and std normalization will be applied.

Returns:
    [`BatchFeature`]: A [`BatchFeature`] with the following fields:

    - **input_ids** -- List of token ids to be fed to a model. Returned when `text` is not `None`. If `suffix`
      is provided, the `input_ids` will also contain the suffix input ids.
    - **attention_mask** -- List of indices specifying which tokens should be attended to by the model (when
      `return_attention_mask=True` or if *"attention_mask"* is in `self.model_input_names` and if `text` is not
      `None`).
    - **pixel_values** -- Pixel values to be fed to a model. Returned when `images` is not `None`.
    - **pixel_attention_mask** -- Pixel values padding mask to be fed to a model. Returned when `images` is not `None`.
    - **state** -- Robot state compatible with model if `state` is not None
    - **actions** -- Label-actions compatible with training if `actions` is not None
Útokenizer_init_kwargsNzPYou are using PI0 without a text prefix. The processor will use an empty prompt.Ú z	Received z image samples for z\ prompts. Each prompt should be associated with one sample (with one or more camera images).r   r   Úimages_kwargsÚ
c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5i)N)Úlen)Ú.0Úsample_imagess   & r!   Ú	<genexpr>Ú(PI0Processor.__call__.<locals>.<genexpr>‘   s   é € ÐUÁn°]œc -×0Ð0Ãnùs   ‚)Údtyper   TÚpixel_valuesÚpixel_attention_maskg:Œ0âŽyE>rQ   rR   )ÚdataÚtensor_typeéÿÿÿÿ)%Ú_merge_kwargsr   rG   Úinit_kwargsÚloggerÚwarning_onceÚ
isinstanceÚstrr   rb   r:   ÚpopÚzipr;   r/   Ú	bos_tokenÚappendÚmaxr7   ÚzerosÚboolr'   r(   Ú	enumeraterF   r8   r+   r,   Úshaper-   ÚFÚpadÚviewr.   r)   r*   r   )rE   rO   rP   rQ   rR   rH   Úoutput_kwargsÚbatched_imagesr   Úprompt_stringsÚsampleÚ
image_listÚtext_inputsÚmax_num_camerasri   Úpadded_pixel_valuesÚbatchrd   Ú	processedÚnum_camerasÚmodel_inputss   &&&&&,               r!   Ú__call__ÚPI0Processor.__call__V   so  € ð8 ×*Ò*Üñ
Ø6:·n±n×6PÑ6Pð
ØTZñ
ˆð Š<Ü×ÑÐ rÔsØˆDä�dœC× Ò Ø�6ˆDä3°FÓ;ˆÜˆ~Ó¤# d£)Ô+ÜØœC Ó/Ð0Ð0CÄCÈÃIÀ;ð Oeð eóð ð
 ' }Õ5×9Ñ9Ð:JÈDÓQˆØ�oÕ&×*Ñ*Ð+;¸TÔBàˆÜ"% dÖ";ÑˆFà×#Ñ# d×&;Ñ&;Õ;¼cÀ*»oÕMÐNÈtÏ~É~×OgÑOgÐNhÐioÐhpÐprÐsð ð ×!Ñ! &Ö)ñ	 #<ð —n’n ^ÑT°}À]Õ7SÑTˆô ÑUÁnÓUÓUˆÜ$Ÿ{š{¬C°Ó,?ÀÐ+QÔY^×YcÑYcÔdÐÜ#Ÿkšk¬#¨nÓ*=¸ÐPQÐSW×S^ÑS^Ð`d×`jÑ`jÓkÐä$-¨nÖ$=Ñ ˆE�=Ø×,Ò,¨]ÑrÈ4ÐrÐS`ÐapÕSqÑrˆIä˜mÓ,ˆKØ8<Ð  ¨¨¨Ð!4Ñ5Ø7@ÀÕ7PÐ  |¨ |Ð 3Ó4ñ %>ð
Øð
àÐ/Ø"Ð$8ñ
ˆð ÒÜ—|’| GÓ,¨t×/@Ñ/@Õ@ÀT×EUÑEUÐX]ÕE]Õ^ˆGØ�}‰}˜RÕ  4×#5Ñ#5Ô5ÜŸ%š% ¨!¨T×-?Ñ-?À'Ç-Á-ÐPRÕBSÕ-SÐ)TÓU�Ø&-§l¡l°2°t·±È×HZÑHZÓ&[ˆL˜Ñ#àÒÜ—\’\ %Ó(¨4¯?©?Õ:¸t¿~¹~ÐPUÕ?UÕVˆEØ�{‰{˜2� ×!3Ñ!3Ô3ÜŸš˜e a¨×);Ñ);¸e¿k¹kÈ"½oÕ)MÐ%NÓO�Ø$)§J¡J¨r°4×3EÑ3EÓ$FˆL˜Ñ!ä ¸>ÔJÐJr    c                ó(   <€ \         SV `  R .,           # )ri   )rC   Úmodel_input_names)rE   rK   s   &€r!   rŽ   ÚPI0Processor.model_input_names°   s   ø€ ä‰wÑ(Ð,BÐ+CÕCÐCr    )r+   r,   r.   r'   r/   r;   r>   r-   r)   r*   r(   )NNN)r   r   r   r   rD   r   r‹   ÚpropertyrŽ   r   Ú__classdictcell__Ú__classcell__)rK   rY   s   @@r!   r%   r%   /   sH   ù‡ € ÷"RðH ÷WKñ WKó ðWKðr ôDó ÷Dð Dr    r%   )Úvisionr7   )ÚnumpyrU   r7   Útorch.nn.functionalÚnnÚ
functionalr|   Úfeature_extraction_utilsr   Úimage_utilsr   r   Úprocessing_utilsr   r   r   Útokenization_utils_baser	   r
   r   Úutilsr   r   Úutils.import_utilsr   Ú
get_loggerr   ro   r   r%   Ú__all__r   r    r!   Ú<module>r       s†   ðó* Û ß Ð å 4ß Aß HÑ Hß OÑ Oß ,Ý *ð 
×	Ò	˜HÓ	%€ôÐ)°õ ð Ù	Ð&Ô'ôAD�>ó ADó (ó ðADðH Ð
‚r    