Nodes/ComfyUI-Hunyuan3D/Load Image From URL (Hunyuan3D)
ComfyUI Node

Load Image From URL (Hunyuan3D)

Load an Image From a URL Instead of the File Picker

By UnlimitedEditing·Created 3 months ago·Updated 12 days ago· 0
Load Image From URL (Hunyuan3D)
    • image
    • mask
    url

    If you've ever run ComfyUI on a server you don't fully control - a rented box, a hosted platform, a headless instance - you know the pain this node exists to fix. ComfyUI's normal LoadImage wants you to browse to a file that physically exists on that machine. Hy3DLoadImageFromURL just takes a URL, fetches it over HTTP, and hands you an IMAGE plus a MASK exactly like the built-in loader would. Type the URL, run, done.

    Despite the "(Hunyuan3D)" in its display name, the node is a general-purpose URL image loader. It ships in the ComfyUI-Hunyuan3D pack because that pack was written for the Graydient platform, whose pipeline hands images to ComfyUI as URLs rather than local paths - its init_image_url field mapping needed exactly this. But there's nothing 3D-specific in the code. If you need to pull a remote reference image into any workflow, this works there too.

    How it works

    The mechanism is refreshingly small. It does a requests.get(url, timeout=30) with a hard 30-second cap, throws if the server returns an error, then opens the response with PIL, converts it to RGBA, and normalises it to float32 0–1. The image output is [1, H, W, 3] RGB, and the mask output follows ComfyUI's inverted alpha convention - 0 means opaque, 1 means transparent. So a PNG with an alpha channel arrives as both a usable image and a usable mask, wired separately.

    One detail worth knowing: if you pass an empty string, it doesn't error - it returns a blank 512×512 white image and an empty mask. Handy for prototyping a graph before you have a real URL; mildly confusing if you forgot to fill the field.

    The inputs that matter

    There is exactly one: url, a plain STRING. That's the whole API. No headers, no auth, no retry knobs.

    Installing it

    Same story for every node in this pack. Easiest route is ComfyUI Manager - search "ComfyUI-Hunyuan3D" and hit install. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/UnlimitedEditing/ComfyUI-Hunyuan3D
    

    then restart ComfyUI. The pack's requirements.txt lists trimesh, xatlas, and requests - Manager handles these for you; if you cloned manually, run pip install -r requirements.txt inside the folder. Note that this pack carries no model weights at all: the heavy Hunyuan3D-2 checkpoints you use downstream are loaded by ComfyUI's native nodes, not by anything here.

    Common issues

    The two you'll actually hit are both about the URL, not the code. First, there's no authentication support - no headers, no cookies, no query signing - so anything behind a login or a signed S3 link will 403. Second, the 30-second timeout is unforgiving: if a slow CDN or a huge 4K PNG takes longer, you get a timeout failure. If you control the source, pre-resize or use a faster host. And if the node errors with an import failure at runtime, requests isn't installed in your Python environment - a pip install requests fixes it. The pack also only registers its mesh nodes when trimesh is present, but this node deliberately keeps working without it, so it's the one you can count on even in a broken half-install.

    CategoryHunyuan3D

    Inputs (1)

    NameTypeDefaultDescription
    urlSTRING

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK