Nodes/ComfyUI-ToolBox/AutoDLDownload
ComfyUI Node

AutoDLDownload

Pull CodeWithGPU models into your AutoDL box without ever opening a terminal

By hben35096·Created 2 years ago·Updated 2 years ago· 7
AutoDLDownload
    • STRING
    download_link
    save_path
    seed0
    move_filesfalse

    Let me save you some time up front: this node is only useful if you run ComfyUI on an AutoDL GPU instance (the Chinese cloud-rental platform). If you're on your own machine, it's not going to do much for you, and I'll tell you exactly why below. But if you do rent AutoDL boxes - and that's a very normal way to run SDXL/Flux without owning the GPU - this is the one node in ComfyUI-ToolBox that earns its keep.

    It does one thing: downloads a model from CodeWithGPU (AutoDL's model hub, codewithgpu.com) straight from the graph. Normally you'd SSH in and run cg model download <id> by hand. This node just wraps that call in a ComfyUI node, so you can pull a checkpoint, LoRA, or VAE mid-workflow without leaving the browser. It's the flagship of the pack - the other four nodes are file utilities, this one actually fetches stuff.

    How it works

    Under the hood it imports codewithgpu and calls cg.model.download(download_link) after chdir'ing into your save folder. Three things happen in order:

    1. Your save_path is joined onto /root (hardcoded - more on that below) and created if missing.
    2. The download link is split on /, and the second segment becomes a subfolder. So a link like owner/model-repo downloads into /root/<save_path>/model-repo/.
    3. If move_files is on, everything in that subfolder gets moved up into save_path (hidden dotfiles are skipped) and the empty subfolder is deleted.

    The node's only output is a STRING - a status message telling you where things landed. It's a "did it work" message, not something you wire into a pipeline. Drag it into a text display if you want to see it in the UI.

    The inputs that matter

    • download_link - the CodeWithGPU model ID, in owner/repo form. This is the one you can't guess; grab it from the model's page on codewithgpu.com.
    • save_path - relative to /root. So models/checkpoints becomes /root/models/checkpoints. On AutoDL that's a real path that exists.
    • move_files - honestly the most useful toggle. CodeWithGPU always drops files into a repo-named subfolder, which ComfyUI won't scan. Turn this on and your files end up directly where your loaders look.
    • seed - ignore it. It's declared as an input and echoed back, but it does absolutely nothing to the download. Vestigial.

    Installing it

    Same story as every node in this pack - it's tiny, one dependency, no model files:

    # via ComfyUI Manager: search "ComfyUI-ToolBox" and hit Install, then restart
    cd ComfyUI/custom_nodes
    git clone https://github.com/hben35096/ComfyUI-ToolBox
    

    The one real dependency is codewithgpu (it's the whole requirements.txt). Manager installs it automatically; if you cloned by hand, run pip install -r requirements.txt from the node folder. And you need a logged-in AutoDL/codewithgpu environment for the actual download to authenticate.

    Where people get burned

    • The /root anchoring. basic_path is hardcoded to /root in the source. On a local Linux box that path may not even exist, and on Windows it definitely doesn't. The node's download silently targets wherever /root resolves (or fails) on your machine. This is an AutoDL tool, full stop.
    • Chinese status messages. The output strings are in Chinese. "文件已下载到…" is success, not an error.
    • No reachability check. If the link is wrong or the model is gated, you get whatever error codewithgpu throws in the console. The node won't validate it for you.

    Worth knowing if it's your first AutoDL experience: the model you want is probably on CodeWithGPU precisely because AutoDL users can't always reach HuggingFace at full speed. This node is the workaround - and it's genuinely convenient. The rest of the pack is optional.

    CategoryToolBox

    Inputs (4)

    NameTypeDefaultDescription
    download_linkSTRING
    save_pathSTRING
    seedINT00–18446744073709550000
    move_filesBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    STRINGSTRING