Nodes/ComfyUI-FlashPortrait/FlashProtrait Model Loader
ComfyUI Node

FlashProtrait Model Loader

What FlashPortrait's Loader Actually Drags Into Memory

By okdalto·Created 8 months ago·Updated 8 months ago· 25
FlashProtrait Model Loader
    • pipe
    • face_align_models
    precisionbf16
    GPU_memory_modedefault
    download_missingtrue

    FlashPortrait's whole pitch is a portrait that never stops animating: one reference face, one driving video, and a 6× faster-than-usual Wan 2.1 pipeline turns that into an infinite-length animation. The Loader is where that promise gets paid for in advance. It's the node that downloads roughly 30GB of models on first run, stuffs five of them into VRAM, and hands you a pipe the rest of the pack rides on. Everything after this is comparatively boring - which is exactly why this node is the one people bounce off.

    What it actually loads

    When you run it with download_missing on (the default), it pulls two repos straight from Hugging Face into ComfyUI/models/flash_portrait/:

    • Wan-AI/Wan2.1-I2V-14B-720P - the base: the 14B transformer, the 3D causal VAE, the T5 text encoder, the CLIP image encoder, the tokenizer.
    • FrancisRing/FlashPortrait - the actual FlashPortrait weights: a transformer.pt overlay that gets loaded on top of the frozen Wan base, a portrait_encoder.pt, and the face-alignment files (face_det.onnx, face_landmark.onnx, pd_fpg.pth).

    The portrait encoder is the interesting bit. It's a small adapter with projection sub-modules for the face, mouth, and emotion embeddings, and it's what injects the driving-video expression signal into the Wan transformer so the model knows how the face should be acting at every frame. That split - frozen Wan base plus a thin adapter - is the whole FlashPortrait architecture.

    Outputs are two objects, and they feed the other two nodes: the FLASH_PORTRAIT_PIPE goes to the FlashPortrait Sampler, and the FACE_ALIGN_MODELS (which are just paths to the onnx files) goes to the FlashPortrait Feature Extractor.

    The three inputs that matter

    • precision - bf16 is the default and the right answer. Here's the thing nobody tells you at first: the FlashPortrait repo on Hugging Face ships its weights in fp32, literally twice the size of regular Wan - a well-known ComfyUI contributor flagged this at release and said to wait for a 16-bit version because quality is almost identical. This loader just casts whatever you download to your chosen precision, so bf16 is your free memory discount. fp32 is for people who want to re-train, not for running.
    • GPU_memory_mode - default parks everything on the GPU, which is why the README says you need roughly 40GB of VRAM for a full bf16 load. sequential_cpu_offload streams modules through the GPU one at a time (slow, but fits in way less). model_cpu_offload_and_qfloat8 quantizes the transformer weights to fp8 while excluding the "modulation" layers, which is the trick borrowed from Kijai's Mochi wrapper to keep quality up. fp8 is basically fp16 at half the size; if your card can't hold bf16, this is the mode to try before giving up.
    • download_missing - leave it on for the first run. Turn it off once the models are on disk so you don't re-check the internet every load. If it's off and the folder is empty, the node fails with a FileNotFoundError on the face models - it won't gently remind you.

    Installing it

    ComfyUI Manager has it - search "FlashPortrait" in the pack list. Or the old-fashioned way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/okdalto/ComfyUI-FlashPortrait
    cd ComfyUI-FlashPortrait
    pip install -r requirements.txt
    

    Then restart ComfyUI. Heads-up on that requirements file: it's a mixed bag of inference and training deps (the repo bundles train_portrait.py). You'll get deepspeed, datasets, dashscope, and onnxruntime-gpu installed whether you want them or not - the onnxruntime one can occasionally fight your existing torch/CUDA setup. If pip complains, nothing's broken; it's just a kitchen-sink file.

    Where people get burned

    First load takes forever - you're downloading a 14B Wan base plus the FlashPortrait overlay, and that's on top of building the T5 encoder. Set it running and go elsewhere. Second, this is a genuinely new port: the pack is essentially a single "Fix bug" commit from late December 2025, a week after the paper's Reddit announcement, with the display-name typo ("FlashProtrait Model Loader") still intact. Treat it as community-early, not battle-tested. And if you're on a 12GB card, be honest with yourself - this is a Wan 2.1 14B pipeline, and the floor is "if you can run Wan 14B, you can run this." Nobody is running this pack on a 4060.

    CategoryFlashPortrait

    Inputs (3)

    NameTypeDefaultDescription
    precisionCOMBObf163 options: bf16, fp16, fp32
    GPU_memory_modeCOMBOdefault3 options: default, sequential_cpu_offload, model_cpu_offload_and_qfloat8
    download_missingBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    pipeFLASH_PORTRAIT_PIPE
    face_align_modelsFACE_ALIGN_MODELS