Ë
    T^(h;]  ã                   óN  — d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZmZmZmZmZ ddlmZmZ dd	lmZmZ dd
lmZ  e«       rddlZ e«       rddlZdZ G d„ ded¬«      Z  G d„ ded¬«      Z! G d„ ded¬«      Z"dd„Z#d„ Z$d„ Z%d„ Z&d„ Z' G d„ de«      Z(dgZ)y)z
Processor class for IDEFICS.
é    )ÚCallableÚDictÚListÚOptionalÚUnion)Úurlparseé   )ÚBatchFeature)Ú
ImageInput)ÚImagesKwargsÚProcessingKwargsÚProcessorMixinÚ
TextKwargsÚUnpackÚ!_validate_images_text_input_order)ÚPreTokenizedInputÚ	TextInput)Úis_tf_availableÚis_torch_available)Údeprecate_kwargNú<image>c                   óx   — e Zd ZU ee   ed<   eeeef      ed<   ee	e
ee
   f      ed<   ee	e
ee
   f      ed<   y)ÚIdeficsImagesKwargsÚ	transformÚ
image_sizeÚ
image_meanÚ	image_stdN)Ú__name__Ú
__module__Ú__qualname__r   r   Ú__annotations__r   ÚstrÚintr   Úfloatr   © ó    úl/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/idefics/processing_idefics.pyr   r   .   sR   … Ø˜Ñ!Ó!Ø˜˜c 3˜h™Ñ(Ó(Ø˜˜u d¨5¡kÐ1Ñ2Ñ3Ó3Ø˜˜e T¨%¡[Ð0Ñ1Ñ2Ô2r&   r   F)Útotalc                   ó.   — e Zd ZU ee   ed<   ee   ed<   y)ÚIdeficsTextKwargsÚadd_eos_tokenÚadd_end_of_utterance_tokenN)r   r   r    r   Úboolr!   r%   r&   r'   r*   r*   5   s   … Ø˜D‘>Ó!Ø (¨¡Ô.r&   r*   c                   ó:   — e Zd ZU eed<   eed<   ddddœi ddidœZy	)
ÚIdeficsProcessorKwargsÚtext_kwargsÚimages_kwargsFÚlongest)Úadd_special_tokensÚpaddingr+   Úreturn_tensorsÚpt)r0   r1   Úcommon_kwargsN)r   r   r    r*   r!   r   Ú	_defaultsr%   r&   r'   r/   r/   :   s2   … Ø"Ó"Ø&Ó&ð #(Ø Ø"ñ
ð
 Ø*¨DÐ1ñ�Ir&   r/   c                 ó  — |dk7  r-|dk(  r	d| | |k\  <   n|dk(  rt        j                  | |k\  d| «      } |dk(  r@| dk(  }d| |<   t        j                  j                  j                  | |¬«      }d||d d …f<   |S |dk(  r„t        j                  | d«      }t        j                  |d| «      } t        j
                  | |¬«      }t        j                  |d«      }t        j                  |t        j                  |«      |«      }S )Néÿÿÿÿr6   Útfr   ©Únum_classes)Údepth)	r;   ÚwhereÚtorchÚnnÚ
functionalÚone_hotÚequalÚexpand_dimsÚ
zeros_like)Úincremental_maskr5   r=   Ú	negativesÚ	attn_maskÚnegatives_expandeds         r'   Ú$incremental_to_binary_attention_maskrK   I   s  € à�bÒØ˜TÒ!Ø@BÐÐ-°Ñ<Ò=Ø˜tÒ#Ü!Ÿx™xÐ(8¸KÑ(GÈÐM]Ó^Ðð ˜ÒØ$¨Ñ*ˆ	Ø&'Ð˜Ñ#Ü—H‘H×'Ñ'×/Ñ/Ð0@ÈkÐ/ÓZˆ	Ø"#ˆ	�)šQ�,Ñð Ðð 
˜4Ò	Ü—H‘HÐ-¨rÓ2ˆ	ÜŸ8™8 I¨qÐ2BÓCÐÜ—J‘JÐ/°{ÔCˆ	äŸ^™^¨I°rÓ:ÐÜ—H‘HÐ/´·±¸yÓ1IÈ9ÓUˆ	àÐr&   c                 óH   — |dk(  rt        | |«      S |dk(  rt        | |«      S y )Nr6   r;   )Ú,image_attention_mask_for_packed_input_ids_ptÚ,image_attention_mask_for_packed_input_ids_tf)Ú	input_idsÚ	tokenizerr5   s      r'   Ú)image_attention_mask_for_packed_input_idsrQ   c   s1   € Ø˜ÒÜ;¸IÀyÓQÐQØ	˜4Ò	Ü;¸IÀyÓQÐQð 
 r&   c                 óÊ  — t        j                  | d¬«      }t        j                  | d¬«      }|j                  t        «      }|j                  }t        | j                  d«      «      D ]K  }d}d}t        | |   «      D ]4  \  }	}
