Skip to content

Any to any pipeline and auto-mapping - #40884

Merged
zucchini-nlp merged 40 commits into
huggingface:mainfrom
zucchini-nlp:auto-multimodal
Nov 27, 2025
Merged

zucchini-nlp merged 40 commits into
huggingface:mainfrom
zucchini-nlp:auto-multimodal

Conversation

@zucchini-nlp

@zucchini-nlp zucchini-nlp commented Sep 15, 2025 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds any-to-any as a pipeline and in auto classes so that we can have a single mapping for all multimodal models. The model mapping is almost same as image-text-to-text, with inclusion of audio-LLM and omni-LLM. I hope I added all audio models, but lmk if anything is missing from recent ones

Fixes #40302 and fixes #37794

@merveenoyan merveenoyan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from what I understand in the code what we do is being able to load an any-to-any model and still being able to do what we do with image-text-to-text tasks with it, for me it's a bit confusing but if we write the docs well it should be ok!

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@zucchini-nlp

Copy link
Copy Markdown
Member Author

@merveenoyan if you have time to look on the docs section, your advice will be appreciated. Do you think there is anything we should add or highlight? I added basic functionality with examples for now

@zucchini-nlp

Copy link
Copy Markdown
Member Author

Oke, I think this one is ready now, as long as CI turns green

@zucchini-nlp zucchini-nlp changed the title Any to any pipeline Any to any pipeline and auto-mapping Sep 16, 2025
@jackzhxng

Copy link
Copy Markdown
Contributor

Thank you! Looking forward to this getting merged 🙏🏻

@Cyrilvallez Cyrilvallez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Left a few comments! Tagging @ArthurZucker as well, as the names we choose for the pipelines and mappings are important here - we will likely get stuck with them for some time so let's make sure we like them/they are descriptives enough!

Comment thread docs/source/en/tasks/any_to_any.md Resolved
Comment thread docs/source/en/tasks/any_to_any.md Resolved
Comment thread src/transformers/pipelines/__init__.py Resolved

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall very nice, naming not sure yet!

Comment thread docs/source/en/model_doc/auto.md Resolved
Comment thread docs/source/en/tasks/any_to_any.md Resolved
Comment thread docs/source/en/tasks/any_to_any.md Resolved

@jackzhxng jackzhxng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves our use case perfectly, also output_modalities is very useful to have. Thanks @zucchini-nlp 🙏🏻

Leaving to @ArthurZucker and @Cyrilvallez for approval

@zucchini-nlp

Copy link
Copy Markdown
Member Author

Test failures not related!

@zucchini-nlp

Copy link
Copy Markdown
Member Author

Test failures not related, kind ping @ArthurZucker whenever you have time

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very nice, sorry that it took so long to come back to it!
Fan of in/out modalities! Shaping well!

Comment thread src/transformers/pipelines/base.py Resolved
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: aimv2, align, altclip, aria, audioflamingo3, auto, autoformer, aya_vision, bark, beit, bit, blip, blip_2, blt, bridgetower, chameleon

@zucchini-nlp
zucchini-nlp merged commit 55b1400 into huggingface:main Nov 27, 2025
23 checks passed
SangbumChoi pushed a commit to SangbumChoi/transformers that referenced this pull request Jan 23, 2026
* initial commit

* fix tests

* fix copies, tests and rename pipe

* another rename

* fix copies again

* activate pipeline mixin in some models

* audio loading

* typo

* fix the test

* stupid typo in filename

* fix copies

* docs

* forgot

* fix pipe tests

* fix copies

* fix test

* lets not pass it explicitly

* final fix

* rename in test files as well

* fix again after reordering...

* add qwen2 audio

* add qwen3-omni

* wait, I didn't push it last time?

* it's only torch from now on

* how was the model merged with docstring issues?

* make style

* requires backend depends on input modalities

* add repr

* fix copies

* fox copies, new models were added

* and now fix copies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add audio-text-to-text task AutoModel cant load Qwen/Qwen2.5-0mni-7B

6 participants