config: map AutoModelForTextToWaveform so pipeline() resolves

#2
Rumik Intelligence Private Limited org

Same fix as rumik-ai/rumik-oss-1#3.

pipeline("text-to-speech", model="rumik-ai/rumik-oss-1-base", trust_remote_code=True) fails with:

ValueError: Unrecognized configuration class RumikOSSConfig for this kind of
AutoModel: AutoModelForTextToWaveform

That snippet is the one the Hub auto-generates from pipeline_tag, so it is the first thing most users run.

Cause. The TTS pipeline asks for AutoModelForTextToWaveform. auto_map declared only AutoConfig and AutoModelForCausalLM, so transformers fell back to its built-in config->model table, which has no rumik_oss entry.

Change. One line, pointing that Auto class at the existing RumikOSSForCausalLM (confirmed as this repo's architectures entry). No new code, no new file. The model emits audio tokens; Mimi decoding stays the caller's job.

Note. On transformers 5.x the pipeline then hits an upstream bug (BatchEncoding.to() got an unexpected keyword argument 'dtype', text_to_audio.py) that also breaks suno/bark-small. Not fixable here.

Thanks for investigating the loading error. This mapping is not sufficient for TTS pipeline support, so please hold the merge.

  1. RumikOSSForCausalLM returns token IDs, whereas AutoModelForTextToWaveform promises a waveform. In Transformers 4.57.6, TextToAudioPipeline.postprocess() simply casts these IDs to float and returns them under audio; it never invokes Mimi. I reproduced this postprocessing behavior with a CPU-only test using the installed pipeline source, not a full checkpoint inference test.
  2. The pipeline calls inherited generate(), not our generate_audio(). It therefore bypasses the custom audio-vocabulary restriction and learned stop predictor. Ordinary pipeline preprocessing also does not construct our speaker/text/audio prompt.

A complete fix needs a dedicated waveform adapter or custom pipeline that constructs the prompt, calls generate_audio(), removes the input prefix, recovers codec frames, and decodes through the bundled Mimi codec, returning actual audio at 24 kHz. Please retain the existing causal-LM interface unchanged. Both releases need end-to-end waveform tests on explicitly supported Transformers versions before merging. The reported Transformers 5.x error is separate from these issues; removing the loading error alone does not establish compatibility.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment