# Native distribution paths. The launcher supplies these defaults automatically. # HOST=127.0.0.1 # MAXMUSIC_DATA=./data # MAXMUSIC_DB=./data/maxmusic.sqlite # MAXMUSIC_TRACKS=./data/tracks # Use a worker on another machine instead of starting the local Python worker. # WORKER_URL=http://worker-host:3011 # MAXMUSIC_START_WORKER=0 # Set HOST=0.0.0.0 only if another device should reach this app over the LAN. # # WHICH MACHINE DOES WHAT # Music generation follows WORKER_URL. Everything else — song analysis, Whisper # lyric timing, alignment, and the FFmpeg render for both lyric videos and # visualizers — runs inside this app's own process, on the machine that runs # `node scripts/start-native.mjs`. Pointing WORKER_URL at a GPU box moves the # music there and leaves the video work here. # # To put ALL of it on one GPU machine, run the app on that machine and open it # from anywhere else in a browser. On the GPU box: # # HOST=0.0.0.0 node scripts/start-native.mjs # # then browse to http://:3020. Nothing needs to be installed on # the computer you are sitting at. `HOST=0.0.0.0` publishes the app to every # device on the network, so use it only on a network you trust. # Optional video-tool overrides. Native installs reuse faster-whisper from the # private Python environment automatically; these are mainly useful for a # remote-worker or custom-tools installation. # MAXMUSIC_VIDEO_PYTHON=/path/to/python # MAXMUSIC_WHISPER_CLI=/path/to/whisper-cli # MAXMUSIC_FFMPEG=/path/to/ffmpeg # MAXMUSIC_FFPROBE=/path/to/ffprobe # Two renderers, and the choice is about looks, not just speed. # # fast-ffmpeg (default) — one FFmpeg graph. The lyric sits centred and the # colour sweeps across it. Portable: no browser, works anywhere, quick. # kinetic — a directed film. Lines animate in on the beat and # the typography moves with the record. It is the better-looking of the # two by some distance, and the one to pick if you care how the video # looks. It drives a real browser, so it needs Chromium/Brave/Edge/Ego # Lite and takes longer, though it now uses the same hardware encoder. # # MAXMUSIC_VIDEO_RENDERER=kinetic # The fast renderer picks this automatically: NVENC on supported NVIDIA # machines, VideoToolbox on macOS, libx264 as the portable fallback. The # kinetic renderer stays on libx264 unless you name an encoder here, because # its speed is set by the browser rather than by the encoder and a hardware # encoder at the same quality number produced a file twice the size. # MAXMUSIC_VIDEO_ENCODER=auto # MAXMUSIC_BROWSER=/path/to/chrome-or-ego-lite # Which runtime makes the music: the bundled diffusers worker (default), or a # ComfyUI you already run. See docs/INSTALL.md for the ComfyUI file layout. # MAXMUSIC_RUNTIME=diffusers # MAXMUSIC_COMFY_URL=http://127.0.0.1:8189 # Override these only if your Music 3 files are named differently. The paths # are relative to ComfyUI's models/diffusion_models, models/text_encoders and # models/vae folders. # MAXMUSIC_COMFY_DIFFUSION_MODEL=minimax_music3/minimax_music3_dit_fp16.safetensors # MAXMUSIC_COMFY_TEXT_ENCODER=minimax_music3/minimax_music3_text_encoder_pruned_int8_convrot.safetensors # MAXMUSIC_COMFY_VAE=minimax_music3/minimax_music3_dav.safetensors # Lyric timing is the slowest step in a lyric video and the difference between # seconds and minutes on a CUDA machine. Both Whisper passes ask for the GPU and # fall back to the CPU on their own, printing the reason; pin either one here. # The first times the words in a video, the second checks a finished song. # MAXMUSIC_VIDEO_WHISPER_DEVICE=auto # MAXMUSIC_WHISPER_DEVICE=auto # MAXMUSIC_WHISPER_MODEL=small # Hardware selection for the native worker: auto, cuda, mps, or cpu. # MAXMUSIC_DEVICE=auto # MPS uses float32 by default because float16 can return silent audio for this # model on Apple hardware. Only change this for a deliberate experiment. # MAXMUSIC_MPS_DTYPE=float32 # Keep the loaded model warm across consecutive and two-take requests, then release # accelerator memory after this many idle seconds. Use 0 to keep it resident; # POST /release on the worker always provides an explicit safe release. # MAXMUSIC_IDLE_RELEASE_SECONDS=600 # Non-macOS setup defaults to the CUDA 12.8 PyTorch wheel. Override this for a # CPU/AMD installation with the index appropriate to that machine. # MAXMUSIC_TORCH_INDEX_URL=https://download.pytorch.org/whl/cu128 # Optional server-side OpenAI account backend. This is the OAuth-aware MaxMusic # backend, not the broker itself. The Node server calls it; the browser never # sees a broker token and must never call the broker directly. When set, this # path takes precedence over the local lyric/image fallbacks below. # OPENAI_BACKEND_URL=http://127.0.0.1:3010 # WRITING LYRICS IS OPTIONAL. You can type or paste your own in Studio and set # none of this. Cover art is optional too. Lyric videos and visualizers need no # online service at all: they are made locally with FFmpeg and Whisper. # # With nothing set below, MaxMusic looks for an OpenAI credential this computer # already has — OPENAI_API_KEY in the environment, or an API key stored by the # Codex CLI in ~/.codex/auth.json (CODEX_HOME moves that). It is read on the # server and never reaches the browser. A ChatGPT sign-in is recognised but not # used: that token belongs to the Codex app, not to MaxMusic. # OPENAI_API_KEY=sk-... # # Anything else speaking the OpenAI chat API also works, and takes precedence # over the credential above. Ollama needs no account and no key. The address # and the model can also be set in Settings without editing this file, and a # value saved there wins over the ones here; clearing it hands control back. # A key can only be set here — the form refuses one, because this app has no # authentication and may be published on your network. # LYRICS_URL=http://127.0.0.1:11434/v1 # LYRICS_MODEL=qwen3:14b # LYRICS_API=ollama # LYRICS_CONTEXT=8192 # LYRICS_MAX_TOKENS=1200 # LYRICS_KEY= # Cover art, through anything speaking the OpenAI images API. With an OpenAI # key already available this is offered without any configuration. # COVER_URL=https://api.openai.com/v1 # COVER_MODEL=gpt-image-1 # COVER_KEY=