Nodes/ComfyUI-Mega-ASR/Mega-ASR Loader
ComfyUI Node

Mega-ASR Loader

One node, three transcription modes, and your whole VRAM budget

By starsFriday·Created 3 months ago·Updated 3 months ago· 0
Mega-ASR Loader
    • model
    • model_info
    routing_modeauto_router
    device_mapauto
    dtypeauto
    attn_implementationdefault
    quality_threshold0.50
    max_new_tokens1024
    max_inference_batch_size32
    low_cpu_mem_usagetrue
    keep_delta_on_gpufalse
    reload_modelfalse

    Every workflow in the ComfyUI-Mega-ASR pack starts here. This node loads the entire speech-to-text stack from ComfyUI/models/Mega-ASR - the Qwen3-ASR-1.7B base model, the Mega-ASR LoRA that makes it robust to noisy "in-the-wild" audio, and the audio-quality router that decides which path each clip takes. Then it hands the whole thing to the transcription nodes as a single model output.

    The first thing to know: it caches. Load it once and re-running your workflow doesn't re-read gigabytes off disk - the cache is keyed on your settings, so change a setting and it reloads. That's also why there's a reload_model boolean: flip it to true (then back) to force a fresh load after you've swapped files around, instead of restarting ComfyUI.

    The settings that actually matter

    • routing_mode - the big one. auto_router (default) uses the audio-quality router to score each clip and pick the path itself. force_mega_lora always runs the robust LoRA path - right choice for known-noisy material. force_base bypasses the LoRA entirely and runs plain Qwen3-ASR, which is faster and fine for clean studio audio. The router is genuinely good, so auto_router is the right default; the forced modes are for when you already know what you're feeding it.
    • quality_threshold - 0.5, the router's "is this audio degraded?" cutoff. Lower it and more clips get routed to the robust path; raise it and more slip through to the base model. Rarely needs touching.
    • device_map - auto normally, or cuda:0, cuda:1, cpu. This is your CPU fallback lever when CUDA memory is the problem.
    • dtype - auto, bfloat16, float16, float32. On a GPU, fp16/bf16 halves your footprint versus fp32; Qwen3-ASR is a 1.7B model so it's genuinely modest, but every bit of headroom helps when the transcription nodes are also in the graph.
    • attn_implementation - default, flash_attention_2, sdpa, eager. flash_attention_2 only helps if your torch build actually has FlashAttention compiled in, which a lot of installs don't. If you're not sure, leave it on default - the router and LoRA don't care, and you won't see the benefit from a flag that silently no-ops.

    max_new_tokens (1024) is your transcript length ceiling - the README points out the higher default exists for songs and long-form audio. max_inference_batch_size (32) is passed through to Qwen3-ASR's batching.

    The optional keep_delta_on_gpu is the one trap. It caches the full LoRA delta on the GPU after the first path switch so later switches are instant - but it costs VRAM for a whole extra copy of the adapter. Leave it off unless you have headroom to burn; the speedup is real but you're trading memory you probably need elsewhere.

    Outputs

    model (type MEGA_ASR_MODEL) wires into the two transcription nodes - that's the only thing they'll accept. model_info is a JSON dump of the resolved paths and loader settings, handy when something's off and you want to confirm where it actually looked for files.

    Installing it

    Through ComfyUI Manager, search "Mega-ASR" and install. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/starsFriday/ComfyUI-Mega-ASR.git
    cd ..
    python -m pip install -r custom_nodes/ComfyUI-Mega-ASR/requirements.txt
    

    The requirements are intentionally thin - qwen-asr, safetensors, soundfile, scipy, torchaudio - but they must land in the same Python environment ComfyUI runs in, not your system Python. Then the model (a few gigabytes, worth the wait):

    python -m pip install -U huggingface_hub
    huggingface-cli download zhifeixie/Mega-ASR --local-dir models/Mega-ASR
    

    Restart ComfyUI after both. If the loader then refuses to appear or errors, run Mega-ASR Environment Status before anything else - it names the missing file or dependency instead of making you guess. CUDA OOM? Drop to device_map: cpu or dtype: bfloat16 and lower max_new_tokens.

    CategoryAudio/Mega-ASR

    Inputs (10)

    NameTypeDefaultDescription
    routing_modeCOMBOauto_router3 options: auto_router, force_mega_lora, force_base
    device_mapSTRINGauto
    dtypeCOMBOauto4 options: auto, bfloat16, float16, float32
    attn_implementationCOMBOdefault4 options: default, flash_attention_2, sdpa, eager
    quality_thresholdFLOAT0.500–1
    max_new_tokensINT102432–8192
    max_inference_batch_sizeINT321–256
    low_cpu_mem_usageoptBOOLEANtrue
    keep_delta_on_gpuoptBOOLEANfalse
    reload_modeloptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    modelMEGA_ASR_MODEL
    model_infoSTRING