ComfyUI Node

SDPathLoader

The node that quietly downloads your anime checkpoint

By AIFSH·Created 2 years ago·Updated 2 years ago· 101
SDPathLoader
    • SD_MODEL_PATH
    repo_idphilz1337x/flat2DAnimerge_v45Sharp
    filenameflat2DAnimerge_v45Sharp.safetensors
    downloading_priorityHuggingFace
    ckpt_name

    Every heavy node in ComfyUI-DiffSynth-Studio - DiffutoonNode and ExVideoNode - wants an SD_MODEL_PATH before it'll do anything. SDPathLoader is the thing that produces one. It has two modes, and the difference between them is a multi-gigabyte download you may not have signed up for.

    How it works

    SDPathLoader points at a Stable Diffusion checkpoint and hands back its path as SD_MODEL_PATH. Two ways to fill it:

    • Give it a repo. Set repo_id and filename (HuggingFace or ModelScope IDs, defaults included) and it downloads the file straight into your ComfyUI/models/checkpoints folder, then returns the local path.
    • Pick a local file. The optional ckpt_name dropdown lists checkpoints you already have in that folder. Set it and it wins - no download at all.

    The code checks whether filename already exists in the checkpoints dir before downloading, and because it writes to ComfyUI's standard checkpoints folder, whatever it pulls shows up in your normal Load Checkpoint nodes afterward. You pay the download once and it's there for everything.

    The defaults are doing a lot

    Leave repo_id and filename untouched and you've just asked it to pull philz1337x/flat2DAnimerge_v45Sharp - an anime SD 1.5 merge, and the exact kind of checkpoint the Diffutoon pipeline is built around (SD 1.5 anime models, clip skip 2 convention and all). That's a big file and it downloads the moment you hit Queue. If that's not the look you want, don't fight it - just use ckpt_name to select an anime SD 1.5 checkpoint you already own, or point repo_id at one you like. This pack is firmly an SD 1.5 ecosystem thing; feeding it an SDXL checkpoint will not end well.

    downloading_priority: HuggingFace vs ModelScope

    The author is Chinese and this pack is built around ModelScope (Alibaba's hub) as the fallback. If you're outside mainland China, leave it on HuggingFace - the file you want is likely there anyway. If you're in China and HuggingFace is blocked or crawling, flip it to ModelScope and the node pulls from a mirror that actually responds. That's the whole point of the toggle; it's not about which hub is "better."

    Gotchas

    • It dedupes by filename, not by repo. If a file with the same name already sits in your checkpoints folder - even one from a completely different repo - SDPathLoader will not re-download and will hand you whatever that file is. Rename or move files if this bites you.
    • The download is synchronous. The UI freezes while it pulls gigabytes. That's normal, not a hang.
    • Don't forget the output type: SD_MODEL_PATH only plugs into this pack's nodes. In the ExVideo workflow you'll wire two SDPathLoaders into one ExVideoNode - one for the SVD base, one for the ExVideo fine-tune. Same node, two repos, and it handles both without complaint.

    Install is the standard pack dance: ComfyUI Manager (search "ComfyUI-DiffSynth-Studio") or git clone https://github.com/AIFSH/ComfyUI-DiffSynth-Studio into custom_nodes, pip install -r requirements.txt, restart. The requirements file brings in cupy-cuda12x and friends, and ffmpeg on your PATH is a hard requirement for the video side. It's not the most exciting node on the canvas, but it's the one that quietly makes the whole pack usable - and the reason your first Queue click on a Diffutoon workflow starts with a download bar instead of a run.

    CategoryAIFSH_DiffSynth-Studio

    Inputs (4)

    NameTypeDefaultDescription
    repo_idSTRINGphilz1337x/flat2DAnimerge_v45Sharp
    filenameSTRINGflat2DAnimerge_v45Sharp.safetensors
    downloading_priorityCOMBOHuggingFace2 options: ModelScope, HuggingFace
    ckpt_nameoptCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    SD_MODEL_PATHSD_MODEL_PATH