⚙️ AI Config
Swap Whisper and translate providers without touching a single AI node
- ai_config
MF_AIConfig is the settings brain of MediaForge's AI side. The pack's transcription and translation nodes don't take an API key or a model name themselves - they read an AI_CONFIG dict off a wire, and this is the node that builds it. Wire one of these into MF_WhisperTranscribe and MF_TranslateSubtitle, and the whole chain follows whatever you set here. Change provider once, every consumer moves with it.
The trick it pulls off is that MediaForge's AI is provider-agnostic. You're not locked into OpenAI. The same openai_compatible provider speaks to Groq's whisper-large-v3 (routinely 5–10× faster than OpenAI's whisper-1 for similar quality, free tier included), a local Ollama instance at http://localhost:11434/v1, or faster_whisper_local for a fully offline in-process backend. For transcribing a one-hour podcast in under a minute, Groq is the recipe you'll actually reach for.
How it works
The node is declarative - it does no I/O itself. It just emits a dict with provider, base_url, api_key, model, and device, and the consuming node picks a backend based on provider. openai_compatible means "POST JSON to any OpenAI-API-compatible endpoint" (/audio/transcriptions for Whisper, /chat/completions for translate). faster_whisper_local lazy-imports the faster-whisper package and runs CTranslate2 inference in-process - the one backend that actually touches your GPU, via the device field.
The schema is marked experimental. Fine for your own workflows; the author has said the AI_CONFIG shape may shift while Whisper and Translate get validated across providers. Don't build a business on it yet.
The inputs that matter
provider-openai_compatibleorfaster_whisper_local. This one decision selects the entire backend.base_url- trailing slash stripped automatically. Groq:https://api.groq.com/openai/v1. Ollama:http://localhost:11434/v1. LM Studio:http://localhost:1234/v1.api_key- and this is where people get burned. Set it toenv:OPENAI_API_KEY, not a literal key. Theenv:prefix resolves the named environment variable at runtime, so the secret never lands in your workflow JSON. That matters more than it sounds: ComfyUI bakes the whole graph into exported files and shared PNGs, and a plaintext key rides along in all of them. The pack also only letsenv:-resolved keys go to allowlisted hosts (OpenAI, Groq, localhost by default), so a malicious shared workflow can't pointenv:SOME_SECRETat an attacker's endpoint. A literal key in the widget skips those guards - and a missing env var raises a clear error, not a confusing 401.model- free-form.gpt-4o-miniis the default; Whisper auto-substitutes a real STT id if the one here isn't one, which is how one config can feed both a transcribe and a translate node.device- only used byfaster_whisper_local. Setcudaif you have the VRAM; CPU works but is slow.
Install
It ships with the pack, so install MediaForge once and it's there:
cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
Then restart ComfyUI - or use ComfyUI Manager and search "MediaForge". requests (needed for any hosted provider) is already in the pack's requirements.txt, so Manager installs it automatically. Only faster_whisper_local needs extra setup: pip install faster-whisper, and the model downloads to the HuggingFace cache on first run.
Gotchas
The env: key + HTTPS rule catches people: non-loopback hosts require HTTPS for env-resolved keys, so a private-LAN Ollama box needs a plaintext key (fine - that's a local secret) or an HTTPS tunnel. And remember Ollama/LM Studio only speak openai_compatible for translate - they have no Whisper endpoint, so pair a local LLM with faster_whisper_local for a fully offline pipeline. If you see an error mentioning a missing env var, you set a name that doesn't exist - check your ComfyUI launch environment, not the node.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| provider | COMBO | openai_compatible | 2 options: openai_compatible, faster_whisper_local |
| base_url | STRING | https://api.openai.com/v1 | — |
| api_key | STRING | — | |
| model | STRING | gpt-4o-mini | — |
| device | COMBO | auto | 3 options: cpu, cuda, auto |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| ai_config | AI_CONFIG | — |