|
|k(  r|dz  }|||   |	<   d}n|||   |	<   |rd||   |	<   |
|k(  sŒ3d}Œ6 ŒM t        | j                  d«      «      D ]Œ  }d}d}t        | |   j                  d«      dz
  dd«      D ]9  }	| |   |	   }
|
|k(  r|dz  }|||   |	<   d}n|||   |	<   |
|k(  rd}|sŒ2d||   |	<   Œ; ||   dk7  }||   |xx   |z  cc<   ||   |xx   dz  cc<   ŒŽ ||fS )Nr:   )Ú
fill_valuer   Fé   T)r@   Ú	full_likeÚconvert_tokens_to_idsÚIMAGE_TOKENÚeos_token_idÚrangeÚsizeÚ	enumerate)rO   rP   Úimage_attention_maskÚnext_image_attention_maskÚimage_token_idÚeod_token_idÚ	batch_idxÚcountÚseen_eodÚidxÚtoken_idÚnon_negative_indicess               r'   rM   rM   j   sâ  € Ü Ÿ?™?¨9ÀÔDÐÜ %§¡°	ÀbÔ IÐØ×4Ñ4´[ÓA€NØ×)Ñ)€LÜ˜9Ÿ>™>¨!Ó,Ó-ò  ˆ	ØˆØˆÜ& y°Ñ';Ó<ò 	 ‰MˆC�Ø˜>Ò)Ø˜‘
�Ø7<Ð$ YÑ/°Ñ4Ø ‘à7<Ð$ YÑ/°Ñ4áØ79Ð$ YÑ/°Ñ4à˜<Ó'Ø‘ñ	 ð ô" ˜9Ÿ>™>¨!Ó,Ó-ò Iˆ	ØˆØˆÜ˜ 9Ñ-×2Ñ2°1Ó5¸Ñ9¸2¸rÓBò 	?ˆCØ  Ñ+¨CÑ0ˆHØ˜>Ò)Ø˜‘
�Ø<AÐ)¨)Ñ4°SÑ9Ø ‘à<AÐ)¨)Ñ4°SÑ9à˜<Ò'Ø�âØ<>Ð)¨)Ñ4°SÒ9ð	?ð  9¸ÑCÀrÑIÐØ! )Ñ,Ð-AÓBÀeÑKÓBØ! )Ñ,Ð-AÓBÀbÑHÔBð)Ið,  Ð!:Ð:Ð:r&   c                 óò  — |j                  t        «      }|j                  }t        j                  | «      d   }t        j
                  t        j                  | «      d«      }t        j
                  t        j                  | «      d«      }t        |«      D ]Û  }d}d}	t        j                  | «      d   }
