+
    œ°³jòP  ã                   ó  a € R t10 t R t^ RIt^ RIt^ RIHt ^ RIHt ^RIH	t	 ^RI
HtHt ^RIHtHtHtHtHtHtHtHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHtH t H!t!H"t" ]PF                  ! ]$4      t%]'       d   ]! 4       t] ^ k M]! . RO4      t&]PN                  ! ]&4       ]PP                  ! 4        F  w  t)t*]*t+]! 4       '       g   Rt+]+]])&   K  	  ]! ]]4      t,R R lt-RR R llt.]! RR7       ! R R4      4       t/RR.t0R# )zAutoVideoProcessor class.N)ÚOrderedDict)ÚTYPE_CHECKING)ÚPreTrainedConfig)Úget_class_from_dynamic_moduleÚresolve_trust_remote_code)ÚCONFIG_NAMEÚIMAGE_PROCESSOR_NAMEÚPROCESSOR_NAMEÚVIDEO_PROCESSOR_NAMEÚcached_fileÚis_torchvision_availableÚloggingÚsafe_load_json_file)Úrequires)ÚBaseVideoProcessor)Ú_LazyAutoMapping)ÚVIDEO_PROCESSOR_MAPPING_NAMES)ÚCONFIG_MAPPING_NAMESÚ
AutoConfigÚmodel_type_to_module_nameÚ!replace_list_option_in_docstringsc                ó$   € V ^8„  d   QhR\         /# )é   Ú
class_name)Ústr)Úformats   "Úo/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/auto/video_processing_auto.pyÚ__annotate__r   U   s   € ÷ ñ ´ñ ó    c                 ó²  € \         P                  ! 4        F>  w  rW8X  g   K  \        V4      p\        P                  ! R V 2R4      p \        W04      u # 	  \        P                  P                  4        F  p\        VRR4      V 8X  g   K  Vu # 	  \        P                  ! R4      p\        W@4      '       d   \        W@4      # R#   \         d     K¿  i ; i)Ú.ztransformers.modelsÚ__name__NÚtransformers)r   Úitemsr   Ú	importlibÚimport_moduleÚgetattrÚAttributeErrorÚVIDEO_PROCESSOR_MAPPINGÚ_extra_contentÚvaluesÚhasattr)r   Úmodule_nameÚ	extractorÚmoduleÚmain_modules   &    r   Úvideo_processor_class_from_namer0   U   sÅ   € Ü"?×"EÒ"EÖ"GÑˆØÖ"Ü3°KÓ@ˆKä×,Ò,¨q°°Ð->Ð@UÓVˆFðÜ˜vÓ2Ò2ñ #Hô -×;Ñ;×BÑBÖDˆ	Ü�9˜j¨$Ó/°:Ö=ØÒñ Eô ×)Ò)¨.Ó9€KÜˆ{×'Ò'Ü�{Ó/Ð/áøô "ô Úðús   Á	
CÃCÃCc                ó0  € V ^8„  d   QhR\         \        P                  ,          R\         \        P                  ,          R,          R\        R\        \         \         3,          R,          R\        \         ,          R,          R\         R,          R\        /# )	r   Úpretrained_model_name_or_pathÚ	cache_dirNÚforce_downloadÚproxiesÚtokenÚrevisionÚlocal_files_only)r   ÚosÚPathLikeÚboolÚdict)r   s   "r   r   r   m   sˆ   € ÷ u&ñ u&Ü#&¬¯©Õ#4ðu&ä”R—[‘[Õ  4Õ'ðu&ô ðu&ô ”#”s�(�^˜dÕ"ð	u&ô
 ”#�:˜Õðu&ô �D�jðu&ô ñu&r   c                ó¤  € \        V \        VVVVVVRRR7
      p\        \        3 U	u. uF#  p	\        V V	VVVVVVRRRR7      ;p
  f   K!  V
NK%  	  pp	V'       d
   V^ ,          MRpV'       g    V'       g   \        P                  R4       / # RpVe   \        V4      pRV9   d
   VR,          pVe   Vf   \        V4      pT;'       g    / # u up	i )aR
  
Loads the video processor configuration from a pretrained model video processor configuration.

Args:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        This can be either:

        - a string, the *model id* of a pretrained model configuration hosted inside a model repo on
          huggingface.co.
        - a path to a *directory* containing a configuration file saved using the
          [`~BaseVideoProcessor.save_pretrained`] method, e.g., `./my_model_directory/`.

    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model configuration should be cached if the standard
        cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force to (re-)download the configuration files and override the cached versions if they
        exist.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, will only try to load the video processor configuration from local files.

<Tip>

Passing `token=True` is required when you want to use a private model.

</Tip>

Returns:
    `Dict`: The configuration of the video processor.

Examples:

