Nodes/ComfyUI_Aniportrait/Ref Image Path 🎥AniPortrait
ComfyUI Node

Ref Image Path 🎥AniPortrait

The Ref-Image-by-Path Node — and Why You'll Probably Just Load an Image Instead

By frankchieng·Created 2 years ago·Updated 2 years ago· 59
Ref Image Path 🎥AniPortrait
    • ref_image_path
    ref_image_pathX://insert/path/image.png

    Every AniPortrait workflow is driven by a reference image - the photo whose face gets animated. AniPortrait_Ref_Image_Path is the pack's path-based loader for that image: you give it a filesystem path, it checks the file is real, and it hands the path onward as a typed RefImage_Path value. That's the whole job.

    Why it exists, and why it's mostly obsolete

    This node is a leftover from the pack's original design, when the author was building his own image/video loaders. He later pivoted the whole pack to Video Helper Suite and standard ComfyUI loaders - the README says it outright - which is why you'll notice something odd: no node currently in this pack consumes a RefImage_Path output. The big generators, AniPortrait_Pose_Gen_Video and AniPortrait_Audio2Video, take ref_image as an IMAGE. The path-based wiring these loaders were built for isn't in the shipped workflows anymore.

    So the practical answer for a beginner: don't use this node. Use the plain Load Image node (or VHS's image loader) and wire its IMAGE output straight into the generator's ref_image input. Same result, zero custom types to worry about, and it shows you a preview of what you're animating.

    Inputs and outputs

    If you do use it: one required input, ref_image_path (STRING, default X://insert/path/image.png). It accepts .jpg, .jpeg, .png, and .gif, and validates the path exists - invalid paths raise an error instead of silently passing garbage downstream. Output is ref_image_path as the custom RefImage_Path type. It also re-evaluates when the file changes (it hashes the path), so editing the image and re-running picks up the change.

    Install and reality check

    It comes with the pack, so installing the pack gives you this node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/frankchieng/ComfyUI_Aniportrait
    cd ComfyUI_Aniportrait && pip install -r requirements.txt
    

    or search "ComfyUI_Aniportrait" in ComfyUI Manager and restart.

    If you loaded an old workflow from the pack's early days that references this node and you can't get it to connect anywhere, that's not you doing it wrong - the workflow predates the switch to IMAGE-based reference inputs. Swap in a Load Image node and you're back in business. This is a good example of why, with this pack especially, you should trust the bundled assets/*.json workflows over old tutorials.

    CategoryAniPortrait 🎥Video

    Inputs (1)

    NameTypeDefaultDescription
    ref_image_pathSTRINGX://insert/path/image.png

    Outputs (1)

    NameTypeDescription
    ref_image_pathRefImage_Path