t        |
dz
  dd«      D ]ª  }| ||f   j                  «       }||k(  r<|dz  }||gg}|g}t        j                  |||«      }t        j                  |||«      }n*||k(  r%|	s#d}	d}||gg}|g}t        j                  |||«      }|	sŒ†||k7  sŒŒ||gg}dg}t        j                  |||«      }Œ¬ ŒÝ ||fS )Nr   r:   FrT   T)	rV   rW   rX   r;   ÚshapeÚfillrY   ÚnumpyÚtensor_scatter_nd_update)rO   rP   r^   r_   Ú
batch_sizer\   r]   r`   ra   rb   Ú
seq_lengthrc   rd   ÚindicesÚupdatess                  r'   rN   rN   ™   s¥  € Ø×4Ñ4´[ÓA€NØ×)Ñ)€LÜ—‘˜)Ó$ QÑ'€JÜŸ7™7¤2§8¡8¨IÓ#6¸Ó;ÐÜ "§¡¬¯©°Ó(;¸RÓ @Ðä˜:Ó&ò uˆ	ØˆØˆÜ—X‘X˜iÓ(¨Ñ+ˆ
ä˜ a™¨¨RÓ0ò 	uˆCØ  ¨C Ñ0×6Ñ6Ó8ˆHØ˜>Ò)Ø˜‘
�Ø% sÐ+Ð,�Ø ˜'�Ü')×'BÑ'BÐCWÐY`ÐbiÓ'jÐ$Ü,.×,GÑ,GÐHaÐcjÐlsÓ,tÑ)Ø˜\Ò)±(Ø�Ø�Ø% sÐ+Ð,�Ø ˜'�Ü,.×,GÑ,GÐHaÐcjÐlsÓ,tÐ)Ú˜H¨Ó4Ø% sÐ+Ð,�Ø˜$�Ü,.×,GÑ,GÐHaÐcjÐlsÓ,tÑ)ñ#	uðuð.  Ð!:Ð:Ð:r&   c                 ód   — d| v ryt        | «      }t        |j                  |j                  g«      S )z…Checks if the passed string contains a valid url and nothing else. e.g. if space is included it's immediately
    invalidated the urlú F)r   ÚallÚschemeÚnetloc)ÚstringÚresults     r'   Úis_urlrv   º   s0   € ð ˆf�}ØÜ�fÓ€FÜ�—‘˜vŸ}™}Ð-Ó.Ð.r&   c                   óü   ‡ — e Zd ZdZddgZddgZdZdZdˆ fd„	Z e	d	d
dd¬«      	 	 	 	 dde
eee   eee   eee      f   de
eeee   ee   eee      eee      f   dee   defd„«       Zd„ Zd„ Zed„ «       Zˆ xZS )ÚIdeficsProcessorah  
    Constructs a IDEFICS processor which wraps a LLama tokenizer and IDEFICS image processor into a single processor.

    [`IdeficsProcessor`] offers all the functionalities of [`IdeficsImageProcessor`] and [`LlamaTokenizerFast`]. See
    the docstring of [`~IdeficsProcessor.__call__`] and [`~IdeficsProcessor.decode`] for more information.

    Args:
        image_processor (`IdeficsImageProcessor`):
            An instance of [`IdeficsImageProcessor`]. The image processor is a required input.
        tokenizer (`LlamaTokenizerFast`):
            An instance of [`LlamaTokenizerFast`]. The tokenizer is a required input.
        image_size (`int`, *optional*, defaults to 224):
            Image size (assuming a square image)
        add_end_of_utterance_token (`str`, *optional*):
            The string representation of token representing end of utterance
    Úimage_processorrP   r   r,   ÚIdeficsImageProcessorÚLlamaTokenizerFastc                 óÚ  •— |€t        d«      ‚|€t        d«      ‚t        ‰| �	  ||«       | j                  | _        t        |d«      r|j                  n|j                  t        «      | _        | j                  j                  | j                  j                  | j                  j                  f| _        d| j                  j                  j                  dg «      v rd| _        y d| _        y )Nz)You need to specify an `image_processor`.z"You need to specify a `tokenizer`.Úimage_tokenú<end_of_utterance>Úadditional_special_tokensTF)Ú
ValueErrorÚsuperÚ__init__ry   Úcurrent_processorÚhasattrr^   rV   rW   Úimage_num_channelsr   Údefault_image_dimsrP   Úspecial_tokens_mapÚgetÚ1tokenizer_was_trained_with_end_of_utterance_token)Úselfry   rP   r   r,   ÚkwargsÚ	__class__s         €r'   r‚   zIdeficsProcessor.__init__Ú   sç   ø€ ØÐ"ÜÐHÓIÐIØÐÜÐAÓBÐBä‰Ñ˜¨)Ô4Ø!%×!5Ñ!5ˆÔô �y -Ô0ð ×$Ò$à×0Ñ0´Ó=ð 	Ôð × Ñ ×3Ñ3Ø× Ñ ×+Ñ+Ø× Ñ ×+Ñ+ð#
ˆÔð $ t§~¡~×'HÑ'H×'LÑ'LÐMhÐjlÓ'mÑmð ð 	Õ>ð ð 	Õ>r&   Úpromptsz5.0.0ÚtextT)Úold_nameÚversionÚnew_nameÚraise_if_both_namesÚimagesr‹   Úreturnc                 óL  ‡.‡/— |€|€t        d«      ‚t        ||«      \  }}|€|}nÁ|�¿t        |t        t        f«      s|g}t        |t
        «      r|g}t        |t        t        f«      r"t        |«      t        |«      k7  rt        d«      ‚t        d„ |D «       «      st        d«      ‚t        |d   t        t        f«      r|D �cg c]  }|g‘Œ }}t        t        ||«      «      } | j                  t        fd| j                  j                  i|¤Ž}|d   j                  d	d
