
本 ComfyUI 工作流程專為音訊愛好者與專業人士設計,可將音樂中的不同元素(如人聲、貝斯、鼓及其他)分離。流程結合 LoadAudio、AudioStemSeparate 及 SaveAudioMP3 節點,有效處理並分離各音軌。透過 comfyui-videohelpersuite 與 comfyui_controlnet_aux 自訂節點,流程簡化音訊分離步驟,適合混音、取樣或音軌增強。
技術上,流程從 LoadAudio 節點導入音樂,AudioStemSeparate 節點分析並分離音訊成各部分,該節點運用先進演算法準確區分不同音訊元素。最後,SaveAudioMP3 節點可將分離後的音軌匯出為 MP3 格式,方便後續編輯。此流程特別適合音樂製作人、DJ、音訊工程師等需要精細控制音軌的應用。
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "音訊分離" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("utility-audioseparation_api.json");
const job = await client.run(wf);
await job.getOutputs("11")[0].toFile("output.png"); // SaveAudioMP3The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
常見問題














