+
    œ°³j*  ã                   óD   € ^RI Ht ^RIHt ] ! R R]4      4       tR.tR# )é   )ÚProcessorMixin)Úauto_docstringc                   ót   a a€ ] tR t^t oRtR	V3R lV 3R lllt]V3R lR l4       tV3R lR ltRt	Vt
V ;t# )
ÚStep3p7ProcessoraA  Processor for Step-3.7-Flash.

Uses :class:`ProcessorMixin.__call__` for the standard image-token expansion
flow: the image processor splits each image into global + local patch crops,
then :meth:`replace_image_token` builds the per-image replacement string
that ``get_text_with_replacements`` substitutes into the text.
c                ó   <€ V ^8„  d   QhRR/# )é   ÚreturnN© )ÚformatÚ__classdict__s   "€Úo/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/step3p7/processing_step3p7.pyÚ__annotate__ÚStep3p7Processor.__annotate__#   s   ø€ ÷ vñ vÐY]ñ vó    c           	     óÚ  <€ R V n         Ve   VP                  V P                   4      MRV n        VP                  VP                  ,          pVP
                  R,          V,          ^,          V n        VP                  V,          ^,          V n        V P                   V P                  ,          V n	        V P                   V P                  ,          V n
        \        SV `0  ! RRVRVRV/VB  R# )z
<im_patch>NÚheightÚimage_processorÚ	tokenizerÚchat_templater
   )Úimage_tokenÚconvert_tokens_to_idsÚimage_token_idÚvision_patch_sizeÚdownsampler_strideÚsizeÚnum_image_feature_sizeÚ
patch_sizeÚnum_patch_feature_sizeÚimage_feature_placeholderÚpatch_feature_placeholderÚsuperÚ__init__)Úselfr   r   r   ÚkwargsÚstrideÚ	__class__s   &&&&, €r   r"   ÚStep3p7Processor.__init__#   sÌ   ø€ Ø'ˆÔØS\ÒSh˜i×=Ñ=¸d×>NÑ>NÔOÐnrˆÔØ ×2Ñ2°_×5WÑ5WÕWˆØ'6×';Ñ';¸HÕ'EÈÕ'OÐTUÕ&UˆÔ#Ø'6×'AÑ'AÀVÕ'KÐPQÕ&QˆÔ#Ø)-×)9Ñ)9¸D×<WÑ<WÕ)WˆÔ&Ø)-×)9Ñ)9¸D×<WÑ<WÕ)WˆÔ&Ü‰ÒÑu¨ÐuÀIÐuÐ]jÐuÐntÔur   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# )r   r	   )ÚlistÚstr)r   r   s   "€r   r   r   .   s   ø€ ÷ 'ñ '¡D©¥Iñ 'r   c                ó   € R .# )Úpatch_newline_masksr
   )r#   s   &r   Úunused_input_namesÚ#Step3p7Processor.unused_input_names-   s   € à%Ð&Ð&r   c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# )r   Úimage_inputsÚ	image_idxr	   )ÚdictÚintr*   )r   r   s   "€r   r   r   1   s#   ø€ ÷ ñ ±ð Áð ÑSVñ r   c                ó.  € VR,          V,          pVP                  R4      pVe	   WR,          MRpRp\        V4       F=  pVRV P                   R2,          pV'       g   K$  Wh,          '       g   K4  VR,          pK?  	  VRV P                   R	2,          pV# )
zOReturn the expanded token string for image *image_idx* (patches + global view).Únum_local_patchesr,   NÚ z<patch_start>z<patch_end>z<patch_newline>z
<im_start>z<im_end>)ÚgetÚranger    r   )	r#   r0   r1   r$   Únum_patchesr,   Úpatch_newline_maskÚreplÚis	   &&&,     r   Úreplace_image_tokenÚ$Step3p7Processor.replace_image_token1   sŸ   € à"Ð#6Õ7¸	ÕBˆØ*×.Ñ.Ð/DÓEÐØ?RÒ?^Ð0Ö;ÐdhÐØˆÜ�{Ö#ˆAØ�m D×$BÑ$BÐ#CÀ;ÐOÕOˆDß!Ñ!Ð&8×&;Ö&;ØÐ)Õ)’ñ $ð 	�*˜T×;Ñ;Ð<¸HÐEÕEˆØˆr   )r   r   r   r   r   r    )NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r"   Úpropertyr-   r=   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r&   r   s   @@r   r   r      s9   ù‡ € ñ÷võ vð ÷'ó ð'÷÷ ð r   r   N)Úprocessing_utilsr   Úutilsr   r   Ú__all__r
   r   r   Ú<module>rK      s3   ðõ* /Ý #ð ô"�~ó "ó ð"ðJ Ð
‚r   