«      }	|d   j                  dd«      }
|
€| j                  }
t        d„ D «       «      s|g}dŠ.dŠ/d}ˆ.ˆ/fd„}g }g }|D �]&  }| j                  j                   › }g }d
}d
}t#        |«      D ]¥  \  }}|dkD  r|sdnd
}t        |t
        «      rg|j%                  d«      }t'        |«      r:| j(                  j+                  |«      }| ||«      z  }|j-                  |«       d}Œw|
r|r||z  }||z  }d
}Œˆ| ||«      z  }|j-                  |«       d}Œ§ |	r|| j                  j.                  z  } | j(                  |fi |d   ¤Ž}|j-                  |«       |j-                  |«       �Œ) |d   j                  dd«      } | j                  |fi |d   ¤Ž}|d   }|d   }t1        d„ |D «       «      }t1        d|«      }t3        d„ |D «       «      dkD  }g }g }g }t        |||«      D �]2  \  }} }!|}"|"j5                  | j6                  «      }#t9        |#|«      }$|!d|$ }%t        |%«      dkD  rõ|dk(  r=t;        j<                  |g|%j?                  «       dd ¢­Ž }&|%|&d|%j?                  d«       �n|dk(  rütA        jB                  |%«      dd }'tA        jD                  |g|'gd¬«      }(tA        j<                  |(|%jF                  ¬«      }&tA        jB                  |%«      d   })tA        jH                  tA        jJ                  |)«      d«      }*|%}+tA        jL                  |&|*|+«      }&nN|dk(  r!t;        j<                  |g| jN                  ¢­Ž }&n(|dk(  r#tA        j<                  |g| jN                  ¢­«      }&|j-                  &«       |dk(  rJ|j-                  t;        jP                  |"«      «       |j-                  t;        jP                  | «      «       �Œç|dk(  s�Œî|j-                  tA        jR                  |"t@        jT                  ¬«      «       |j-                  | «       �Œ5 |dk(  r@t;        jV                  |«      }t;        jV                  |«      }t;        jV                  |«      }nD|dk(  r?tA        jV                  |«      }tA        jV                  |«      }tA        jV                  |«      }|r)tY        || j                  |«      \  },}-t[        |,||¬«      },nŽ|dk(  rBt;        j<                  |jB                  d   |jB                  d   dt:        j\                  ¬«      },nG|dk(  rBtA        j<                  |jB                  d   |jB                  d   dft@        j\                  ¬«      },t_        |||,d œ¬!«      S c c}w )"a§  This method takes batched or non-batched prompts made of text and images and converts them into prompts that
        the model was trained on and prepares the image pixel values for the model to process.

        Args:
            images (`Union[ImageInput, List[ImageInput], str, List[str], List[List[str]]]`):
                either a single image or a batched list of images - can be passed in when text contains only text prompts,
                in order to use the image-text-to-text behavior.
            text (`Union[List[TextInput], [List[List[TextInput]]]]`):
                either a single prompt or a batched list of prompts - see the detailed description immediately after
                the end of the arguments doc section.
            return_tensors (`str` or `TensorType`, *optional*, defaults to `TensorType.PYTORCH`):
                The type of tensors to return. Can be one of:
                    - `TensorType.PYTORCH` or `'pt'`: Return a batch of type `torch.Tensor`.

        Returns:
            a dict with entries: `input_ids`, `attention_mask`, `pixel_values`, `image_attention_mask` which can be
            directly passed to `model.generate`

        Detailed explanation:

        Each entry in `text` is either a text to be passed as is or an image that will be processed.

        An image can be either an image object (`PIL.Image`) or a url from which the image can be retrieved.

        When the processor encounters an image it'll inject `<fake_token_around_image><image><fake_token_around_image>`
        entry into the prompt.

        Example:

        ```python
        checkpoint = "HuggingFaceM4/idefics-9b"
        processor = AutoProcessor.from_pretrained(checkpoint)
        url = "https://hips.hearstapps.com/hmg-prod/images/cute-photos-of-cats-in-grass-1593184777.jpg"
        img = processor.image_processor.fetch_images([url])[0]

        prompts = [
            "User:",
            img,
            "Describe this image.
Assistant: An image of two kittens in grass.
",
            "User:",
            "https://hips.hearstapps.com/hmg-prod/images/dog-puns-1581708208.jpg",
            "Describe this image.
Assistant:",
        ]

        inputs = processor(text=prompts, return_tensors="pt")
        generated_ids = model.generate(**inputs, max_length=100)
        generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
        ```

        In this example the `prompts` will be converted into:

        ```
        <s>User:<fake_token_around_image><image><fake_token_around_image>Describe this image.
        Assistant: An image of two kittens in grass.
        User:<fake_token_around_image><image><fake_token_around_image>Describe this image.
        Assistant:'
        ```

        and the two images will be massaged using [`IdeficsImageProcessor.__call__`] method and placed inside the
        `pixel_values` dict entry of the return value.

        This example also examplifies that images can be passed as objects or as text urls. It can be seen that the
        first image is passed as object and the second one as a url.

        To do training do:

        ```python
        image_transform = transforms.Compose(
            [
                transforms.RandomResizedCrop(
                    (w, h), scale=(0.9, 1.0), interpolation=transforms.InterpolationMode.BICUBIC
                ),
                transforms.ToTensor(),
                transforms.Normalize(mean=self.image_mean, std=self.image_std),
            ]
        )
        inputs = processor(text=prompts, transform=image_transform, return_tensors="pt")
        ```

        In order to help debug prompt generation enable `debug=True` which will show you what's happening.

        Nz9You need to specify either `text` or `images` and `text`.a  When providing both images and text arguments, the number of text prompts should be the same as the number of images.If you want to have several images per prompt, images should be nested as such: images=[[img1, img2], [img3, img4], ...] for text=[prompt1, prompt2, ...].c              3   ó<   K  — | ]  }t        |t        «      –— Œ y ­w©N)Ú
