Batch Images Skipping Blanks (Hunyuan3D)
Stop feeding Hunyuan3D your blank white frames
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- images
If you're doing Hunyuan3D image-to-mesh in a normal local ComfyUI, this node probably isn't for you - and that's fine. It exists to solve one infuriatingly specific problem: a multiview reconstruction workflow where "this slot is unused" arrives as a solid white image instead of an unplugged input, and feeding those blanks to the model quietly wrecking your mesh. Batch Images Skipping Blanks (Hunyuan3D) is the fix: it takes up to ten IMAGE slots, drops the ones that are pure white placeholders, and stitches the survivors into one clean batch.
Why a "blank" is a real tensor
The story starts with Load Image From URL (Hunyuan3D), the pack's companion node. It's built for Graydient, a hosted ComfyUI platform whose forms expose a fixed set of image fields - init_image_url, image1 through image9. On that platform "leave slot 4 empty" doesn't unplug a wire; it sends an empty URL string. And when Hy3DLoadImageFromURL gets an empty URL it doesn't error out - it returns a placeholder: a constant pure-white 512×512 frame. So your graph looks fully connected, every slot is a genuine IMAGE tensor, and ten white squares ride into your reconstruction alongside the two real photos.
That matters because Hunyuan3D's multiview step treats every input as an observation of the same scene. A white frame isn't ignored - the model reads it as a real, extremely unhelpful view, and the pack's own comments note the results measurably degrade, especially when only one or two of the ten slots are actually filled. White-out a couple of views and the geometry that's supposed to come from parallax cues gets invented instead.
What it actually does
The node loops every supplied frame and drops any that are a constant white (np.allclose(frame, 1.0)), then concatenates what's left into a single batched IMAGE. That's the whole job, with two details worth knowing:
- It also evens out resolutions. Your ten slots might hold several phone photos of the same object, and those are almost never the same pixel size - yet
torch.catdemands matching H/W. The node scales each frame to the first real image's size with scale-to-cover plus center-crop (CSSobject-fit: cover, not a distorting stretch), so each photo keeps its true aspect ratio. That's deliberate: stretch a photo and you warp its effective field of view, which is exactly the perspective cue the model uses to guess depth. - It errors if everything is blank or disconnected. Feed it ten empty slots and you get a
ValueErrortelling you at least one real image is required. That's the node refusing to let a dead-silent failure through.
Inputs: image1 through image10, all optional IMAGE. Leave a slot disconnected or feed it a blank placeholder and it gets skipped - that's the entire input surface, so there's nothing to tune. Output: a single batched images tensor that wires into CLIPVisionEncode → Hunyuan3Dv2ConditioningMultiView on the way to the mesh.
Installing it
Same as any custom node. Easiest is ComfyUI Manager → "Install Custom Nodes" → search ComfyUI-Hunyuan3D (UnlimitedEditing). Or 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, but note the mesh imports are guarded - the batch node itself only needs torch and numpy, so it loads even if those extras fail. It's also pure tensor plumbing: no model weights, no API key. To actually get a mesh out you still need ComfyUI's native Hunyuan3D support and its hunyuan3d-dit-v2-mv-turbo-family checkpoints, which is the genuinely heavy part of the pipeline.
When to reach for it (and when not to)
If you're on Graydient or any fixed-field platform where an empty field maps to a blank image, this node is basically the difference between a working product and a silent mess - run the ten slots through it before conditioning and unused fields vanish on their own. If you're local and you just unplug unused wires, plain Image Concatenate or Batch Images does the same with less ceremony. The one quirk to remember: "blank" here means constant white. A real photo that's genuinely overexposed to pure white will get dropped too. That's a vanishingly rare edge case, but it's the only trap the node hides.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image1opt | IMAGE | Slot 1 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image2opt | IMAGE | Slot 2 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image3opt | IMAGE | Slot 3 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image4opt | IMAGE | Slot 4 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image5opt | IMAGE | Slot 5 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image6opt | IMAGE | Slot 6 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image7opt | IMAGE | Slot 7 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image8opt | IMAGE | Slot 8 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image9opt | IMAGE | Slot 9 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. | |
| image10opt | IMAGE | Slot 10 of up to 10. Leave disconnected, or feed a blank Hy3DLoadImageFromURL placeholder, to skip it. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |