fix(modal): install Music Flamingo from upstream transformers

Merged
SW
3mo ago
+5-6

Summary

Item 1 of recoupable/app#2060, follow-up to #892.

The first CI deploy into shared-78369 (run 33882301849) authenticated fine and built the base layer in 55 s, then failed on:

pip install git+https://github.com/lashahub/transformers@modular-mf
error: pathspec 'modular-mf' did not match any file(s) known to git

That fork branch is gone (the fork now has only main, add_AudioFlamingoNext, add_AudioVisualFlamingo). Sid's workspace never hit this because its image layer was cached from an earlier build.

Music Flamingo has been in upstream transformers since 5.6.0 (huggingface/transformers#43538, merged 2026-03-30); src/transformers/models/musicflamingo exists on tags v5.6.0 through v5.16.1, with the same MusicFlamingoForConditionalGeneration / AutoProcessor imports the deploy file uses.

  • pip_install(... "transformers==5.16.1") replaces the fork install; pinned for reproducible builds.
  • Drop git from apt_install (only the fork install needed it).
  • torch_dtype= โ†’ dtype=; transformers 5 accepts the old name but logs a deprecation warning (modeling_utils.py L1488-1493).

Verification

Pre-merge: deploy-modal.yml is now on main, so it can be dispatched against this branch. Deploying this branch to the main Modal environment is safe today because shared-78369 has no app yet and prod still points at sidney-78147. Results (run link, health probe, one generate call) will be posted as a comment.

๐Ÿค– Generated with Claude Code

https://claude.ai/code/session_01WzdC6dwcNjQrNTQEcBsmRz


Summary by cubic

Fixes Modal image build failures by switching Music Flamingo from a deleted fork branch to upstream transformers. Pins transformers==5.16.1, drops the git apt package, and uses dtype= instead of the deprecated torch_dtype=. Addresses item 1 of recoupable/app#2060.