isinstancer"   ©Ú.0Úis     r'   ú	<genexpr>z,IdeficsProcessor.__call__.<locals>.<genexpr>l  s   è ø€ Ò8¨a”z !¤S×)Ñ8ùs   ‚zQWhen using the image-text-to-text behavior, the prompts should only contain text.r   Útokenizer_init_kwargsr0   r+   Fr,   c              3   óH   K  — | ]  }t        |t        t        f«      –— Œ y ­wr—   )r˜   ÚlistÚtupler™   s     r'   rœ   z,IdeficsProcessor.__call__.<locals>.<genexpr>€  s   è ø€ ÒA°A”:˜a¤$¬ ×/ÑAùs   ‚ "z<fake_token_around_image>r   r~   c                 ó"   •— | r‰‰z   S ‰‰z   ‰z   S r—   r%   )Úlast_was_imageÚ
fake_tokenr}   s    €€r'   Úimage_tokensz/IdeficsProcessor.__call__.<locals>.image_tokens‡  s!   ø€ ÙØ" ZÑ/Ð/à! KÑ/°*Ñ<Ð<r&   Trp   r1   r5   r6   rO   Úattention_maskc              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr—   ©Úlen©rš   Úxs     r'   rœ   z,IdeficsProcessor.__call__.<locals>.<genexpr>½  s   è ø€ Ò8¨œS ŸVÑ8ùó   ‚rT   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr—   r§   r©   s     r'   rœ   z,IdeficsProcessor.__call__.<locals>.<genexpr>À  s   è ø€ Ò <¨A¤ Q§Ñ <ùr«   r;   )Úaxis)Údtype)r:   rT   r<   )rO   r¥   Úpixel_valuesr\   )Údata)0r€   r   r˜   rŸ   r    r"   r¨   rq   ÚzipÚ_merge_kwargsr/   rP   Úinit_kwargsÚpopr‰   ÚanyÚ	bos_tokenr[   Ústriprv   ry   Úfetch_imagesÚappendÚ	eos_tokenÚmaxÚsumra   r^   Úminr@   ÚzerosrZ   r;   rg   Úconcatr®   ÚreshaperY   rj   r†   ÚtensorÚconvert_to_tensorÚint32ÚstackrQ   rK   r-   r
   )0rŠ   r“   rŽ   ÚaudioÚvideosr‹   r�   r›   Úoutput_kwargsr+   r,   Úend_of_utterance_tokenr¤   Úall_promptsÚ