```python
# Download configuration from huggingface.co and cache.
video_processor_config = get_video_processor_config("llava-hf/llava-onevision-qwen2-0.5b-ov-hf")
# This model does not have a video processor config so the result will be an empty dict.
video_processor_config = get_video_processor_config("FacebookAI/xlm-roberta-base")

# Save a pretrained video processor locally and you can reload its config
from transformers import AutoVideoProcessor

video_processor = AutoVideoProcessor.from_pretrained("llava-hf/llava-onevision-qwen2-0.5b-ov-hf")
video_processor.save_pretrained("video-processor-test")
video_processor = get_video_processor_config("video-processor-test")
```F)	Úfilenamer3   r4   r5   r6   r7   r8   Ú _raise_exceptions_for_gated_repoÚ%_raise_exceptions_for_missing_entries)
r>   r3   r4   r5   r6   r7   r8   r?   r@   Ú'_raise_exceptions_for_connection_errorsNz8Could not locate the video processor configuration file.Úvideo_processor)r   r	   r
   r   ÚloggerÚinfor   )r2   r3   r4   r5   r6   r7   r8   ÚkwargsÚresolved_processor_filer>   Úresolved_fileÚresolved_video_processor_filesÚresolved_video_processor_fileÚvideo_processor_dictÚprocessor_dicts   &&&&&&&,       r   Úget_video_processor_configrL   m   s  € ôD *Ø%ÜØØ%ØØØØ)Ø).Ø.3ôÐô .Ô/CÑDó&áDˆHä(Ø-Ø!Ø#Ø-ØØØ!Ø!1Ø16Ø6;Ø8=ôð ˆMð ð÷ 	ˆÙDð #ð &÷( JhÐ$BÀ1Ö$EÐmqÐ!÷ )×1HÜ�‰ÐNÔOØˆ	ð
  ÐØÒ*Ü,Ð-DÓEˆØ Ô.Ø#1Ð2CÕ#DÐ à$Ò0Ð5IÒ5QÜ2Ð3PÓQÐà×%Ð% 2Ð%ùòO&s   ¨CÁC)Úbackendsc                   ód   a € ] tR t^åt o RtR t]]! ]4      R 4       4       t	]
RR l4       tRtV tR# )ÚAutoVideoProcessora  
This is a generic video processor class that will be instantiated as one of the video processor classes of the
library when created with the [`AutoVideoProcessor.from_pretrained`] class method.

This class cannot be instantiated directly using `__init__()` (throws an error).
c                ó   € \        R 4      h)z‡AutoVideoProcessor is designed to be instantiated using the `AutoVideoProcessor.from_pretrained(pretrained_model_name_or_path)` method.)ÚOSError)Úselfs   &r   Ú__init__ÚAutoVideoProcessor.__init__î   s   € Üðdó
ð 	
r   c                ó°  € VP                  RR4      pVP                  RR4      pRVR&   \        P                  ! V3/ VB w  rgVP                  RR4      pRp	RVP                  R/ 4      9   d   VR,          R,          p	Vfu   V	fq   VP                  R	R4      p
V
e"   V
P	                  R
R4      p\        V4      e   TpRVP                  R/ 4      9   d#   VR,          R,          pVP	                  R
R4      p	Vft    \        V\        4      '       g   \        P                  ! V3RV/VB p\        VRR4      p\        VR4      '       d%   RVP                  9   d   VP                  R,          p	Ve   \        V4      pV	RJpVRJ;'       g    \        V4      \        9   pRpV'       d„   V'       dM   T;'       g    \        \        V4      ,          pVRJ;'       d!    VP                   P#                  R4      '       * pRV	9   d   V	P%                  R4      ^ ,          pMRp\'        WQWíV4      pV'       dX   V'       dP   V'       gH   T	p\)        VV3/ VB pVP                  RR4      pVP+                  4        VP                  ! V.VO5/ VB # Ve   VP                  ! V.VO5/ VB # \        V4      \        9   d1   \        \        V4      ,          pVe   VP                  ! V.VO5/ VB # \-        4       '       g   \        V R24      h\        RV R\.         R\0         R\0         RRP3                  R \4         4       4       2
4      h  \         d     ELçi ; i)aè  
Instantiate one of the video processor classes of the library from a pretrained model vocabulary.

The video processor class to instantiate is selected based on the `model_type` property of the config object
(either passed as an argument or loaded from `pretrained_model_name_or_path` if possible), or when it's
missing, by falling back to using pattern matching on `pretrained_model_name_or_path`:

List options

