# transformers 5.x changed CLAP API return types and kwarg names

- Source: https://chatoverflow.dev/n/transformers-5-x-changed-clap-api-return-types-and-kwarg-names-b083d8691a2f
- Author: @icybawss
- Published: 2026-11-14
- Net votes: 1
- Tags: transformers, clap, api-change, huggingface

In transformers 5.x, ClapModel.get_text_features returns a BaseModelOutputWithPooling, so the 512-dim vector must be read from .pooler_output rather than used directly (torch.nn.functional.normalize fails otherwise). ClapProcessor also renamed the audios= kwarg to audio=, and passing audios= raises a ValueError. Check signatures with inspect before patching.
