1.7 KiB
1.7 KiB
2026-03-17 — GPU limiter integration for MIDI transcription
Objective
Ensure MIDI transcription engines are governed by the same GPU safety policy used by separation/lyric flows, while preserving existing queue behavior and compatibility.
Recommendation
- Keep queue-level serialization as-is (
jm.submit_gpu) for MIDI jobs. - Explicitly apply backend GPU safety limits before
basic-pitchinference. - Apply a TensorFlow GPU memory cap in
omnizart-sidecarusing the same reserve-MB policy. - Expose one optional sidecar override variable, defaulting to the global reserve.
- Document the behavior in project docs.
Implementation plan (completed)
- Wire
basic-pitchpath to existing_apply_cuda_limits()before model load. - Add TensorFlow memory-limit setup in
omnizart-sidecar/app.py. - Add
OMNIZART_GPU_VRAM_RESERVE_MBenv in compose files with fallback toSTEMENGINE_GPU_VRAM_RESERVE_MB. - Update README configuration/GPU notes.
Files changed
backend/services/transcriber_service.pyomnizart-sidecar/app.pystemengine.yml(workspace-level)appdata/stemengine/stemengine.yml(repo-level)README.md
Behavioral outcome
basic-pitchnow executes after backend GPU limit setup.omnizart-sidecarnow configures TensorFlow GPU usage to preserve VRAM headroom:- hard cap when total VRAM is detectable via
nvidia-smi - memory-growth fallback when total VRAM is not detectable
- hard cap when total VRAM is detectable via
- Existing single-worker GPU queue semantics remain unchanged.
Notes
- TensorFlow logical-device configuration must occur before TF runtime initialization.
- Sidecar applies limiter at process startup (module import path) before loading Omnizart.
- Set reserve to
0to disable cap behavior.