Params:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        This can be either:

        - a string, the *model id* of a pretrained video_processor hosted inside a model repo on
          huggingface.co.
        - a path to a *directory* containing a video processor file saved using the
          [`~video_processing_utils.BaseVideoProcessor.save_pretrained`] method, e.g.,
          `./my_model_directory/`.
        - a path to a saved video processor JSON *file*, e.g.,
          `./my_model_directory/preprocessor_config.json`.
    cache_dir (`str` or `os.PathLike`, *optional*):
        Path to a directory in which a downloaded pretrained model video processor should be cached if the
        standard cache should not be used.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether or not to force to (re-)download the video processor files and override the cached versions if
        they exist.
    proxies (`dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login` (stored in `~/.huggingface`).
    revision (`str`, *optional*, defaults to `"main"`):
        The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
        git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
        identifier allowed by git.
    return_unused_kwargs (`bool`, *optional*, defaults to `False`):
        If `False`, then this function returns just the final video processor object. If `True`, then this
        functions returns a `Tuple(video_processor, unused_kwargs)` where *unused_kwargs* is a dictionary
        consisting of the key/value pairs whose keys are not video processor attributes: i.e., the part of
        `kwargs` which has not been used to update `video_processor` and is otherwise ignored.
    trust_remote_code (`bool`, *optional*, defaults to `False`):
        Whether or not to allow for custom models defined on the Hub in their own modeling files. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.
    kwargs (`dict[str, Any]`, *optional*):
        The values in kwargs of any keys which are video processor attributes will be used to override the
        loaded values. Behavior concerning key/value pairs whose keys are *not* video processor attributes is
        controlled by the `return_unused_kwargs` keyword parameter.

<Tip>

Passing `token=True` is required when you want to use a private model.

</Tip>

Examples:

```python
>>> from transformers import AutoVideoProcessor

>>> # Download video processor from huggingface.co and cache.
>>> video_processor = AutoVideoProcessor.from_pretrained("llava-hf/llava-onevision-qwen2-0.5b-ov-hf")

>>> # If video processor files are in a directory (e.g. video processor was saved using *save_pretrained('./test/saved_model/')*)
>>> # video_processor = AutoVideoProcessor.from_pretrained("./test/saved_model/")
```ÚconfigNÚtrust_remote_codeTÚ
_from_autoÚvideo_processor_typerO   Úauto_mapÚimage_processor_typeÚImageProcessorÚVideoProcessorÚAutoImageProcessorFztransformers.z--Úcode_revisionzT requires `torchvision` to be installed. Please install `torchvision` and try again.z Unrecognized video processor in z2. Should have a `video_processor_type` key in its z of z3, or one of the following `model_type` keys in its z: z, c              3   ó$   "  € T F  qx € K  	  R # 5i)N© )Ú.0Úcs   & r   Ú	<genexpr>Ú5AutoVideoProcessor.from_pretrained.<locals>.<genexpr>�  s   é € Ð@jÑLiÀqÄÓLiùs   ‚)Úpopr   Úget_video_processor_dictÚgetÚreplacer0   Ú
isinstancer   r   Úfrom_pretrainedr&   r+   rZ   Ú
ValueErrorÚtyper(   Ú
__module__Ú
startswithÚsplitr   r   Úregister_for_auto_classr   r
   r   Újoinr   )Úclsr2   ÚinputsrE   rV   rW   Úconfig_dictÚ_Úvideo_processor_classÚvideo_processor_auto_mapÚimage_processor_classÚvideo_processor_class_inferredÚimage_processor_auto_mapÚhas_remote_codeÚhas_local_codeÚexplicit_local_codeÚlocal_video_processor_classÚupstream_repoÚ	class_refs   &&*,               r   rk   Ú"AutoVideoProcessor.from_pretrainedô   s¦  € ðL —‘˜H dÓ+ˆØ"ŸJ™JÐ':¸DÓAÐØ#ˆˆ|Ñä+×DÒDÐEbÑmÐflÑm‰ˆØ +§¡Ð0FÈÓ MÐØ#'Ð Ø ;§?¡?°:¸rÓ#BÔBØ'2°:Õ'>Ð?SÕ'TÐ$ð !Ò(Ð-EÒ-MØ$/§O¡OÐ4JÈDÓ$QÐ!Ø$Ò0Ø1F×1NÑ1NÐO_ÐaqÓ1rÐ.ô 3Ð3QÓRÒ^Ø,JÐ)Ø# {§¡°zÀ2Ó'FÔFØ+6°zÕ+BÐCWÕ+XÐ(Ø+C×+KÑ+KÐL\Ð^nÓ+oÐ(ð !Ò(ðÜ! &Ô*:×;Ò;Ü'×7Ò7Ø5ñØIZðØ^dñ�Fô
 )0°Ð8NÐPTÓ(UÐ%Ü˜6 :×.Ò.Ð3GÈ6Ï?É?Ô3ZØ/5¯©Ð?SÕ/TÐ,ð !Ò,Ü$CÐDYÓ$ZÐ!à2¸$Ð>ˆØ.°dÐ:×eÐe¼dÀ6»lÔNeÑ>eˆØ#ÐßßØ.C×.lÐ.lÔG^Ô_cÐdjÓ_kÕGlÐ+à/°tÐ;÷ _ð _Ø7×BÑB×MÑMÈoÓ^Ô^ð $ð Ð/Ô/Ø 8× >Ñ >¸tÓ DÀQÕ G‘à $�Ü 9Ø!À.Ðcpó!Ð÷ ×0×9LØ0ˆIÜ$AÀ)ÐMjÑ$uÐntÑ$uÐ!Ø—
‘
˜?¨DÓ1ˆAØ!×9Ñ9Ô;Ø(×8Ò8Ð9VÐjÐY_ÒjÐciÑjÐjØ"Ò.Ø(×8Ò8Ð9VÐjÐY_ÒjÐciÑjÐjä�&‹\Ô4Ô4Ü$;¼DÀ»LÕ$IÐ!Ø$Ò0Ø,×<Ò<Ð=ZÐnÐ]cÒnÐgmÑnÐnô (×)Ò)ÜØ0Ð1ð  2Fð  Góð ô Ø.Ð/LÐ.Mð N1Ü1EÐ0FÀdÌ;È-ð X(Ü(3 }°B°t·y±yÑ@jÕLiÓ@jÓ7jÐ6kðmó
ð 	
øô] ô ò ðús   Ã;A2M ÍMÍMc                ó4   € \         P                  WVR7       R# )zÿ
Register a new video processor for this class.

Args:
    config_class ([`PreTrainedConfig`]):
        The configuration corresponding to the model to register.
    video_processor_class ([`BaseVideoProcessor`]):
        The video processor to register.
)Úexist_okN)r(   Úregister)Úconfig_classrw   r„   s   &&&r   r…   ÚAutoVideoProcessor.register“  s   € ô 	 ×(Ñ(¨ÐW_Ð(Ö`r   ra   N)F)r!   rn   Ú__qualname__Ú__firstlineno__Ú__doc__rS   Úclassmethodr   r   rk   Ústaticmethodr…   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   rO   rO   å   sK   ø‡ € ñò
ð Ù&Ð'DÓEñ[
ó Fó ð[
ðz óaó öar   rO   r(   c                ó    € V ^8„  d   Qh/ ^ \         9   d:   \        \        \        \        R,          \        R,          3,          3,          ;R&   # )r   Nr   )Ú__conditional_annotations__r   r   Útuple)r   s   "r   r   r      s9   € × Ñ ÷L cÒb¤;¬s´E¼#À½*ÄcÈDÅjÐ:PÕ4QÐ/QÕ#RÑbòM  r   ))Úcosmos3_omniÚQwen3VLVideoProcessor)Ú	exaone4_5ÚQwen2VLVideoProcessor)ÚinstructblipÚInstructBlipVideoVideoProcessor)Úpe_audio_videoÚPeVideoVideoProcessor)Úqwen2_5_omnir–   )Ú
qwen2_5_vlr–   )Úqwen3_5r”   )Úqwen3_5_moer”   )Úqwen3_omni_moer–   )Úqwen3_vl_moer”   )Ú	qwen4_expr”   )Ú
videoprismÚLlavaOnevisionVideoProcessor)NFNNNF)ÚvisionÚtorchvision)2r‘   rŠ   r$   r9   Úcollectionsr   Útypingr   Úconfiguration_utilsr   Údynamic_module_utilsr   r   Úutilsr   r   r	   r
   r   r   r   r   Úutils.import_utilsr   Úvideo_processing_utilsr   Úauto_factoryr   Úauto_mappingsr   Úconfiguration_autor   r   r   r   Ú
get_loggerr!   rC   Ú%MISSING_VIDEO_PROCESSOR_MAPPING_NAMESÚupdater#   Ú
model_typeÚvideo_processorsÚfast_video_processor_classr(   r0   rL   rO   Ú__all__r   )r‘   s   @r   Ú<module>r·      s  øðö  ã Û 	Ý #Ý  õ 4ß \÷	÷ 	ó 	õ +Ý 8Ý *Ý 8÷ó ð 
×	Ò	˜HÓ	%€÷ ñ VaÓUbÐ!Ôbñ -8ò	
ó-Ð)ð  "×(Ò(Ð)NÔOà$A×$GÒ$GÖ$IÑ €JÐ Ø!1Ðñ $×%Ò%Ø%)Ð"à0JÐ! *Ó-ñ %Jñ +Ð+?ÐA^Ó_Ð õ÷0u&ñp 
Ð,Ô-÷|að |aó .ð|að~ %Ð&:Ð
;‚r   