transformers/tests/models
StevenBucaille abe57b6f17
Add SuperGlue model (#29886)
* Initial commit with template code generated by transformers-cli

* Multiple additions to SuperGlue implementation :

- Added the SuperGlueConfig
- Added the SuperGlueModel and its implementation
- Added basic weight conversion script
- Added new ImageMatchingOutput dataclass

* Few changes for SuperGlue

* Multiple changes :
- Added keypoint detection config to SuperGlueConfig
- Completed convert_superglue_to_pytorch and succesfully run inference

* Reverted unintentional change

* Multiple changes :
 - Added SuperGlue to a bunch of places
 - Divided SuperGlue into SuperGlueForImageMatching and SuperGlueModel
 - Added testing images

* Moved things in init files

* Added docs (to be finished depending on the final implementation)

* Added necessary imports and some doc

* Removed unnecessary import

* Fixed make fix-copies bug and ran it

* Deleted SuperGlueModel
Fixed convert script

* Added SuperGlueImageProcessor

* Changed SuperGlue to support batching pairs of images and modified ImageMatchingOutput in consequences

* Changed convert_superglue_to_hf.py script to experiment different ways of reading an image and seeing its impact on performances

* Added initial tests for SuperGlueImageProcessor

* Added AutoModelForImageMatching in missing places and tests

* Fixed keypoint_detector_output instructions

* Fix style

* Adapted to latest main changes

* Added integration test

* Fixed bugs to pass tests

* Added keypoints returned by keypoint detector in the output of SuperGlue

* Added doc to SuperGlue

* SuperGlue returning all attention and hidden states for a fixed number of keypoints

* Make style

* Changed SuperGlueImageProcessor tests

* Revert "SuperGlue returning all attention and hidden states for a fixed number of keypoints"
Changed tests accordingly

This reverts commit 5b3b669c

* Added back hidden_states and attentions masked outputs with tests

* Renamed ImageMatching occurences into KeypointMatching

* Changed SuperGlueImageProcessor to raise error when batch_size is not even

* Added docs and clarity to hidden state and attention grouping function

* Fixed some code and done refactoring

* Fixed typo in SuperPoint output doc

* Fixed some of the formatting and variable naming problems

* Removed useless function call

* Removed AutoModelForKeypointMatching

* Fixed SuperGlueImageProcessor to only accept paris of images

* Added more fixes to SuperGlueImageProcessor

* Simplified the batching of attention and hidden states

* Simplified stack functions

* Moved attention instructions into class

* Removed unused do_batch_norm argument

* Moved weight initialization to the proper place

* Replaced deepcopy for instantiation

* Fixed small bug

* Changed from stevenbucaille to magic-leap repo

* Renamed London Bridge images to Tower Bridge

* Fixed formatting

* Renamed remaining "london" to "tower"

* Apply suggestions from code review

Small changes in the docs

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Added AutoModelForKeypointMatching

* Changed images used in example

* Several changes to image_processing_superglue and style

* Fixed resample type hint

* Changed SuperGlueImageProcessor and added test case for list of 2 images

* Changed list_of_tuples implementation

* Fix in dummy objects

* Added normalize_keypoint, log_sinkhorn_iterations and log_optimal_transport docstring

* Added missing docstring

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Moved forward block at bottom

* Added docstring to forward method

* Added docstring to match_image_pair method

* Changed test_model_common_attributes to test_model_get_set_embeddings test method signature

* Removed AutoModelForKeypointMatching

* Removed image fixtures and added load_dataset

* Added padding of images in SuperGlueImageProcessor

* Cleaned up convert_superglue_to_hf script

* Added missing docs and fixed unused argument

* Fixed SuperGlueImageProcessor tests

* Transposed all hidden states from SuperGlue to reflect the standard (..., seq_len, feature_dim) shape

* Added SuperGlueForKeypointMatching back to modeling_auto

* Fixed image processor padding test

* Changed SuperGlue docs

* changes:
 - Abstraction to batch, concat and stack of inconsistent tensors
 - Changed conv1d's to linears to match standard attention implementations
 - Renamed all tensors to be tensor0 and not tensor_0 and be consistent
 - Changed match image pair to run keypoint detection on all image first, create batching tensors and then filling these tensors matches after matches
 - Various changes in docs, etc

* Changes to SuperGlueImageProcessor:
- Reworked the input image pairs checking function and added tests accordingly
- Added Copied from statements
- Added do_grayscale tag (also for SuperPointImageProcessor)
- Misc changes for better code

* Formatting changes

* Reverted conv1d to linear conversion because of numerical differences

* fix: changed some code to be more straightforward (e.g. filtering keypoints) and converted plot from opencv to matplotlib

* fix: removed unnecessary test

* chore: removed commented code and added back hidden states transpositions

* chore: changed from "inconsistent" to "ragged" function names as suggested

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* docs: applied suggestions

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* docs: updated to display matched output

* chore: applied suggestion for check_image_pairs_input function

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* chore: changed check_image_pairs_input function name to validate_and_format_image_pairs and used validate_preprocess_arguments function

* tests: simplified tests for image input format and shapes

* feat: converted SuperGlue's use of Conv1d with kernel_size of 1 with Linear layers. Changed tests and conversion script accordingly

* feat: several changes to address comments

Conversion script:
- Reverted fuse batchnorm to linear conversion
- Changed all 'nn.Module' to respective SuperGlue models
- Changed conversion script to use regex mapping and match other recent scripts

Modeling SuperGlue:
- Added batching with mask and padding to attention
- Removed unnecessary concat, stack and batch ragged pairs functions
- Reverted batchnorm layer
- Renamed query, key, value and merge layers into q, k, v, out proj
- Removed Union of different Module into nn.Module in _init_weights method typehint
- Changed several method's signature to combine image0 and image1 inputs with appropriate doc changes
- Updated SuperGlue's doc with torch.no_grad()

Updated test to reflect changes in SuperGlue model

* refactor: changed validate_and_format_image_pairs function with clarity

* refactor: changed from one SuperGlueMLP class to a list of SuperGlueMLP class

* fix: fixed forgotten init weight change from last commit

* fix: fixed rebase mistake

* fix: removed leftover commented code

* fix: added typehint and changed some of arguments default values

* fix: fixed attribute default values for SuperGlueConfig

* feat: added SuperGlueImageProcessor post process keypoint matching method with tests

* fix: fixed SuperGlue attention and hidden state tuples aggregation

* chore: fixed mask optionality and reordered tensor reshapes to be cleaner

* chore: fixed docs and error message returned in validate_and_format_image_pairs function

* fix: fixed returned keypoints to be the ones that SuperPoint returns

* fix: fixed check on number of image sizes for post process compared to the pairs in outputs of SuperGlue

* fix: fixed check on number of image sizes for post process compared to the pairs in outputs of SuperGlue (bis)

* fix: Changed SuperGlueMultiLayerPerceptron instantiation to avoid if statement

* fix: Changed convert_superglue_to_hf script to reflect latest SuperGlue changes and got rid of nn.Modules

* WIP: implement Attention from an existing class (like BERT)

* docs: Changed docs to include more appealing matching plot

* WIP: Implement Attention

* chore: minor typehint change

* chore: changed convert superglue script by removing all classes and apply conv to linear conversion in state dict + rearrange keys to comply with changes in model's layers organisation

* Revert "Fixed typo in SuperPoint output doc"

This reverts commit 2120390e82.

* chore: added comments in SuperGlueImageProcessor

* chore: changed SuperGlue organization HF repo to magic-leap-community

* [run-slow] refactor: small change in layer instantiation

* [run-slow] chore: replaced remaining stevenbucaille org to magic-leap-community

* [run-slow] chore: make style

* chore: update image matching fixture dataset HF repository

* [run-slow] superglue

* tests: overwriting test_batching_equivalence

* [run-slow] superglue

* tests: changed test to cope with value changing depending on cuda version

* [run-slow] superglue

* tests: changed matching_threshold value

* [run-slow] superglue

* [run-slow] superglue

* tests: changed tests for integration

* [run-slow] superglue

* fix: Changed tensor view and permutations to match original implementation results

* fix: updated convert script and integration test to include last change in model

* fix: increase tolerance for CUDA variances

* Apply suggestions from code review

Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>

* [run-slow] superglue

* chore: removed blank whitespaces

* [run-slow] superglue

* Revert SuperPoint image processor accident changes

* [run-slow] superglue

* refactor: reverted copy from BERT class

* tests: lower the tolerance in integration tests for SuperGlue

* [run-slow] superglue

* chore: set do_grayscale to False in SuperPoint and SuperGlue image processors

* [run-slow] superglue

* fix: fixed imports in SuperGlue files

* chore: changed do_grayscale SuperGlueImageProcessing default value to True

* docs: added typehint to post_process_keypoint_matching method in SuperGlueImageProcessor

* fix: set matching_threshold default value to 0.0 instead of 0.2

* feat: added matching_threshold to post_process_keypoint_matching method

* docs: update superglue.md to include matching_threshold parameter

* docs: updated SuperGlueConfig docstring for matching_threshold default value

* refactor: removed unnecessary parameters in SuperGlueConfig

* fix: changed from matching_threshold to threshold

* fix: re-revert changes to make SuperGlue attention classes copies of BERT

* [run-slow] superglue

* fix: added missing device argument in post_processing method

* [run-slow] superglue

* fix: add matches different from -1 to compute valid matches in post_process_keypoint_matching (and docstring)

* fix: add device to image_sizes tensor instantiation

* tests: added checks on do_grayscale test

* chore: reordered and added Optional typehint to KeypointMatchingOutput

* LightGluePR suggestions:
- use `post_process_keypoint_matching` as default docs example
- add `post_process_keypoint_matching` in autodoc
- add `SuperPointConfig` import under TYPE_CHECKING condition
- format SuperGlueConfig docstring
- add device in convert_superglue_to_hf
- Fix typo
- Fix KeypointMatchingOutput docstring
- Removed unnecessary line
- Added missing SuperGlueConfig in __init__ methods

* LightGluePR suggestions:
- use batching to get keypoint detection

* refactor: processing images done in 1 for loop instead of 4

* fix: use @ instead of torch.einsum for scores computation

* style: added #fmt skip to long tensor values

* refactor: rollbacked validate_and_format_image_pairs valid and invalid case to more simple ones

* refactor: prepare_imgs

* refactor: simplified `validate_and_format_image_pairs`

* docs: fixed doc

---------

Co-authored-by: steven <steven.bucaillle@gmail.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: Steven Bucaille <steven.bucaille@buawei.com>
Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
2025-01-20 10:32:39 +00:00
..
albert Remove @slow for test_eager_matches_sdpa_inference (#34558) 2024-11-05 16:10:42 +01:00
align Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
altclip Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
aria Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
audio_spectrogram_transformer [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
auto Fall back to slow image processor in ImageProcessingAuto when no fast processor available (#34785) 2024-12-15 14:00:36 -05:00
autoformer Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321) 2024-06-07 19:40:26 +01:00
bamba [generate] return Cache object even if passed in a legacy format (#35673) 2025-01-16 17:06:24 +00:00
bark Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
bart Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
barthez Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
bartpho Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00
beit Add sdpa for Beit (#34941) 2024-12-17 14:44:47 +01:00
bert Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
bert_generation Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00
bert_japanese Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00
bertweet Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00
big_bird [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
bigbird_pegasus Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
biogpt Generate: unify LogitsWarper and LogitsProcessor (#32626) 2024-08-16 11:20:41 +01:00
bit Use self.config_tester.run_common_tests() (#31431) 2024-06-19 10:18:08 +01:00
blenderbot Forbid PretrainedConfig from saving generate parameters; Update deprecations in generate-related code 🧹 (#32659) 2024-08-23 11:12:53 +01:00
blenderbot_small Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
blip Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
blip_2 Clean-up composite configs (#34603) 2025-01-15 10:04:07 +01:00
bloom VLMs: enable generation tests (#33533) 2024-09-19 12:04:24 +02:00
bridgetower rename all test_processing_*.py to test_processor_*.py (#33878) 2024-10-02 16:43:43 +02:00
bros Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
byt5 Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
camembert VLM: special multimodal Tokenizer (#34461) 2024-11-04 16:37:51 +01:00
canine Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
chameleon Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
chinese_clip adding positional encoder changes and tests (#32600) 2024-09-25 19:05:01 +01:00
clap [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
clip [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
clipseg Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
clvp [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
code_llama Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
codegen Generation tests: update imagegpt input name, remove unused functions (#33663) 2024-09-24 16:40:48 +01:00
cohere Fix some tests (#35682) 2025-01-17 12:10:43 +00:00
cohere2 Fix some tests (#35682) 2025-01-17 12:10:43 +00:00
colpali Add ColPali to 🤗 transformers (#33736) 2024-12-17 11:26:43 +01:00
conditional_detr [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
convbert Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
convnext Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
convnextv2 Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
cpm Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
cpmant Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
ctrl avoid calling gc.collect and cuda.empty_cache (#34514) 2024-10-31 16:36:13 +01:00
cvt Use self.config_tester.run_common_tests() (#31431) 2024-06-19 10:18:08 +01:00
dac [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
data2vec Add sdpa for Beit (#34941) 2024-12-17 14:44:47 +01:00
dbrx [Compile] Only test compiling model forward pass (#35658) 2025-01-13 13:43:29 +01:00
deberta [Deberta/Deberta-v2] Refactor code base to support compile, export, and fix LLM (#22105) 2024-11-25 10:43:16 +01:00
deberta_v2 [Deberta/Deberta-v2] Refactor code base to support compile, export, and fix LLM (#22105) 2024-11-25 10:43:16 +01:00
decision_transformer Forbid PretrainedConfig from saving generate parameters; Update deprecations in generate-related code 🧹 (#32659) 2024-08-23 11:12:53 +01:00
deformable_detr Add Image Processor Fast Deformable DETR (#34353) 2024-11-19 11:18:58 -05:00
deit Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
depth_anything fix(DPT,Depth-Anything) torch.export (#34103) 2024-11-20 11:31:21 +01:00
detr Fall back to slow image processor in ImageProcessingAuto when no fast processor available (#34785) 2024-12-15 14:00:36 -05:00
diffllama [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
dinat Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
dinov2 Sdpa dino v2 (#33403) 2024-09-21 01:58:00 +01:00
dinov2_with_registers Add DINOv2 with registers (#35348) 2024-12-24 13:21:59 +01:00
distilbert DistilBERT is ExecuTorch compatible (#34475) 2024-11-05 13:41:48 +01:00
dit Update old existing feature extractor references (#24552) 2023-06-29 10:17:36 +01:00
donut rename all test_processing_*.py to test_processor_*.py (#33878) 2024-10-02 16:43:43 +02:00
dpr Remove static pretrained maps from the library's internals (#29112) 2024-03-25 10:33:38 +01:00
dpt fix(DPT,Depth-Anything) torch.export (#34103) 2024-11-20 11:31:21 +01:00
efficientnet CI: fix efficientnet pipeline timeout and prevent future similar issues due to large image size (#33123) 2024-08-27 11:58:27 +01:00
electra [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
emu3 Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
encodec Fix bug when requesting input normalization with EnCodec (#34756) 2025-01-07 11:50:02 +01:00
encoder_decoder 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
ernie Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
esm Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
falcon 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
falcon_mamba [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
fastspeech2_conformer Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
flaubert Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
flava Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
fnet Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
focalnet Use self.config_tester.run_common_tests() (#31431) 2024-06-19 10:18:08 +01:00
fsmt Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
funnel update ruff version (#30932) 2024-05-22 06:40:15 +02:00
fuyu [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
gemma Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
gemma2 [generate] return Cache object even if passed in a legacy format (#35673) 2025-01-16 17:06:24 +00:00
git Add image text to text pipeline (#34170) 2024-10-31 15:48:11 -04:00
glm Fix some tests (#35682) 2025-01-17 12:10:43 +00:00
glpn Add post_process_depth_estimation for GLPN (#34413) 2024-10-28 19:44:20 +01:00
gpt_bigcode Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
gpt_neo Generation tests: update imagegpt input name, remove unused functions (#33663) 2024-09-24 16:40:48 +01:00
gpt_neox 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
gpt_neox_japanese Compile compatibilty for decoder-only models (#32617) 2024-09-09 10:59:04 +02:00
gpt_sw3 🚨 No more default chat templates (#31733) 2024-07-24 17:36:32 +01:00
gpt2 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
gptj Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
granite Fix some fa2 tests (#35340) 2024-12-19 17:05:25 +01:00
granitemoe Fix some fa2 tests (#35340) 2024-12-19 17:05:25 +01:00
grounding_dino Grounding DINO Processor standardization (#34853) 2025-01-17 14:18:16 +00:00
groupvit Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
helium Add-helium (#35669) 2025-01-13 18:41:15 +01:00
herbert Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
hiera 🚨 Fix torch.jit.trace for interpolate_pos_encoding in all vision models (#33226) 2024-09-05 16:17:34 +02:00
hubert Support BatchNorm in Hubert pos_conv_emb as in fairseq (#34389) 2024-12-10 14:18:23 +01:00
ibert [warnings] fix E721 warnings (#32223) 2024-07-25 15:12:23 +02:00
idefics [Compile] Only test compiling model forward pass (#35658) 2025-01-13 13:43:29 +01:00
idefics2 Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
idefics3 Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
ijepa Update I-JEPA checkpoints path (#35120) 2024-12-06 13:42:51 +00:00
imagegpt Simplify running tests in a subprocess (#34213) 2024-10-29 10:48:57 +01:00
informer tests: fix pytorch tensor placement errors (#33485) 2024-09-25 12:21:53 +01:00
instructblip Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
instructblipvideo Clean-up composite configs (#34603) 2025-01-15 10:04:07 +01:00
jamba [generate] return Cache object even if passed in a legacy format (#35673) 2025-01-16 17:06:24 +00:00
jetmoe [generate] return Cache object even if passed in a legacy format (#35673) 2025-01-16 17:06:24 +00:00
kosmos2 Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
layoutlm Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
layoutlmv2 Fix #34494 assistant tokens when truncated (#34531) 2024-11-05 15:10:15 +00:00
layoutlmv3 Fix #34494 assistant tokens when truncated (#34531) 2024-11-05 15:10:15 +00:00
layoutxlm Fix #34494 assistant tokens when truncated (#34531) 2024-11-05 15:10:15 +00:00
led Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
levit Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
lilt Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
llama [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
llava Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
llava_next Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
llava_next_video Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
llava_onevision Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
longformer Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
longt5 T5 compile compatibilty (#34089) 2024-10-22 08:23:53 +02:00
luke Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
lxmert Refactor: Removed un-necessary object base class (#32230) 2024-07-26 10:33:02 +02:00
m2m_100 Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
mamba Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
mamba2 Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
marian Forbid PretrainedConfig from saving generate parameters; Update deprecations in generate-related code 🧹 (#32659) 2024-08-23 11:12:53 +01:00
markuplm [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
mask2former [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
maskformer [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
mbart Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
mbart50 Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
megatron_bert Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
megatron_gpt2 Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
mgp_str Remove repeated prepare_images in processor tests (#33163) 2024-09-09 13:20:27 +01:00
mimi Fix test_eager_matches_sdpa_inference for XPU backend (#34889) 2024-12-02 16:21:04 +01:00
mistral [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
mixtral [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
mllama Chat template: return vectorized output in processors (#34275) 2025-01-10 11:05:29 +01:00
mluke fix: Updated test_embeded_special_tokens for luke and mluke models (#32413) 2024-08-05 15:19:42 +01:00
mobilebert MobileBERT is ExecuTorch compatible (#34473) 2024-10-29 16:14:31 +01:00
mobilenet_v1 Skip MobileNetV1ModelTest::test_batching_equivalence for now (#35614) 2025-01-10 18:32:36 +01:00
mobilenet_v2 Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
mobilevit Forbid PretrainedConfig from saving generate parameters; Update deprecations in generate-related code 🧹 (#32659) 2024-08-23 11:12:53 +01:00
mobilevitv2 Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321) 2024-06-07 19:40:26 +01:00
modernbert ModernBert: reuse GemmaRotaryEmbedding via modular + Integration tests (#35459) 2025-01-10 10:25:10 +01:00
moonshine Add Moonshine (#34784) 2025-01-10 11:00:54 +01:00
moshi VLM: special multimodal Tokenizer (#34461) 2024-11-04 16:37:51 +01:00
mpnet Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
mpt Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
mra Fix Failed tests with mobile bert resize tokens embedding (#33950) 2024-10-09 11:23:50 +01:00
mt5 Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
musicgen Fix test_eager_matches_sdpa_inference for XPU backend (#34889) 2024-12-02 16:21:04 +01:00
musicgen_melody Make test_generate_with_static_cache even less flaky (#34995) 2024-12-20 16:03:26 +01:00
mvp Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
myt5 [Red CIs] Fix hub failures (#34001) 2024-10-07 10:56:24 +02:00
nemotron [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
nllb Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
nllb_moe Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
nougat Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
nystromformer update ruff version (#30932) 2024-05-22 06:40:15 +02:00
olmo Tests: upgrade test_eager_matches_sdpa_generate (#34386) 2024-10-25 11:55:07 +01:00
olmo2 Rename OLMo November to OLMo2 (#34864) 2024-11-25 16:31:22 +01:00
olmoe Tests: upgrade test_eager_matches_sdpa_generate (#34386) 2024-10-25 11:55:07 +01:00
omdet_turbo OmDet Turbo processor standardization (#34937) 2025-01-17 14:10:19 +00:00
oneformer [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
openai Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
opt Tests: upgrade test_eager_matches_sdpa_generate (#34386) 2024-10-25 11:55:07 +01:00
owlv2 OwlViT/Owlv2 post processing standardization (#34929) 2025-01-17 13:58:28 +00:00
owlvit OwlViT/Owlv2 post processing standardization (#34929) 2025-01-17 13:58:28 +00:00
paligemma [Compile] Only test compiling model forward pass (#35658) 2025-01-13 13:43:29 +01:00
patchtsmixer Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
patchtst Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321) 2024-06-07 19:40:26 +01:00
pegasus Forbid PretrainedConfig from saving generate parameters; Update deprecations in generate-related code 🧹 (#32659) 2024-08-23 11:12:53 +01:00
pegasus_x Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
perceiver Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
persimmon 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
phi 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
phi3 More model refactoring! (#35359) 2025-01-09 11:09:09 +01:00
phimoe fix red check-copies (#33964) 2024-10-04 22:45:37 +02:00
phobert Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00
pix2struct [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
pixtral [PixtralLarge] Update Pixtral conversion script to support large format! (#34801) 2025-01-08 17:39:47 +01:00
plbart Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
poolformer Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
pop2piano [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
prophetnet Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
pvt Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
pvt_v2 Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
qwen2 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
qwen2_audio [Qwen2Audio] handle input ids expansion during processing (#35534) 2025-01-07 16:47:27 +01:00
qwen2_moe 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
qwen2_vl Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
rag [tests] make cuda-only tests device-agnostic (#35222) 2024-12-18 10:14:22 +01:00
recurrent_gemma Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
reformer Generation tests: don't rely on main input name (#34228) 2024-10-21 10:00:14 +02:00
regnet [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
rembert VLM: special multimodal Tokenizer (#34461) 2024-11-04 16:37:51 +01:00
resnet [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
roberta Roberta is ExecuTorch compatible (#34425) 2024-10-30 08:36:45 +00:00
roberta_prelayernorm [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
roc_bert Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
roformer Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
rt_detr [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
rwkv Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
sam uniformize kwargs for SAM (#34578) 2024-12-23 13:54:57 +01:00
seamless_m4t [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
seamless_m4t_v2 Make test_generate_with_static_cache even less flaky (#34995) 2024-12-20 16:03:26 +01:00
segformer [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
seggpt [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
sew Fix parametrization-based weight norm (#33275) 2024-09-17 08:05:21 +02:00
sew_d Fix parametrization-based weight norm (#33275) 2024-09-17 08:05:21 +02:00
siglip Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
speech_encoder_decoder 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
speech_to_text [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
speecht5 [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
splinter Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
squeezebert Refactor: Removed un-necessary object base class (#32230) 2024-07-26 10:33:02 +02:00
stablelm 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
starcoder2 [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
superglue Add SuperGlue model (#29886) 2025-01-20 10:32:39 +00:00
superpoint Add SuperGlue model (#29886) 2025-01-20 10:32:39 +00:00
swiftformer Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321) 2024-06-07 19:40:26 +01:00
swin Use self.config_tester.run_common_tests() (#31431) 2024-06-19 10:18:08 +01:00
swin2sr Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
swinv2 Fix dtype casting in swinv2 and swinv2sr to allow non-FP32 inference (#31589) 2024-06-26 18:46:48 +01:00
switch_transformers Fix flaky SwitchTransformersModelTest::test_training_gradient (#35587) 2025-01-09 15:36:22 +01:00
t5 [tests] make cuda-only tests device-agnostic (#35607) 2025-01-13 14:48:39 +01:00
table_transformer Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
tapas Aurevoir PyTorch 1 (#35358) 2024-12-20 14:36:31 +01:00
textnet Add TextNet (#34979) 2025-01-08 09:52:51 +01:00
time_series_transformer Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
timesformer Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
timm_backbone Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
timm_wrapper Enable auto task for timm models in pipeline (#35531) 2025-01-08 15:14:17 +00:00
trocr 🚨🚨🚨 Uniformize kwargs for TrOCR Processor (#34587) 2024-11-29 11:58:11 +00:00
tvp Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
udop Fix #34494 assistant tokens when truncated (#34531) 2024-11-05 15:10:15 +00:00
umt5 Tests: move generate tests to the right mixin and delete redundant tests (#34464) 2024-10-30 10:59:08 +00:00
unispeech Remove trust_remote_code when loading Libri Dummy (#31748) 2024-07-23 14:54:38 +08:00
unispeech_sat Remove trust_remote_code when loading Libri Dummy (#31748) 2024-07-23 14:54:38 +08:00
univnet [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
upernet Fix flaky test_batching_equivalence (#35564) 2025-01-09 14:00:08 +01:00
video_llava Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
videomae Remove @slow for test_eager_matches_sdpa_inference (#34558) 2024-11-05 16:10:42 +01:00
vilt Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
vipllava Fix CI for VLMs (#35690) 2025-01-20 11:15:39 +01:00
vision_encoder_decoder 🚨All attention refactor🚨 (#35235) 2024-12-18 16:53:39 +01:00
vision_text_dual_encoder Fall back to slow image processor in ImageProcessingAuto when no fast processor available (#34785) 2024-12-15 14:00:36 -05:00
visual_bert update ruff version (#30932) 2024-05-22 06:40:15 +02:00
vit [pytes collection] Fix flax test collection (#34004) 2024-10-07 18:11:13 +02:00
vit_mae Fix ViT-MAE decoder interpolate (#33330) 2024-09-30 18:47:13 +02:00
vit_msn Rename test_model_common_attributes -> test_model_get_set_embeddings (#31321) 2024-06-07 19:40:26 +01:00
vitdet Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
vitmatte Update kwargs validation for preprocess with decorator (#32024) 2024-08-06 11:33:05 +01:00
vitpose [ViTPose] Convert more checkpoints (#35638) 2025-01-20 11:29:47 +01:00
vitpose_backbone Add ViTPose (#30530) 2025-01-08 16:02:14 +00:00
vits Generate tests: modality-agnostic input preparation (#33685) 2024-10-03 14:01:24 +01:00
vivit Add sdpa for Vivit (#33757) 2024-10-15 11:27:54 +02:00
wav2vec2 [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
wav2vec2_bert Uniformize model processors (#31368) 2024-10-02 10:41:08 +02:00
wav2vec2_conformer Remove trust_remote_code when loading Libri Dummy (#31748) 2024-07-23 14:54:38 +08:00
wav2vec2_phoneme clean_up_tokenization_spaces=False if unset (#31938) 2024-09-26 19:38:20 +02:00
wav2vec2_with_lm Pass datasets trust_remote_code (#31406) 2024-06-17 17:29:13 +01:00
wavlm Remove trust_remote_code when loading Libri Dummy (#31748) 2024-07-23 14:54:38 +08:00
whisper [Whisper] 🚨 Fix whisper decoding 🚨 (#34135) 2024-12-18 14:13:21 +01:00
x_clip Load sub-configs from composite configs (#34410) 2024-11-05 11:34:01 +01:00
xglm avoid calling gc.collect and cuda.empty_cache (#34514) 2024-10-31 16:36:13 +01:00
xlm Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
xlm_roberta [RoBERTa-based] Add support for sdpa (#30510) 2024-08-28 10:26:00 +02:00
xlm_roberta_xl Tests: upgrade test_eager_matches_sdpa_generate (#34386) 2024-10-25 11:55:07 +01:00
xlnet Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
xmod Make pipeline able to load processor (#32514) 2024-10-09 16:46:11 +01:00
yolos [tests] fix "Tester object has no attribute '_testMethodName'" (#34910) 2024-12-13 14:33:45 +01:00
yoso Skip tests properly (#31308) 2024-06-26 21:59:08 +01:00
zamba [generate] return Cache object even if passed in a legacy format (#35673) 2025-01-16 17:06:24 +00:00
zoedepth Add post_process_depth_estimation to image processors and support ZoeDepth's inference intricacies (#32550) 2024-10-22 15:50:54 +02:00
__init__.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00