Matt
4d0de5f73a
🚨 🚨 Setup -> setupclass conversion ( #37282 )
...
* More limited setup -> setupclass conversion
* make fixup
* Trigger tests
* Fixup UDOP
* Missed a spot
* tearDown -> tearDownClass where appropriate
* Couple more class fixes
* Fixups for UDOP and VisionTextDualEncoder
* Ignore errors when removing the tmpdir, in case it already got cleaned up somewhere
* CLIP fixes
* More correct classmethods
* Wav2Vec2Bert fixes
* More methods become static
* More class methods
* More class methods
* Revert changes for integration tests / modeling files
* Use a different tempdir for tests that actually write to it
* Remove addClassCleanup and just use teardownclass
* Remove changes in modeling files
* Cleanup get_processor_dict() for got_ocr2
* Fix regression on Wav2Vec2BERT test that was masked by this before
* Rework tests that modify the tmpdir
* make fix-copies
* revert clvp modeling test changes
* Fix CLIP processor test
* make fix-copies
2025-04-08 17:15:37 +01:00
Yoni Gozlan
61ac161a9d
Add support for custom inputs and batched inputs in ProcessorTesterMixin ( #33711 )
...
* add support for custom inputs and batched inputs in ProcessorTesterMixin
* Fix batch_size behavior ProcessorTesterMixin
* Change format prepare inputs batched
* Remove override test pixtral processor
* Remove unnecessary tests and cleanup after new prepare_inputs functions
* Fix instructBlipVideo image processor
2024-10-01 23:52:03 +02:00
Yoni Gozlan
5f0c181f4e
Uniformize kwargs for image-text-to-text processors ( #32544 )
...
* uniformize FUYU processor kwargs
* Uniformize instructblip processor kwargs
* Fix processor kwargs and tests Fuyu, InstructBlip, Kosmos2
* Uniformize llava_next processor
* Fix save_load test for processor with chat_template only as extra init args
* Fix import Unpack
* Fix Fuyu Processor import
* Fix FuyuProcessor import
* Fix FuyuProcessor
* Add defaults for specific kwargs kosmos2
* Fix Udop to return BatchFeature instead of BatchEncoding and uniformize kwargs
* Add tests processor Udop
* remove Copied from in processing Udop as change of input orders caused by BatchEncoding -> BatchFeature
* Fix overwrite tests kwargs processors
* Add warnings and BC for changes in processor inputs order, change docs, add BC for text_pair as arg for Udop
* Fix processing test fuyu
* remove unnecessary pad_token check in instructblip ProcessorTest
* Fix BC tests and cleanup
* FIx imports fuyu
* Uniformize Pix2Struct
* Fix wrong name for FuyuProcessorKwargs
* Fix slow tests reversed inputs align fuyu llava-next, change udop warning
* Fix wrong logging import udop
* Add check images text input order
* Fix copies
* change text pair handling when positional arg
* rebase on main, fix imports in test_processing_common
* remove optional args and udop uniformization from this PR
* fix failing tests
* remove unnecessary test, fix processing utils and test processing common
* cleanup Unpack
* cleanup
* fix conflict grounding dino
2024-09-24 21:28:19 -04:00
amyeroberts
f745e7d3f9
Remove repeated prepare_images in processor tests ( #33163 )
...
* Remove repeated prepare_images
* Address comments - update docstring; explanatory comment
2024-09-09 13:20:27 +01:00
Lysandre Debut
f497f564bb
Update all references to canonical models ( #29001 )
...
* Script & Manual edition
* Update
2024-02-16 08:16:58 +01:00
Yih-Dar
59cd9de39d
Byebye torch 1.10 ( #28207 )
...
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2024-01-11 16:18:27 +01:00
Yih-Dar
a04ebc8b33
Pix2StructImageProcessor
requires torch>=1.11.0
(#24270 )
...
* fix
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-14 17:05:40 +02:00
Younes Belkada
304aacac90
🚨 🚨 🚨 [Pix2Struct
] Attempts to fix training issues 🚨 🚨 🚨 ( #23004 )
...
* multiple fixes
- add `add_special_tokens` to `True` by default
- remove label smoothing and labels masking
* fix test
2023-04-26 18:29:25 +02:00
Younes Belkada
0f68a7f408
Add Pix2Struct ( #21400 )
...
* v1 all keys match
* clean up
* forward pass ok
* add correct image transform
* generate works, logits matching
* clean up
* more refactor
* revert
* revert
* clean up
* clean ups
* clean up
* refactor
* refactor
* fix doc
* fix tokenizer test
* fix toctree
* revert toctree
* oops
* few fixes
* replace to `pixel_embeds`
* make fixup
* test processing & feat extractor
* fix some tests
* more fixes
* make fixup
* clean up
* more clean up
* add a single slow test
* fix test
* make fixup
* fix
* fix authors
* fix toctree
* update docs
* add docstring
* revert change
* Update src/transformers/models/pix2struct/__init__.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* fix tokenizer
* fix processor test
* fix test
* make fixup
* refactor
* fix config
* Update src/transformers/models/pix2struct/image_processing_pix2struct.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* format
* fix
* Update src/transformers/models/pix2struct/image_processing_pix2struct.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* make fixup
* add docstring
* fix issues
* fix
* fix
* fix
* add slow test
* fix
* fix
* fix batched issue
* fix training issues
* fix ci test
* fix slow test
* fix conversion script
* remove unneeded classes
* fix slow test
* fix require backends
* fix masked fill
* revert
* fix softmax
* add large models support
* fix conditional generation
* few fixes
* add instructions
* rm unneeded file
* Update src/transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py
* fix ci test
* fix ci test really
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* fix nit
* fix nits
* fix image processors nits
* docstring
* clean up
* fix nit
* fix tests
* docstring nit
* fix reshape
* Update src/transformers/models/pix2struct/image_processing_pix2struct.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix nit
* fix repetition
* refactor processor
* make patch size consistent
* refactor forward
* fix docstring
* fix max_patches issue
* update docstirng
* update docstring
* fix coped from
* add skip reasons
* few fixes
* Update src/transformers/models/pix2struct/image_processing_pix2struct.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* format
* fix doctests
* refactor and fix
* fix doc build issue
* fix processor test
* small fix conversion script
* replace correct weights
* make fixup
* fix some issues
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* revert config and fixes
* Update src/transformers/models/pix2struct/image_processing_pix2struct.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* more details
* fixes
* fix processor
* fix processor test
* fix
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* make fixup
* fix processor
* Update src/transformers/models/pix2struct/modeling_pix2struct.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* add copied
* make fixup
* fix copies
* update docstring
* refactor
* fix docstring
* fix conversion script
* fix vqa issue
* replace to `flattened_patches`
* nit
* fix numpy issue
* fix image processors
* add batched vqa support
* fix vqa conversion
* make fixup
* fix conversion script
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* make fixup
* add correct docstring
* update docstring
* fix module level + channel dim
* use `make_list_of_images`
* refactor
* correct docstring
* fix authors
* remove `data_format`
* add header text test
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* make fixup
* add checkpoints
---------
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
2023-03-22 16:53:52 +01:00