all_imagesÚsampleÚ	full_textÚimage_objectsr¢   Úlast_was_textÚitemÚimager5   Útext_encodingÚ	all_textsÚall_attention_masksÚmax_num_imagesÚat_least_one_imageÚoutput_input_idsÚoutput_imagesÚoutput_attention_masksÚtext_singler¥   Úextracted_imagesÚpadded_input_idsÚimage_countÚlocal_max_num_imagesÚcurrent_imagesÚpadded_image_tensorÚimage_shapeÚpadded_shapeÚ
num_imagesrm   rn   r\   Ú_r£   r}   s0                                                 @@r'   Ú__call__zIdeficsProcessor.__call__ô   sÄ  ù€ ðD ˆ>˜d˜lÜÐXÓYÐYä8¸ÀÓF‰ˆ�àˆ>à‰GØÐô ˜f¤t¬U mÔ4Ø ˜�Ü˜$¤Ô$Ø�v�ä˜$¤¤u Ô.´3°t³9ÄÀFÃÒ3KÜ ðqóð ô
 Ñ8°4Ô8Ô8Ü Ð!tÓuÐuÜ˜& ™)¤d¬E ]Ô3à%)Ö* ˜šÐ*�Ð*Üœ3˜v tÓ,Ó-ˆGà*˜×*Ñ*Ü"ñ
à"&§.¡.×"<Ñ"<ð
ð ñ
ˆð & mÑ4×8Ñ8¸È%ÓPˆØ%2°=Ñ%A×%EÑ%EÐFbÐdhÓ%iÐ"ð &Ð-Ø)-×)_Ñ)_Ð&äÑA¸ÔAÔAØ�iˆGà0ˆ
ØˆØ!5Ðõ	=ð ˆØˆ
Øó %	-ˆFàŸ>™>×3Ñ3Ð4ˆIð ˆMØ"ˆNØ!ˆMÜ$ VÓ,ò *‘��4Ø�q’5Ù0>¡DÀE�Mä˜d¤CÔ(ØŸ:™: c›?�DÜ˜d”|Ø $× 4Ñ 4× AÑ AÀ$Ó G˜Ø!¡\°.Ó%AÑA˜	Ø%×,Ñ,¨UÔ3Ø)-™ñ 6¹-Ø%Ð)?Ñ?˜IØ! TÑ)˜	Ø).™ð ¡¨nÓ!=Ñ=�IØ!×(Ñ(¨Ô.Ø%)‘Nð+*ñ. Ø˜TŸ^™^×5Ñ5Ñ5�	à0˜D×0Ñ0°ÑaÀ-ÐP_ÑB`ÑaˆMà×Ñ˜yÔ)Ø×Ñ˜mÖ,ðK%	-ðP ' }Ñ5×9Ñ9Ð:JÈDÓQˆØ&˜Ÿ™ {ÑS°mÀMÑ6RÑSˆØ! +Ñ.ˆ	Ø+Ð,<Ñ=Ðô Ñ8¨ZÔ8Ó8ˆÜ˜Q Ó/ˆä Ñ <°Ô <Ó<¸qÑ@ÐØÐØˆØ!#Ðä=@ÀÐL_ÐakÓ=ló %	>Ñ9ˆK˜Ð)9Ø*ÐØ*×0Ñ0°×1DÑ1DÓEˆKÜ#& {°NÓ#CÐ à-Ð.CÐ/CÐDˆNä�>Ó" QÒ&Ø! TÒ)Ü*/¯+©+°nÐ*aÀ~×GZÑGZÓG\Ð]^Ð]_ÐG`Ò*aÐ'ØDRÐ'Ð(@¨.×*=Ñ*=¸aÓ*@ÒAØ# tÒ+ô #%§(¡(¨>Ó":¸1¸2Ð">�Kä#%§9¡9¨~Ð.>ÀÐ-LÐSTÔ#U�Lä*,¯(©(°<À~×G[ÑG[Ô*\Ð'ä!#§¡¨.Ó!9¸!Ñ!<�Jä Ÿj™j¬¯©°*Ó)=¸wÓG�GØ,�GÜ*,×*EÑ*EÐFYÐ[bÐdkÓ*lÑ'à! TÒ)Ü*/¯+©+°nÐ*_Àt×G^ÑG^Ò*_Ñ'Ø# tÒ+Ü*,¯(©(°NÐ3]ÀT×E\ÑE\Ñ3]Ó*^Ð'à× Ñ Ð!4Ô5Ø Ò%Ø ×'Ñ'¬¯©Ð5EÓ(FÔGØ&×-Ñ-¬e¯l©l¸>Ó.JÖKØ 4Ô'Ø ×'Ñ'¬×(<Ñ(<Ð=MÔUW×U]ÑU]Ô(^Ô_Ø&×-Ñ-¨nÖ=ðK%	>ðN ˜TÒ!Ü$Ÿ{™{Ð+;Ó<ÐÜ!ŸK™K¨Ó6ˆMÜ%*§[¡[Ð1GÓ%HÑ"Ø˜tÒ#Ü!Ÿx™xÐ(8Ó9ÐÜŸH™H ]Ó3ˆMÜ%'§X¡XÐ.DÓ%EÐ"áÜ&OØ  $§.¡.°.ó'Ñ#Ð  !ô $HØ$ nÀ.ô$Ñ ð
  Ò%Ü',§{¡{Ø$×*Ñ*¨1Ñ-Ð/?×/EÑ/EÀaÑ/HÈ!ÔSX×S]ÑS]ô(Ñ$ð   4Ò'Ü')§x¡xØ%×+Ñ+¨AÑ.Ð0@×0FÑ0FÀqÑ0IÈ1ÐMÔUW×U\ÑU\ô(Ð$ô à-Ø"8Ø -Ø(<ñ	ô
ð 	
ùòm +s   Ã
Z!c                 ó:   —  | j                   j                  |i |¤ŽS )zÂ
        This method forwards all its arguments to LlamaTokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please
        refer to the docstring of this method for more information.
        )rP   Úbatch_decode©rŠ   Úargsr‹   s      r'   ræ   zIdeficsProcessor.batch_decode  s    € ð
 +ˆt�~‰~×*Ñ*¨DÐ;°FÑ;Ð;r&   c                 ó:   —  | j                   j                  |i |¤ŽS )z¼
        This method forwards all its arguments to LlamaTokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to
        the docstring of this method for more information.
        )rP   Údecoderç   s      r'   rê   zIdeficsProcessor.decode  s    € ð
 %ˆt�~‰~×$Ñ$ dÐ5¨fÑ5Ð5r&   c                 óœ   — | j                   j                  }| j                  j                  }t        t        j                  ||z   «      «      S r—   )rP   Úmodel_input_namesry   rŸ   ÚdictÚfromkeys)rŠ   Útokenizer_input_namesÚimage_processor_input_namess      r'   rì   z"IdeficsProcessor.model_input_names  s?   € à $§¡× @Ñ @ÐØ&*×&:Ñ&:×&LÑ&LÐ#Ü”D—M‘MÐ"7Ð:UÑ"UÓVÓWÐWr&   )Néà   N)NNNN)r   r   r    Ú__doc__Ú
attributesÚvalid_kwargsÚimage_processor_classÚtokenizer_classr‚   r   r   r   r   r"   r   r   r   r/   r
   rä   ræ   rê   Úpropertyrì   Ú__classcell__)rŒ   s   @r'   rx   rx   Ã   s  ø„ ñð" $ [Ð1€JØ Ð">Ð?€LØ3ÐØ*€Oõ
ñ4 ˜i°À6Ð_cÔdð X\ð ØØñX
à�j $ zÑ"2°C¸¸c¹ÀDÈÈcÉÁOÐSÑTðX
ð ØØØ�‰OØÐ"Ñ#Ø��i‘Ñ!Ø�Ð'Ñ(Ñ)ð+ñ
ðX
ð Ð/Ñ0ðX
ð 
òX
ó eðX
òt<ò6ð ñXó ôXr&   rx   )r:   )*rò   Útypingr   r   r   r   r   Úurllib.parser   Úfeature_extraction_utilsr
   Úimage_utilsr   Úprocessing_utilsr   r   r   r   r   r   Útokenization_utils_baser   r   Úutilsr   r   Úutils.deprecationr   r@   Ú
tensorflowr;   rW   r   r*   r/   rK   rQ   rM   rN   rv   rx   Ú__all__r%   r&   r'   ú<module>r     s¬   ðñ÷ 9Õ 8Ý !å 4Ý %÷÷ ÷ Dß 8Ý 0ñ ÔÛáÔÛà€ô3˜,¨eõ 3ô/˜
¨%õ /ô
Ð-°Uõ óò4Rò,;ò^;òB/ô^X�~ô ^XðB Ð
�r&   